/java.lang.ClassNotFoundException: akka.event.slf4j.Slf4jLogger/
are you sure that akka-slf4j.jar is on your classpath? see
http://doc.akka.io/docs/akka/2.3.12/scala/logging.html#SLF4J
-Michael
On 08/21/15 06:50, M.Ahsen Taqi Kazmi wrote:
i am using hazelcast 3.5 with Scala 2.11.1 and akka 2.3.8
i have implemented StoreLoad class, in store method i want to send the
object to an actor which stores the object in mongo
here is store method from my StoreLoad class
override def store ( uuid : Int, abc : Abc){
log.info("********** store successfully called
*************")
log.info("****** object with uuid as a key is stored in the
Hcast Map")
log.info("object id : " + uuid)
val config = ConfigFactory.load()
log.info("*********** actor config loaded ")
def createActorSystem:ActorSystem={
val system = ActorSystem("actorsystem",config)
system
}
val system = createActorSystem
log.info("actor system loaded " )
val AbclWriteInMongoActor =
system.actorOf(Props[AbcWriteInMongoActor].
withDispatcher(dispatcherName),
name = actorName)
log.info("actor loaded " )
log.info("actor loaded with dispatcher ")
AbclWriteInMongoActor ! AbcImplWriteInMongo(abc)
println("object send to mongo write actor")
log.info("**********!!!!! E-o store method !!!!*************")
}
when i run the client the store load gets called prints the logs as
with the exception as follows
18:39:25.387 [hz._hzInstance_1_dev.partition-operation.thread-1]
INFO AbcStoreLoad - ********** store successfully called *************
18:39:25.388 [hz._hzInstance_1_dev.partition-operation.thread-1]
INFO AbcStoreLoad - ****** object with uuid as a key is stored in the
Hcast Map
18:39:25.389 [hz._hzInstance_1_dev.partition-operation.thread-1]
INFO AbcStoreLoad - object id : 1
18:39:25.389 [hz._hzInstance_1_dev.partition-operation.thread-1]
INFO AbcStoreLoad - *********** actor config loaded
error while starting up loggers
akka.ConfigurationException: Logger specified in config can't be
loaded [akka.event.slf4j.Slf4jLogger] due to
[java.lang.ClassNotFoundException: akka.event.slf4j.Slf4jLogger]
at
akka.event.LoggingBus$$anonfun$4$$anonfun$apply$1.applyOrElse(Logging.scala:115)
at
akka.event.LoggingBus$$anonfun$4$$anonfun$apply$1.applyOrElse(Logging.scala:114)
at
scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:215)
at scala.util.Try$.apply(Try.scala:191)
at scala.util.Failure.recover(Try.scala:215)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:114)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:109)
at
scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:728)
at scala.collection.Iterator$class.foreach(Iterator.scala:743)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1174)
at
scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at
scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:727)
at
akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:109)
at
akka.event.EventStream.startDefaultLoggers(EventStream.scala:26)
at
akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:622)
at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:618)
at
akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:615)
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:615)
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:632)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:141)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:118)
at
models.hcast.storeload.AbcStoreLoad.createActorSystem$1(ArtistImplStoreLoad.scala:81)
at
models.hcast.storeload.AbcStoreLoad.store(ArtistImplStoreLoad.scala:94)
at
models.hcast.storeload.AbcStoreLoad.store(ArtistImplStoreLoad.scala:22)
at
com.hazelcast.map.impl.MapStoreWrapper.store(MapStoreWrapper.java:93)
at
com.hazelcast.map.impl.mapstore.writethrough.WriteThroughStore.add(WriteThroughStore.java:40)
at
com.hazelcast.map.impl.mapstore.writethrough.WriteThroughStore.add(WriteThroughStore.java:31)
at
com.hazelcast.map.impl.DefaultRecordStore.set(DefaultRecordStore.java:803)
at
com.hazelcast.map.impl.operation.SetOperation.run(SetOperation.java:41)
at
com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:137)
at
com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.processOperation(OperationThread.java:154)
at
com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.process(OperationThread.java:110)
at
com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.doRun(OperationThread.java:101)
at
com.hazelcast.spi.impl.operationexecutor.classic.OperationThread.run(OperationThread.java:76)
Caused by: java.lang.ClassNotFoundException:
akka.event.slf4j.Slf4jLogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at
akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(DynamicAccess.scala:67)
at
akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(DynamicAccess.scala:66)
at scala.util.Try$.apply(Try.scala:191)
at
akka.actor.ReflectiveDynamicAccess.getClassFor(DynamicAccess.scala:66)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:112)
... 29 more
18:24:34.702 [hz._hzInstance_1_dev.partition-operation.thread-1]
ERROR c.h.map.impl.operation.SetOperation - [192.168.15.20]:5701 [dev]
[3.5] Could not start logger due to [akka.ConfigurationException:
Logger specified in config can't be loaded
[akka.event.slf4j.Slf4jLogger] due to
[java.lang.ClassNotFoundException: akka.event.slf4j.Slf4jLogger]]
akka.ConfigurationException: Could not start logger due to
[akka.ConfigurationException: Logger specified in config can't be
loaded [akka.event.slf4j.Slf4jLogger] due to
[java.lang.ClassNotFoundException: akka.event.slf4j.Slf4jLogger]]
at
akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:143)
~[akka-actor_2.11-2.3.6.jar:na]
at
akka.event.EventStream.startDefaultLoggers(EventStream.scala:26)
~[akka-actor_2.11-2.3.6.jar:na]
at
akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:622)
~[akka-actor_2.11-2.3.6.jar:na]
at
akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:618)
~[akka-actor_2.11-2.3.6.jar:na]
help please
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google
Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
Read the docs: http://akka.io/docs/
Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.