Camel Kafka serialization error - apache-camel

I am new to camel and kafka.
I am using Camel 2.18.2 with Kafka 0.10.1.1
I am getting this error and don't understand why:
org.apache.kafka.common.errors.SerializationException: Can't convert value of class [B to class org.apache.kafka.common.serialization.StringSerializer specified in value.serializer
I have the following route:
from("direct://toEnrichEmail")
.routeId(routeId).marshal().json(JsonLibrary.Jackson, Map.class)
.log(LoggingLevel.INFO, "Sending to Kafka: ${body}")
.to("kafka:localhost:9092?topic=enrich-email&requestRequiredAcks=-1");
The code that actually sends to the route:
ProducerTemplate template = kafkaProducerFactory.getProducerTemplate();
logger.debug("Sending message type: {}, to uri: {}, route: {}", wimsConfiguration.getMessageType(),
wimsConfiguration.getDirectUri(), wimsConfiguration.getRouteName());
Map<String,Object>headers = new HashMap<>(); // added because the examples do
headers.put(KafkaConstants.PARTITION_KEY, 0);
headers.put(KafkaConstants.KEY, "1");
template.sendBodyAndHeaders(wimsConfiguration.getDirectUri(), wimsConfiguration.getWimsMessage(), headers);
The log message in the route shows that the message is a proper JSON string, the default serializer is string, So why is it complaining that it cannot serialize?
I looked through the camel kafka component test cases and this looks like it should work
Here is a sample of the output from Camel/kafka logs:
16:32:20,967 INFO [toEnrichEmail] (default task-12) Sending to Kafka: {"messageType":"orderCreate","regionCode":"IN","regionLanguage":["en"],"orderHeader":{"order":"3001357952","salesOrg":"2123","soldTo":"2035266752","currency":"INR","documentType":"TA","validFrom":null,"validTo":null,"contactName":"UI IN","contactPhone":"","contactEmail":"fu.bar#baz.com"},"shipTo":{"customerNumber":"2035266752","companyName":"INTERNET PRICE FOR EOU","cityName":"Bangalore","district":"","postalCode":"","streetName":"","houseNumber":"","building":"","floor":"","roomNumber":"","countryName":"India","regionName":"Karnataka"},"billTo":{"customerNumber":"2035266752","companyName":"INTERNET PRICE FOR EOU","cityName":"Indi","district":"","postalCode":"","streetName":"","houseNumber":"","building":"","floor":"","roomNumber":"","countryName":"India","regionName":"Karnataka"},"paymentInfo":{"paymentMethod":"PO","purchaseOrder":"1234567","requisitionNumber":"","creditCardNumber":"","paymentterms":"","incoterms":""},"orderSummary":{"orderSubtotal":"6479.52","discounts":"0","shippingTransportation":"0","salesTax":"1187.92","dutyTotal":"1712.56","orderTotal":"9380"},"orderItems":[{"quoteNumber":null,"quoteItemNumber":"000010","totalReservedQunatity":null,"remainingReservedQuantity":null,"lineItemNo":"000010","itemCategory":"TAN","qty":"1","material":"T6066-1KG","product":"T6066","brandId":"SIGMA","description":"TRIZMA(R) BASE, BIOPERFORMANCE CERTIF&","yourRef":"","yourPrice":"8192.08","listPrice":"8192.08"}]}
16:32:21,008 ERROR [org.apache.camel.processor.DefaultErrorHandler] (default task-12) Failed delivery for (MessageId: ID-STLDEEPX06-sial-com-49604-1486506685312-1-1 on ExchangeId: ID-STLDEEPX06-sial-com-49604-1486506685312-1-2). Exhausted after delivery attempt: 1 caught: org.apache.kafka.common.errors.SerializationException: Can't convert value of class [B to class org.apache.kafka.common.serialization.StringSerializer specified in value.serializer
Blockquote
Message History
RouteId ProcessorId Processor Elapsed (ms)
[toEnrichEmail ] [toEnrichEmail ] [direct://toEnrichEmail ] [ 57]
[toEnrichEmail ] [marshal1 ] [marshal[org.apache.camel.model.dataformat.JsonDataFormat#142a2fec] ] [ 10]
[toEnrichEmail ] [log4 ] [log ] [ 15]
[toEnrichEmail ] [to3 ] [kafka:localhost:9092?topic=enrich-email&requestRequiredAcks=-1 ] [ 25]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------: org.apache.kafka.common.errors.SerializationException: Can't convert value of class [B to class org.apache.kafka.common.serialization.StringSerializer specified in value.serializer
16:32:21,011 INFO [stdout] (default task-12) 2017-02-07T16:32:21,010 INFO com.sial.notifications.common.rest.NotificationExceptionResponseMapper - Mapping Exception org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-STLDEEPX06-sial-com-49604-1486506685312-1-2]
16:32:21,021 INFO [stdout] (default task-12) 2017-02-07T16:32:21,014 ERROR com.sial.notifications.common.rest.NotificationExceptionResponseMapper - Mapped exception org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-STLDEEPX06-sial-com-49604-1486506685312-1-2]
16:32:21,021 INFO [stdout] (default task-12) org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-STLDEEPX06-sial-com-49604-1486506685312-1-2]
16:32:21,021 INFO [stdout] (default task-12) at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1779) ~[camel-core-2.18.2.jar:2.18.2]
16:32:21,021 INFO [stdout] (default task-12) at org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:677) ~[camel-core-2.18.2.jar:2.18.2]
16:32:21,021 INFO [stdout] (default task-12) at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:515) ~[camel-core-2.18.2.jar:2.18.2]
16:32:21,021 INFO [stdout] (default task-12) at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:511) ~[camel-core-2.18.2.jar:2.18.2]
16:32:21,021 INFO [stdout] (default task-12) at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:259) ~[camel-core-2.18.2.jar:2.18.2]
16:32:21,021 INFO [stdout] (default task-12) at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:253) ~[camel-core-2.18.2.jar:2.18.2]
16:32:21,021 INFO [stdout] (default task-12) at com.sial.notifications.messages.rest.NotificationMessageServiceImpl.submitMessageToRoute(NotificationMessageServiceImpl.java:66) ~[classes:?]

add serializerClass=org.apache.kafka.common.serialization.ByteArraySerializer to the producer config
Or
add .convertBodyTo(String.class) after marshaling the object to JSON as you said
I would prefer the former one as it's one less operation.

The solution was to add .convertBodyTo(String.class) after marshaling the class to JSON. That shouldn't be necessary, but doing this made Kafka happy.

Related

Why is CamelExchangesFailed_total metrics not increased?

I have a Apache Camel application which is monitored by Prometheus. Therefore, I added Micrometer to my POM (see Spring Boot Auto-Configuration) and MicrometerRoutePolicyFactory to my application (see Using Micrometer Route Policy Factory). But the metric CamelExchangesFailed_total doesn't change, althought a route failed.
Source
#SpringBootApplication
public class TestApplication {
public static void main(String[] args) {
SpringApplication.run(TestApplication.class, args);
}
#Bean
public MicrometerRoutePolicyFactory micrometerRoutePolicyFactory() {
return new MicrometerRoutePolicyFactory();
}
#Bean
public EndpointRouteBuilder route() {
return new EndpointRouteBuilder() {
#Override
public void configure() throws Exception {
errorHandler(deadLetterChannel("log:dead"));
from(timer("testTimer").repeatCount(1)).throwException(new RuntimeException());
}
};
}
}
Logs
INFO 5060 --- [ restartedMain] o.a.c.i.e.InternalRouteStartupManager : Route: route1 started and consuming from: timer://testTimer
INFO 5060 --- [ restartedMain] o.a.c.impl.engine.AbstractCamelContext : Total 1 routes, of which 1 are started
INFO 5060 --- [ restartedMain] o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.5.0 (camel-1) started in 0.007 seconds
INFO 5060 --- [ restartedMain] test.TestApplication : Started TestApplication in 6.626 seconds (JVM running for 7.503)
INFO 5060 --- [on(3)-127.0.0.1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
INFO 5060 --- [on(3)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
INFO 5060 --- [on(3)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Completed initialization in 5 ms
INFO 5060 --- [mer://testTimer] dead : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
Metrics
# HELP CamelExchangesFailed_total
# TYPE CamelExchangesFailed_total counter
CamelExchangesFailed_total{application="test",camelContext="camel-1",routeId="route1",serviceName="MicrometerRoutePolicyService",} 0.0
# HELP CamelExchangesSucceeded_total
# TYPE CamelExchangesSucceeded_total counter
CamelExchangesSucceeded_total{application="test",camelContext="camel-1",routeId="route1",serviceName="MicrometerRoutePolicyService",} 1.0
Resaerch
If I remove the custom error handler, the metric CamelExchangesFailed_total is increased, but then the default error handler is used, which is not desired for some reasons.
Question
Why is CamelExchangesFailed_total metrics not increased? Is there any way to count all failed routes with a custom error handler?
Apache Camel LTS version 3.7.0 added a new metric CamelExchangesFailuresHandled_total, which is a counter of handled errors, see CAMEL-15908:
Similar to CAMEL-15255, there are some additional counter metrics we could add to the MicrometerRoutePolicy for:
Total exchanges processed
Number of failures handled
Number of external redeliveries
Metrics
# HELP CamelExchangesFailed_total
# TYPE CamelExchangesFailed_total counter
CamelExchangesFailed_total{application="test",camelContext="camel-1",routeId="route1",serviceName="MicrometerRoutePolicyService",} 0.0
# HELP CamelExchangesSucceeded_total
# TYPE CamelExchangesSucceeded_total counter
CamelExchangesSucceeded_total{application="test",camelContext="camel-1",routeId="route1",serviceName="MicrometerRoutePolicyService",} 1.0
# HELP CamelExchangesFailuresHandled_total
# TYPE CamelExchangesFailuresHandled_total counter
CamelExchangesFailuresHandled_total{application="test",camelContext="camel-1",routeId="route1",serviceName="MicrometerRoutePolicyService",} 1.0

Apache Solr : Data import handler exception - SetGraphicsStateParameters name for 'gs' operator not found in resources: /R7

configured data import handler to process bulk PDF documents. after process 21000 documents. Process going to idle and not processing all the documents.
When i see the log observed below things.
Please let me know is there anyway that i can ignore this issue or any setting do i need to update.
Error:
2020-04-23 18:39:55.749 INFO (qtp215219944-24) [ x:DMS] o.a.s.c.S.Request [DMS] webapp=/solr path=/dataimport params={indent=on&wt=json&command=status&_=1587664092295} status=0 QTime=0
2020-04-23 18:39:55.972 WARN (Thread-14) [ ] o.a.p.p.COSParser **The end of the stream is out of range, using workaround to read the stream, stream start position: 4748210, length: 2007324, expected end position: 6755534**
2020-04-23 18:39:55.976 WARN (Thread-14) [ ] o.a.p.p.COSParser Removed null object COSObject{50, 0} from pages dictionary
2020-04-23 18:39:55.976 WARN (Thread-14) [ ] o.a.p.p.COSParser Removed null object COSObject{60, 0} from pages dictionary
2020-04-23 18:39:55.997 ERROR (Thread-14) [ ] o.a.p.c.o.s.SetGraphicsStateParameters **name for 'gs' operator not found in resources: /R7**
No Unicode mapping for 198 (1) in font DDJQSL+Wingdings
Regards,
Ravi kumar
After analyzing the documents observed that someof the documents size is more than 500mb.
So solr getting out of memory exception and need to increase the heap memory.
After doing that issue got resolved.

Apache camel how to implement an optional consumer for a wire tap

I set up some routes (Camel 2.22.1) that uses wire tap to log some stuff into a Mongo db.
from(DIRECT_NEXT).process(sendFile)
.wireTap( "direct:count-fetch?failIfNoConsumers=false" )
as you see i am using failIfNoConsumers=false.
from(COUNT_FETCH)
.routeId( MONGO_COUNT_FETCH_ROUTEID )
.autoStartup( false )
.process(countFetchProcessor)
.to(persistenceEndpoints.updateImage())
.log(LoggingLevel.DEBUG, "Counted fetch.");
The mongo DB is an optional component, the whole application will run without it.
I am using Mongo'S ServerMonitorListener to check if Mongo is available. I suspend or resume the rout using Camel's ControlBus accordingly.
All is running fine!
My Problem is that Camel tries to send the exchanges to the not running routes for 30s:
...
[DEBUG] 2019-01-03 14:02:45.848 [Camel (camel-1) thread #23 - WireTap] DirectBlockingProducer - Waited 20025 for consumer to be ready
...
Why the producer blocks? The default value for "block" should be false?!
And after it we see of course an exception:
No consumers available on endpoint: direct://count-fetch?failIfNoConsumers=false
What is the best approach to let camel discard the exchange immediately (how to set the time out?) and don't throw any exception (because it is normal application behavior, exception will only slow down)?
UPDATE:
here is the complete exception:
[ERROR] 2019-01-07 10:21:22.702 [Camel (camel-1) thread #4 - WireTap] DefaultErrorHandler - Failed delivery for (MessageId: ID-moritz-1546852848013-0-3 on ExchangeId: ID-moritz-1546852848013-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[route4 ] [route4 ] [timer://updateAll ] [ 30065]
[route4 ] [log1 ] [log ] [ 1]
[route4 ] [to3 ] [direct:updateAll ] [ 19]
[route5 ] [process2 ] [Processor#0x4e92466a ] [ 9]
[route5 ] [process3 ] [Processor#0x1b29d52b ] [ 7]
[route5 ] [wireTap1 ] [wireTap[direct:update-all?failIfNoConsumers=false] ] [ 1]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]
at org.apache.camel.component.direct.DirectBlockingProducer.getConsumer(DirectBlockingProducer.java:67) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:160) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:155) [camel-core-2.22.1.jar:2.22.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Make sure to check the document for the version of Camel you use, which is 2.22.x
There you can see the block is default enabled: https://github.com/apache/camel/blob/camel-2.22.x/camel-core/src/main/docs/direct-component.adoc

camel-akka and response from actor

Dear Akka/Camel Masters!
I have following route:
(netty4:tcp) -> (akka:actor)
I'm using akka-camel module where:
akka:actor is of type UntypedConsumerActor
netty4:tcp is an endpoint defined in getEndopointUri method of akka:actor
netty4:tcp://localhost:8000?textline=true
When I send bytes to tcp socket I receive exception which tells that socket channel is closed:
Caused by: java.nio.channels.ClosedChannelException: null
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(...)(Unknown Source) [netty-all-4.1.4.Final.jar:4.1.4.Final]
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[akka://FileDaemonS] [akka://FileDaemonS] [tcp://localhost:8000 ] [ 60061]
[akka://FileDaemonS] [to1 ] [akka://FileDaemonSystem/user/FileDaemonTcpEndpoint?autoAck=false&replyTimeout=] [ 60037]
java.util.concurrent.TimeoutException: Failed to get response from the actor [ActorEndpointPath(akka://FileDaemonSystem/user/FileDaemonTcpEndpoint)] within timeout [1 minute]. Check replyTimeout and blocking settings [Endpoint[akka://FileDaemonSystem/user/FileDaemonTcpEndpoint?autoAck=false&replyTimeout=60000+milliseconds]]
at akka.camel.internal.component.ActorProducer$$anonfun$1.applyOrElse(ActorComponent.scala:151) ~[akka-camel_2.11-2.4.9.jar:na]
at akka.camel.internal.component.ActorProducer$$anonfun$1.applyOrElse(ActorComponent.scala:148) ~[akka-camel_2.11-2.4.9.jar:na]
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36) ~[scala-library-2.11.8.jar:na]
at scala.PartialFunction$AndThen.apply(PartialFunction.scala:186) [scala-library-2.11.8.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [scala-library-2.11.8.jar:na]
What am I doing wrong?
I found a solution. Setting netty endpoint as a one-way solves the problem.
netty4:tcp://localhost:8000?textline=true&sync=false

rexster.xml configuration with titan 0.5.4 and berkeleyje

Im new to graph db and I'm totally lost since few days. Im trying to run rexster with titan db 0.5.4 with berkeleyje storage backend.
but I'm not sure if the rexster.xml configuration is correct.
if I follow the rexster docs I got in the doghouse empty db with no vertices or edges while actually there are. screenshot
<graphs>
<graph>
<graph-name>bio4j</graph-name>
<graph-type>com.tinkerpop.rexster.config.TinkerGraphGraphConfiguration</graph-type>
<graph-location>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j/importGOTitanProperties.properties</graph-location>
<graph-read-only>false</graph-read-only>
<extensions>
<allows>
<allow>tp:frames</allow>
</allows>
</extensions>
</graph>
...
</graphs>
and if I follow the answer here
<graphs>
<graph>
<graph-name>bio4j</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-location>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j/importGOTitanProperties.properties</graph-location>
<graph-read-only>false</graph-read-only>
<properties>
<storage.backend>local</storage.backend>
<storage.directory>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j</storage.directory>
<buffer-size>100</buffer-size>
</properties>
<extensions>
<allows>
<allow>tp:frames</allow>
</allows>
</extensions>
</graph>
...
</graphs>
I got these errors:
$ ../../bin/rexster.sh --start
0 [main] INFO com.tinkerpop.rexster.Application - .:Welcome to Rexster:.
90 [main] INFO com.tinkerpop.rexster.server.RexsterProperties - Using [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] as configuration source.
97 [main] INFO com.tinkerpop.rexster.Application - Rexster is watching [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] for change.
232 [main] WARN com.tinkerpop.rexster.config.GraphConfigurationContainer - Could not load graph bio4j. Please check the XML configuration.
233 [main] WARN com.tinkerpop.rexster.config.GraphConfigurationContainer - GraphConfiguration could not be found or otherwise instantiated: [com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration]. Ensure that it is in Rexster's path.
com.tinkerpop.rexster.config.GraphConfigurationException: GraphConfiguration could not be found or otherwise instantiated: [com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration]. Ensure that it is in Rexster's path.
at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:142)
at com.tinkerpop.rexster.config.GraphConfigurationContainer.<init>(GraphConfigurationContainer.java:54)
at com.tinkerpop.rexster.server.XmlRexsterApplication.reconfigure(XmlRexsterApplication.java:99)
at com.tinkerpop.rexster.server.XmlRexsterApplication.<init>(XmlRexsterApplication.java:47)
at com.tinkerpop.rexster.Application.<init>(Application.java:97)
at com.tinkerpop.rexster.Application.main(Application.java:189)
Caused by: java.lang.IllegalArgumentException: Could not find implementation class: local
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:47)
at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:421)
at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:361)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1275)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:73)
at com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration.configureGraphInstance(TitanGraphConfiguration.java:33)
at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:124)
... 5 more
Caused by: java.lang.ClassNotFoundException: local
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:42)
... 12 more
235 [main] WARN com.tinkerpop.rexster.config.GraphConfigurationContainer - Could not find implementation class: local
java.lang.IllegalArgumentException: Could not find implementation class: local
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:47)
at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:421)
at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:361)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1275)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:73)
at com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration.configureGraphInstance(TitanGraphConfiguration.java:33)
at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:124)
at com.tinkerpop.rexster.config.GraphConfigurationContainer.<init>(GraphConfigurationContainer.java:54)
at com.tinkerpop.rexster.server.XmlRexsterApplication.reconfigure(XmlRexsterApplication.java:99)
at com.tinkerpop.rexster.server.XmlRexsterApplication.<init>(XmlRexsterApplication.java:47)
at com.tinkerpop.rexster.Application.<init>(Application.java:97)
at com.tinkerpop.rexster.Application.main(Application.java:189)
Caused by: java.lang.ClassNotFoundException: local
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:42)
... 12 more
244 [main] INFO com.tinkerpop.rexster.server.metrics.HttpReporterConfig - Configured HTTP Metric Reporter.
245 [main] INFO com.tinkerpop.rexster.server.metrics.ConsoleReporterConfig - Configured Console Metric Reporter.
1312 [main] INFO com.tinkerpop.rexster.server.HttpRexsterServer - HTTP/REST thread pool configuration: kernal[4 / 4] worker[8 / 8]
1313 [main] INFO com.tinkerpop.rexster.server.HttpRexsterServer - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for HTTP/REST.
1399 [main] INFO com.tinkerpop.rexster.server.HttpRexsterServer - Rexster Server running on: [http://localhost:8182]
1399 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for RexPro.
1399 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - RexPro thread pool configuration: kernal[4 / 4] worker[8 / 8]
1402 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - Rexster configured with [DefaultSecurity].
1403 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - RexPro Server bound to [0.0.0.0:8184]
1412 [main] INFO com.tinkerpop.rexster.server.ShutdownManager - Bound shutdown socket to /127.0.0.1:8183. Starting listener thread for shutdown requests.
and here is the db .properties file:
$ nano importGOTitanProperties.properties
#ImportGOTitan properties
storage.directory=bio4j
storage.backend=berkeleyje
#index.search.backend=elasticsearch
#index.search.directory=bio4j/es
storage.batch-loading=false
storage.transactions=true
query.fast-property=false
schema.default=none
after reading this I could figure out how to configure the rexster.xml file
rexster.xml:
<?xml version="1.0" encoding="UTF-8"?>
<rexster>
...
<graphs>
<graph>
<graph-name>bio4j</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-read-only>false</graph-read-only>
<properties>
<storage.backend>berkeleyje</storage.backend>
<storage.directory>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j</storage.directory>
<storage.buffer-size>100</storage.buffer-size>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
</graphs>
</rexster>
starting the server:
$ ../../bin/rexster.sh --start
0 [main] INFO com.tinkerpop.rexster.Application - .:Welcome to Rexster:.
115 [main] INFO com.tinkerpop.rexster.server.RexsterProperties - Using [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] as configuration source.
129 [main] INFO com.tinkerpop.rexster.Application - Rexster is watching [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] for change.
942 [main] INFO com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration - Generated unique-instance-id=0a2581025086-AngryMac-local1
1049 [main] INFO com.thinkaurelius.titan.diskstorage.Backend - Initiated backend operations thread pool of size 8
1161 [main] INFO com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog - Loaded unidentified ReadMarker start time Timepoint[1454913673816000 μs] into com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog$MessagePuller#302c971f
1165 [main] INFO com.tinkerpop.rexster.RexsterApplicationGraph - Graph [bio4j] - configured with allowable namespace [tp:gremlin]
1205 [main] INFO com.tinkerpop.rexster.config.GraphConfigurationContainer - Graph bio4j - titangraph[berkeleyje:/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j] loaded
2502 [main] INFO com.tinkerpop.rexster.server.HttpRexsterServer - HTTP/REST thread pool configuration: kernal[4 / 4] worker[8 / 8]
2504 [main] INFO com.tinkerpop.rexster.server.HttpRexsterServer - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for HTTP/REST.
2636 [main] INFO com.tinkerpop.rexster.server.HttpRexsterServer - Rexster Server running on: [http://localhost:8182]
2636 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for RexPro.
2636 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - RexPro thread pool configuration: kernal[4 / 4] worker[8 / 8]
2640 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - Rexster configured with no security.
2641 [main] INFO com.tinkerpop.rexster.server.RexProRexsterServer - RexPro Server bound to [0.0.0.0:8184]
2653 [main] INFO com.tinkerpop.rexster.server.ShutdownManager - Bound shutdown socket to /127.0.0.1:8183. Starting listener thread for shutdown requests.
the doghouse screenshot :))))

Resources