Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFoundException #1046

Open
0bon opened this issue Aug 1, 2023 · 1 comment
Open

ClassNotFoundException #1046

0bon opened this issue Aug 1, 2023 · 1 comment

Comments

@0bon
Copy link

0bon commented Aug 1, 2023

Scala version 3.3.0
Akka version: 2.8.3

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-serialization-jackson" % AkkaVersion,
  "com.typesafe.akka" %% "akka-persistence-cassandra" % "1.1.1",
  "com.typesafe.akka" %% "akka-persistence-typed" % AkkaVersion,
  "com.typesafe.akka" %% "akka-slf4j" % AkkaVersion,
  "com.typesafe.akka" %% "akka-persistence-query" % AkkaVersion,
  "com.typesafe.akka" %% "akka-cluster-tools" % AkkaVersion,
  "com.typesafe.akka" %% "akka-actor-typed" % AkkaVersion,
  "com.typesafe.akka" %% "akka-cluster-sharding-typed" % AkkaVersion,
  "com.typesafe.akka" %% "akka-persistence-testkit" % AkkaVersion % Test
)

When running my application I get the following two errors:

java.lang.ClassNotFoundException: com.esri.core.geometry.ogc.OGCGeometry
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at sbt.internal.ManagedClassLoader.findClass(ManagedClassLoader.java:102)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:375)
	at com.datastax.oss.driver.internal.core.util.Reflection.loadClass(Reflection.java:57)
	at com.datastax.oss.driver.internal.core.util.DefaultDependencyChecker.lambda$isPresent$0(DefaultDependencyChecker.java:48)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at com.datastax.oss.driver.internal.core.util.DefaultDependencyChecker.isPresent(DefaultDependencyChecker.java:41)
	at com.datastax.dse.driver.internal.core.type.codec.DseTypeCodecsRegistrar.registerDseCodecs(DseTypeCodecsRegistrar.java:32)
	at com.datastax.oss.driver.internal.core.context.DefaultDriverContext.buildCodecRegistry(DefaultDriverContext.java:523)
	at com.datastax.oss.driver.internal.core.context.DefaultDriverContext.<init>(DefaultDriverContext.java:260)
	at com.datastax.oss.driver.api.core.session.SessionBuilder.buildContext(SessionBuilder.java:968)
	at com.datastax.oss.driver.api.core.session.SessionBuilder.buildDefaultSessionAsync(SessionBuilder.java:904)
	at com.datastax.oss.driver.api.core.session.SessionBuilder.buildAsync(SessionBuilder.java:817)
	at akka.stream.alpakka.cassandra.DefaultSessionProvider.connect(CqlSessionProvider.scala:53)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSession.<init>(CassandraSession.scala:53)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.startSession(CassandraSessionRegistry.scala:102)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor$$anonfun$1(CassandraSessionRegistry.scala:87)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor(CassandraSessionRegistry.scala:87)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor(CassandraSessionRegistry.scala:77)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor(CassandraSessionRegistry.scala:54)
	at uk.co.abc.App$.session$lzyINIT1(App.scala:49)
	at uk.co.abc.App$.session(App.scala:49)
	at uk.co.abc.App$.given_ClaimedEmailsProjectionRepo$lzyINIT1(App.scala:56)
	at uk.co.abc.App$.given_ClaimedEmailsProjectionRepo(App.scala:56)
	at uk.co.abc.App$bootstrap$.apply$$anonfun$1(App.scala:80)
	at akka.actor.typed.internal.BehaviorImpl$DeferredBehavior$$anon$2.apply(BehaviorImpl.scala:119)
	at akka.actor.typed.Behavior$.start(Behavior.scala:176)
	at akka.actor.typed.internal.InterceptorImpl$$anon$1.start(InterceptorImpl.scala:50)
	at akka.actor.typed.BehaviorInterceptor.aroundStart(BehaviorInterceptor.scala:55)
	at akka.actor.typed.internal.InterceptorImpl.preStart(InterceptorImpl.scala:73)
	at akka.actor.typed.internal.InterceptorImpl$.apply$$anonfun$1(InterceptorImpl.scala:30)
	at akka.actor.typed.internal.BehaviorImpl$DeferredBehavior$$anon$2.apply(BehaviorImpl.scala:119)
	at akka.actor.typed.Behavior$.start(Behavior.scala:176)
	at akka.actor.typed.Behavior$.interpret(Behavior.scala:283)
	at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:238)
	at akka.actor.typed.internal.adapter.ActorAdapter.handleMessage(ActorAdapter.scala:131)
	at akka.actor.typed.internal.adapter.ActorAdapter.aroundReceive(ActorAdapter.scala:107)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579)
	at akka.actor.ActorCell.invoke(ActorCell.scala:547)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
	at akka.dispatch.Mailbox.run(Mailbox.scala:231)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

And

java.lang.ClassNotFoundException: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at sbt.internal.ManagedClassLoader.findClass(ManagedClassLoader.java:102)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:375)
	at com.datastax.oss.driver.internal.core.util.Reflection.loadClass(Reflection.java:57)
	at com.datastax.oss.driver.internal.core.util.DefaultDependencyChecker.lambda$isPresent$0(DefaultDependencyChecker.java:48)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at com.datastax.oss.driver.internal.core.util.DefaultDependencyChecker.isPresent(DefaultDependencyChecker.java:41)
	at com.datastax.oss.driver.internal.core.session.BuiltInRequestProcessors.createDefaultProcessors(BuiltInRequestProcessors.java:47)
	at com.datastax.oss.driver.internal.core.context.DefaultDriverContext.buildRequestProcessorRegistry(DefaultDriverContext.java:512)
	at com.datastax.oss.driver.internal.core.util.concurrent.LazyReference.get(LazyReference.java:55)
	at com.datastax.oss.driver.internal.core.context.DefaultDriverContext.getRequestProcessorRegistry(DefaultDriverContext.java:905)
	at com.datastax.oss.driver.internal.core.session.DefaultSession.<init>(DefaultSession.java:121)
	at com.datastax.oss.driver.internal.core.session.DefaultSession.init(DefaultSession.java:88)
	at com.datastax.oss.driver.api.core.session.SessionBuilder.buildDefaultSessionAsync(SessionBuilder.java:903)
	at com.datastax.oss.driver.api.core.session.SessionBuilder.buildAsync(SessionBuilder.java:817)
	at akka.stream.alpakka.cassandra.DefaultSessionProvider.connect(CqlSessionProvider.scala:53)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSession.<init>(CassandraSession.scala:53)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.startSession(CassandraSessionRegistry.scala:102)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor$$anonfun$1(CassandraSessionRegistry.scala:87)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor(CassandraSessionRegistry.scala:87)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor(CassandraSessionRegistry.scala:77)
	at akka.stream.alpakka.cassandra.scaladsl.CassandraSessionRegistry.sessionFor(CassandraSessionRegistry.scala:54)
	at uk.co.abc.App$.session$lzyINIT1(App.scala:49)
	at uk.co.abc.App$.session(App.scala:49)
	at uk.co.abc.App$.given_ClaimedEmailsProjectionRepo$lzyINIT1(App.scala:56)
	at uk.co.abc.App$.given_ClaimedEmailsProjectionRepo(App.scala:56)
	at uk.co.abc.App$bootstrap$.apply$$anonfun$1(App.scala:80)
	at akka.actor.typed.internal.BehaviorImpl$DeferredBehavior$$anon$2.apply(BehaviorImpl.scala:119)
	at akka.actor.typed.Behavior$.start(Behavior.scala:176)
	at akka.actor.typed.internal.InterceptorImpl$$anon$1.start(InterceptorImpl.scala:50)
	at akka.actor.typed.BehaviorInterceptor.aroundStart(BehaviorInterceptor.scala:55)
	at akka.actor.typed.internal.InterceptorImpl.preStart(InterceptorImpl.scala:73)
	at akka.actor.typed.internal.InterceptorImpl$.apply$$anonfun$1(InterceptorImpl.scala:30)
	at akka.actor.typed.internal.BehaviorImpl$DeferredBehavior$$anon$2.apply(BehaviorImpl.scala:119)
	at akka.actor.typed.Behavior$.start(Behavior.scala:176)
	at akka.actor.typed.Behavior$.interpret(Behavior.scala:283)
	at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:238)
	at akka.actor.typed.internal.adapter.ActorAdapter.handleMessage(ActorAdapter.scala:131)
	at akka.actor.typed.internal.adapter.ActorAdapter.aroundReceive(ActorAdapter.scala:107)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579)
	at akka.actor.ActorCell.invoke(ActorCell.scala:547)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
	at akka.dispatch.Mailbox.run(Mailbox.scala:231)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

@johanandren
Copy link
Member

Can you share the entire log entry? I have a feeling C* probes for those classes and logs the entire stacktrace when they are not present even though that may not be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants