2
votes

I am getting the below exception (Titan + cassandra) in my scala project running in windows

DEBUG c.t.t.g.database.StandardTitanGraph - Installed shutdown hook Thread[Thread-9,5,main] java.lang.Throwable: Hook creation trace at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.(StandardTitanGraph.java:156) [titan-core-1.0.0.jar:na] at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) [titan-core-1.0.0.jar:na] at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:74) [titan-core-1.0.0.jar:na] at notificaiton.UEReportReceiver$.connect_graph_db(UEReportReceiver.scala:62) [classes/:na] at notificaiton.UEReportReceiver.inserttoDB(UEReportReceiver.scala:159) [classes/:na] at notificaiton.UEReportReceiver$$anonfun$receive$1.applyOrElse(UEReportReceiver.scala:139) [classes/:na] at akka.actor.Actor$class.aroundReceive(Actor.scala:467) [akka-actor_2.11-2.3.15.jar:na] at notificaiton.UEReportReceiver.aroundReceive(UEReportReceiver.scala:130) [classes/:na] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) [akka-actor_2.11-2.3.15.jar:na] at akka.actor.ActorCell.invoke(ActorCell.scala:487) [akka-actor_2.11-2.3.15.jar:na] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) [akka-actor_2.11-2.3.15.jar:na] at akka.dispatch.Mailbox.run(Mailbox.scala:220) [akka-actor_2.11-2.3.15.jar:na] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) [akka-actor_2.11-2.3.15.jar:na] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.11.0.jar:na] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.11.0.jar:na] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.11.0.jar:na] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.11.0.jar:na]

Anything am i missing ? Could you please help

1
When does this happen ? Could you provide some sample code which leads to this error ?Filipe Teixeira

1 Answers

2
votes

The stack trace is harmless. A Throwable is included in a DEBUG message.

This issue has come up before. There is a dependency conflict between 2 different logging systems: slf4j and logback. In its Maven build and gremlin.sh, Titan attempts to enforce a classpath order to keep slf4j ahead of logback. You could take the same approach when building your Scala application.

Alternatively, another workaround is to include a logback.xml file on the classpath:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>
  <root level="info">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>