Hey Guys,
I having problem with ActivateContext once I deloy an application as Akka Microkernel, it's complaining about java.lang.ClassNotFoundException, here is the exception log:
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.sample.Init.<init>(Init.scala:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at akka.kernel.Main$$anonfun$1.apply(Main.scala:82)
at akka.kernel.Main$$anonfun$1.apply(Main.scala:82)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at akka.kernel.Main$.main(Main.scala:82)
at akka.kernel.Main.main(Main.scala)
Caused by: java.lang.ClassNotFoundException: com.sample.model.AsyncPostgreSQLContext$
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at net.fwbrasil.activate.ActivateContext$.loadClass(ActivateContext.scala:113)
at net.fwbrasil.activate.serialization.NamedSingletonSerializable$$anonfun$instancesOf$2.apply(NamedSingletonSerializable.scala:44)
at net.fwbrasil.activate.serialization.NamedSingletonSerializable$$anonfun$instancesOf$2.apply(NamedSingletonSerializable.scala:44)
at scala.collection.TraversableLike$WithFilter$$anonfun$withFilter$1.apply(TraversableLike.scala:783)
at scala.collection.TraversableLike$WithFilter$$anonfun$withFilter$1.apply(TraversableLike.scala:783)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:226)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:98)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
at net.fwbrasil.activate.serialization.NamedSingletonSerializable$.instancesOf(NamedSingletonSerializable.scala:44)
at net.fwbrasil.activate.ActivateContext$.context(ActivateContext.scala:148)
at net.fwbrasil.activate.ActivateContext$.contextFor(ActivateContext.scala:127)
at net.fwbrasil.activate.statement.StatementMocks$.mockEntity(StatementMocks.scala:106)
at net.fwbrasil.activate.statement.StatementMocks$.mockEntityWithoutCache(StatementMocks.scala:93)
at net.fwbrasil.activate.statement.StatementMocks$$anonfun$mockEntity$1.apply(StatementMocks.scala:90)
at net.fwbrasil.activate.statement.StatementMocks$$anonfun$mockEntity$1.apply(StatementMocks.scala:90)
at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91)
at net.fwbrasil.activate.statement.StatementMocks$.mockEntity(StatementMocks.scala:90)
at net.fwbrasil.activate.statement.StatementContext$class.mockEntity(Statement.scala:88)
at com.sample.model.AsyncPostgreSQLContext$.mockEntity(Context.scala:11)
at net.fwbrasil.activate.statement.StatementContext$class.mockEntity(Statement.scala:83)
at com.sample.model.AsyncPostgreSQLContext$.mockEntity(Context.scala:11)
at net.fwbrasil.activate.statement.query.QueryContext$$anonfun$produceQuery$1.apply(QueryContext.scala:51)
at net.fwbrasil.activate.statement.query.QueryContext$$anonfun$produceQuery$1.apply(QueryContext.scala:51)
at net.fwbrasil.activate.statement.From$.runAndClearFrom(StatementFrom.scala:40)
at net.fwbrasil.activate.statement.query.QueryContext$class.produceQuery(QueryContext.scala:50)
at com.sample.model.AsyncPostgreSQLContext$.produceQuery(Context.scala:11)
at net.fwbrasil.activate.statement.query.QueryContext$class.allWhereQuery(QueryContext.scala:240)
at net.fwbrasil.activate.statement.query.QueryContext$
class.net$fwbrasil$activate$statement$query$QueryContext$$_allWhere(QueryContext.scala:259)
at net.fwbrasil.activate.statement.query.QueryContext$SelectEntity.where(QueryContext.scala:270)
at net.fwbrasil.activate.migration.Migration$$anonfun$storageVersion$1$$anonfun$apply$2.apply(Migration.scala:57)
at net.fwbrasil.activate.migration.Migration$$anonfun$storageVersion$1$$anonfun$apply$2.apply(Migration.scala:59)
at net.fwbrasil.radon.transaction.TransactionManager.runInTransaction(TransactionManager.scala:53)
at net.fwbrasil.radon.transaction.TransactionManager.runInTransactionWithRetry(TransactionManager.scala:69)
at net.fwbrasil.radon.transaction.TransactionManager.runInNewTransactionWithRetry(TransactionManager.scala:62)
at net.fwbrasil.radon.transaction.Required.execute(Propagation.scala:26)
at net.fwbrasil.radon.transaction.TransactionContext$class.transactional(TransactionContext.scala:59)
at net.fwbrasil.radon.transaction.TransactionContext$class.transactional(TransactionContext.scala:32)
at com.sample.model.AsyncPostgreSQLContext$.transactional(Context.scala:11)
at net.fwbrasil.activate.migration.Migration$$anonfun$storageVersion$1.apply(Migration.scala:56)
at net.fwbrasil.activate.migration.Migration$$anonfun$storageVersion$1.apply(Migration.scala:54)
at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91)
at net.fwbrasil.activate.migration.Migration$.storageVersion(Migration.scala:54)
at net.fwbrasil.activate.migration.Migration$.storageVersionTuple(Migration.scala:65)
at net.fwbrasil.activate.migration.Migration$.updateTo(Migration.scala:90)
at net.fwbrasil.activate.migration.Migration$.update(Migration.scala:86)
at net.fwbrasil.activate.migration.MigrationContext$class.runMigration(MigrationContext.scala:15)
at com.sample.model.AsyncPostgreSQLContext$.runMigration(Context.scala:11)
at net.fwbrasil.activate.migration.MigrationContext$class.runStartupMigration(MigrationContext.scala:26)
at com.sample.model.AsyncPostgreSQLContext$.runStartupMigration(Context.scala:11)
at net.fwbrasil.activate.migration.MigrationContext$class.delayedInit(MigrationContext.scala:19)
at com.sample.model.AsyncPostgreSQLContext$.delayedInit(Context.scala:11)
at com.sample.model.AsyncPostgreSQLContext$.<init>(Context.scala:11)
at com.sample.model.AsyncPostgreSQLContext$.<clinit>(Context.scala)
... 18 more
but based on the logs before this exception, the com.sample.model.AsyncPostgresSQLContext is Initialized and a connection to the postgres is establish.
Hope you can help me.
Thanks,
- Mine