akka - camel - osgi

516 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Christophe Pache

ungelesen,
22.10.2012, 09:14:2022.10.12
an akka...@googlegroups.com
Hello everyone,

I haven't seen any body complaining about that, so I'm either lost or alone in this situation. Camel complains while being loaded in OSGi (karaf actually) through the akka-camel module:
 org.apache.camel.RuntimeCamelException: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find package names to be used for classpath scanning for annotated type converters.
I searched a little bit and I got something : Camel is using reflection to discover TypeConverters and I would think this is the cause of my error. I would really be interested into knowing if you get likable issues.

Thanks in advance, by the way, Akka-actor integration is really fine in OSGi, so thanks for your effort.


nb: I'm using akka 2.1-M2, camel 2.10.1, karaf 2.3

Best regards

Christophe

√iktor Ҡlang

ungelesen,
22.10.2012, 09:18:4822.10.12
an akka...@googlegroups.com
Hi Christophe,

isn't that more a question for either Camel or OSGi?

Cheers,




Christophe

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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 post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
 
 



--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: @viktorklang

Christophe Pache

ungelesen,
24.10.2012, 06:15:1124.10.12
an akka...@googlegroups.com


Le lundi 22 octobre 2012 15:18:50 UTC+2, √ a écrit :
Hi Christophe,

isn't that more a question for either Camel or OSGi?

You are true! I forgot to load the osgi camel bundle. I'm just to junior for OSGi.
Thanks


I'm now getting strange errors :
java.lang.VerifyError: (class: io/xtech/akka/osgi/Consumer1, method: onRouteDefinition signature: (Lorg/apache/camel/model/RouteDefinition;)Lorg/apache/camel/model/ProcessorDefinition;) Incompatible argument to function
I thinks this is due to bad compilation, especially from the VerifyError type. I'm working on this one, but if you have any idea, thanks in advance.

by the way, a huge thanks for the osgification of akka! Really useful in my case.

Best

Christophe

Cheers,


Christophe Pache

ungelesen,
24.10.2012, 07:13:3824.10.12
an akka...@googlegroups.com
It seams to be due to a bad camel version. Most probably comming from my configuration.

Christophe Pache

ungelesen,
24.10.2012, 09:57:3824.10.12
an akka...@googlegroups.com
So, yes, it was some version error: I was compiling with akka-camel:2.1-M7 but I was expecting akka-camel:2-1-RC1.
This is corrected.

I keep getting problems, integrating a tiny test (actually only one file Consumer) into OSGi: at the same time, the akka-camel config is not found even if it is in the akka-camel bundle and I get the following error
akka.actor.InvalidActorNameException: actor name camel-supervisor is not unique!
Which seams to say akka-camel is used twice or some likable issue. Any idea on those points would be great.

Thanks

Christophe

Raymond Roestenburg

ungelesen,
25.10.2012, 03:34:2225.10.12
an akka...@googlegroups.com
Can you share some of the code that you are using?
there is one camel supervisor per actorsystem, I'm interested to know how you got to this problem. 
Thanks

Christophe

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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 post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
 
 



--
Raymond Roestenburg

Christophe Pache

ungelesen,
25.10.2012, 06:59:1525.10.12
an akka...@googlegroups.com
Thanks, Raymond, for being interested. I should already have post some pasties, sorry for having wait.
I have an empty application.conf, as I want to be sure the reference.conf from akka-actor and akka-camel bundles will be read.
I would add the order of the errors may change (see below)

class Activator extends ActorSystemActivator {

  def configure(context: BundleContext, system: ActorSystem) {
    registerService(context, system)
    val consumer = system.actorOf(Props[Consumer1])
    consumer
  }
}

class Consumer1 extends Actor with Consumer {
  def endpointUri = "file:///tmp/akka"

  def receive = {
    case x => println("received " + x.toString)
  }
}

Running in Karaf with scala-2.10-RC1, akka-2.10-RC1 (2.1-SNAPSHOT),  with the camel feature, the akka-actor, akka-osgi and akka-camel bundles.

karaf>list
   ID   State         Blueprint      Level  Name
[ 103] [Active     ] [            ] [   80] com.typesafe.akka.osgi (2.2.0.SNAPSHOT)
[ 104] [Active     ] [            ] [   80] com.typesafe.akka.actor (2.2.0.SNAPSHOT)
[ 105] [Active     ] [            ] [   80] com.typesafe.akka.actor (2.1.0.SNAPSHOT)
[ 106] [Active     ] [            ] [   80] scala-library (2.10.0.RC1)
[ 114] [Active     ] [            ] [   80] com.typesafe.akka.camel (2.1.0.SNAPSHOT)
[ 129] [Active     ] [            ] [   50] camel-core (2.10.2)
[ 130] [Active     ] [Created     ] [   50] camel-karaf-commands (2.10.2)
[ 131] [Installed     ] [            ] [   80] my.akka.bundle (3.0.0.SNAPSHOT)
[ 132] [Active     ] [            ] [   80] com.typesafe.config (1.0.0)
karaf>start 131

[ERROR] [10/25/2012 13:01:19.192] [bundle-131-ActorSystem-akka.actor.default-dispatcher-4] [akka://bundle-131-ActorSystem/user/camel-supervisor] error while processing Create(55829816)
802f9f18-b8e0-4528-a018-01ef766c89e0akka.actor.ActorInitializationException: exception during creation
    at akka.actor.ActorInitializationException$.apply(Actor.scala:169)
    at akka.actor.ActorCell.create(ActorCell.scala:479)
    at akka.actor.ActorCell.systemInvoke(ActorCell.scala:334)
    at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:256)
    at akka.dispatch.Mailbox.run(Mailbox.scala:211)
    at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:502)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:262)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1478)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Caused by: 18aa0f71-e367-497f-beb8-1e7acd8f9ee3akka.actor.InvalidActorNameException: actor name camel-supervisor is not unique!
    at akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:119)
    at akka.actor.dungeon.Children$class.reserveChild(Children.scala:73)
    at akka.actor.ActorCell.reserveChild(ActorCell.scala:289)
    at akka.actor.dungeon.Children$class.makeChild(Children.scala:181)
    at akka.actor.dungeon.Children$class.attachChild(Children.scala:43)
    at akka.actor.ActorCell.attachChild(ActorCell.scala:289)
    at akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:513)
    at akka.camel.internal.DefaultCamel.<init>(DefaultCamel.scala:29)
    at akka.camel.CamelExtension$.createExtension(Camel.scala:126)
    at akka.camel.CamelExtension$.createExtension(Camel.scala:120)
    at akka.actor.ActorSystemImpl.liftedTree1$1(ActorSystem.scala:652)
    at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:651)
    at akka.actor.ExtensionId$class.apply(Extension.scala:36)
    at akka.camel.CamelExtension$.apply(Camel.scala:120)
    at akka.camel.CamelSupport$class.$init$(CamelSupport.scala:13)
    at akka.camel.internal.CamelSupervisor.<init>(CamelSupervisor.scala:18)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at akka.util.Reflect$.instantiate(Reflect.scala:39)
    at akka.actor.FromClassCreator.apply(Props.scala:187)
    at akka.actor.FromClassCreator.apply(Props.scala:186)
    at akka.actor.ActorCell.newActor(ActorCell.scala:444)
    at akka.actor.ActorCell.create(ActorCell.scala:462)
    ... 8 more

[ERROR] [10/25/2012 13:01:19.236] [bundle-131-ActorSystem-akka.actor.default-dispatcher-2] [akka://bundle-131-ActorSystem/user/$b] error while processing Create(-1916153417)
c3efd11d-aabd-49c1-92d1-8a31dcb15b1dakka.actor.ActorInitializationException: exception during creation
    at akka.actor.ActorInitializationException$.apply(Actor.scala:169)
    at akka.actor.ActorCell.create(ActorCell.scala:479)
    at akka.actor.ActorCell.systemInvoke(ActorCell.scala:334)
    at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:256)
    at akka.dispatch.Mailbox.run(Mailbox.scala:211)
    at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:502)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:262)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1478)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.camel'
    at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:115)
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:138)
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:142)
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:150)
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:155)
    at com.typesafe.config.impl.SimpleConfig.getConfigNumber(SimpleConfig.java:170)
    at com.typesafe.config.impl.SimpleConfig.getNumber(SimpleConfig.java:176)
    at com.typesafe.config.impl.SimpleConfig.getLong(SimpleConfig.java:187)
    at com.typesafe.config.impl.SimpleConfig.getNanoseconds(SimpleConfig.java:248)
    at com.typesafe.config.impl.SimpleConfig.getMilliseconds(SimpleConfig.java:239)
    at akka.camel.CamelSettings.<init>(Camel.scala:64)
    at akka.camel.internal.DefaultCamel.<init>(DefaultCamel.scala:45)
    at akka.camel.CamelExtension$.createExtension(Camel.scala:126)
    at akka.camel.CamelExtension$.createExtension(Camel.scala:120)
    at akka.actor.ActorSystemImpl.liftedTree1$1(ActorSystem.scala:652)
    at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:651)
    at akka.actor.ExtensionId$class.apply(Extension.scala:36)
    at akka.camel.CamelExtension$.apply(Camel.scala:120)
    at akka.camel.CamelSupport$class.$init$(CamelSupport.scala:13)
    at io.xtech.akka.osgi.Consumer1.<init>(Activator.scala:59)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at akka.util.Reflect$.instantiate(Reflect.scala:39)
    at akka.actor.FromClassCreator.apply(Props.scala:187)
    at akka.actor.FromClassCreator.apply(Props.scala:186)
    at akka.actor.ActorCell.newActor(ActorCell.scala:444)
    at akka.actor.ActorCell.create(ActorCell.scala:462)
    ... 8 more

Raymond Roestenburg

ungelesen,
26.10.2012, 07:32:5626.10.12
an akka...@googlegroups.com
Hi Christophe, 

What does this registerService method do?

Christophe Pache

ungelesen,
26.10.2012, 09:01:3426.10.12
an akka...@googlegroups.com


Le vendredi 26 octobre 2012 13:33:03 UTC+2, Raymond Roestenburg a écrit :
Hi Christophe, 

What does this registerService method do?


from the akka.osgi module:
  /**
   * Register the actor system in the OSGi service registry.  The activator itself will ensure that this service
   * is unregistered again when the bundle is being stopped.
   *
   * Only one ActorSystem can be registered at a time, so any previous registration will be unregistered prior to registering the new.
   *
   * @param context the bundle context
   * @param system the actor system
   */
  def registerService(context: BundleContext, system: ActorSystem): Unit = {
    registration.foreach(_.unregister()) //Cleanup
    val properties = new Properties()
    properties.put("name", system.name)
    registration = Some(context.registerService(classOf[ActorSystem].getName, system,
      properties.asInstanceOf[Dictionary[String, Any]]))
  }
It registers the ActorSystem as an OSGi service.

The BundleContext.registerService comments (from the org.osgi.framework) :
/**
     * Registers the specified service object with the specified properties
     * under the specified class name with the Framework.
     *
     * <p>
     * This method is otherwise identical to
     * {@link #registerService(String[], Object, Dictionary)} and is provided as
     * a convenience when {@code service} will only be registered under a single
     * class name. Note that even in this case the value of the service's
     * {@link Constants#OBJECTCLASS} property will be an array of string, rather
     * than just a single string.
     *
     * @param clazz The class name under which the service can be located.
     * @param service The service object or a {@code ServiceFactory} object.
     * @param properties The properties for this service.
     * @return A {@code ServiceRegistration} object for use by the bundle
     *         registering the service to update the service's properties or to
     *         unregister the service.
     * @throws IllegalStateException If this BundleContext is no longer valid.
     * @see #registerService(String[], Object, Dictionary)
     */
    ServiceRegistration< ? > registerService(String clazz, Object service,
            Dictionary<String, ? > properties);

√iktor Ҡlang

ungelesen,
26.10.2012, 09:07:3226.10.12
an akka...@googlegroups.com
There's most likely a problem where you get Camel loaded in multiple ClassLoaders and since the Akka Extension caching relies on the Class-identity you get a conflict.

Cheers,


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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 post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
 
 



--

Christophe Pache

ungelesen,
26.10.2012, 10:34:3526.10.12
an akka...@googlegroups.com
Thanks Viktor, you point it out, it's exaclty that.

And by the way, we need to have in an OSGi, at the same time, the CamelExtension and Camel.

Please correct me if I'm wrong but I think you are trying to wrapp Camel into the akka-camel module to provide every Camel Components (and the actor one, of course) in the ActorSystem. You are focusing on people using Camel through Akka and not the reverse. I fully understand this point of view, it's a rich feature allowing Akka application to use Camel Endpoints.

I would need to be able to inject a CamelContext into the CamelExtension (to be able to use a CamelContext from another bundle). For example, this part, coming from akka.camel.internal.DefaultCamel, would be modified.


  lazy val context: DefaultCamelContext = {
    val ctx = new DefaultCamelContext
    if (!settings.JmxStatistics) ctx.disableJMX()
    ctx.setName(system.name)
    ctx.setStreamCaching(settings.StreamingCache)
    ctx.addComponent("akka", new ActorComponent(this, system))
    ctx.getTypeConverterRegistry.addTypeConverter(classOf[FiniteDuration], classOf[String], DurationTypeConverter)
    ctx
  }
To use, by example, Dependency Injection to take one existing CamelContext. I know this is not really popular approach, but may be interesting for people that want to add Akka application in OSGi containers containing already CamelContext.

Thanks a lot for your advice and support.If you want more detail, it's a pleasure to discuss the possibilities of other osgification for akka-camel.

All the best,

Christophe

√iktor Ҡlang

ungelesen,
26.10.2012, 10:42:1826.10.12
an akka...@googlegroups.com
On Fri, Oct 26, 2012 at 4:34 PM, Christophe Pache <chp...@gmail.com> wrote:
Thanks Viktor, you point it out, it's exaclty that.

And by the way, we need to have in an OSGi, at the same time, the CamelExtension and Camel.

Please correct me if I'm wrong but I think you are trying to wrapp Camel into the akka-camel module to provide every Camel Components (and the actor one, of course) in the ActorSystem. You are focusing on people using Camel through Akka and not the reverse. I fully understand this point of view, it's a rich feature allowing Akka application to use Camel Endpoints.

I would need to be able to inject a CamelContext into the CamelExtension (to be able to use a CamelContext from another bundle). For example, this part, coming from akka.camel.internal.DefaultCamel, would be modified.

You wouldn't need that, just use Camel to communicate between CamelContexts.
We'll never be able for the user to specify his/her own CamelContext into the CamelExtension simply because there is no single point of creation for it.

Cheers,
 


  lazy val context: DefaultCamelContext = {
    val ctx = new DefaultCamelContext
    if (!settings.JmxStatistics) ctx.disableJMX()
    ctx.setName(system.name)
    ctx.setStreamCaching(settings.StreamingCache)
    ctx.addComponent("akka", new ActorComponent(this, system))
    ctx.getTypeConverterRegistry.addTypeConverter(classOf[FiniteDuration], classOf[String], DurationTypeConverter)
    ctx
  }
To use, by example, Dependency Injection to take one existing CamelContext. I know this is not really popular approach, but may be interesting for people that want to add Akka application in OSGi containers containing already CamelContext.

Thanks a lot for your advice and support.If you want more detail, it's a pleasure to discuss the possibilities of other osgification for akka-camel.

All the best,

Christophe
Le vendredi 26 octobre 2012 15:07:35 UTC+2, √ a écrit :
There's most likely a problem where you get Camel loaded in multiple ClassLoaders and since the Akka Extension caching relies on the Class-identity you get a conflict.

Cheers,

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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 post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
 
 

Raymond Roestenburg

ungelesen,
26.10.2012, 13:34:1126.10.12
an akka...@googlegroups.com
You can of course get the DefaultCamelContext from the camel extension and modify it. (like for instance set the Registry etc) 

Christophe Pache

ungelesen,
27.10.2012, 03:49:1827.10.12
an akka...@googlegroups.com
Thanks, Raymond

I think I'll need to do it. I still need to understand more accurately how the DefaultCamelContext is used and when. Otherwise (if it is not possible to replace correctly it), I should try to connect directly to the actor component (hopefully not...).

Thank to you both for helping.

Best regards

Christophe

Arjun Panday

ungelesen,
21.11.2013, 10:35:0021.11.13
an akka...@googlegroups.com
Hi,
I just found this old post as I'm trying something very similar. 
I have the following code, that I run in Felix:

class Activator extends ActorSystemActivator
{
  def configure(bundleContext: BundleContext, system: ActorSystem): Unit = 
  {
    system.actorOf(Props[FileConsumer])
  }
}

class FileConsumer extends Consumer 
{
  def endpointUri = "file:/tmp/camel-in?noop=true"
 
  def receive = {
    case CamelMessage(body,headers) => println( s"got msg: $body | $headers" )
  }
}

It runs fine if I use akka 2.2.3, but with akka 2.1.4, it compiles all the same, but i run into the same issue as Christophe (detailed below)
Don't ask why I must use akka 2.1, but should I be doing something different in this version?

Starting Felix with 
ap.test.osgi-camel-akka-0.0.1.jar
camel-core-2.12.1.jar
akka-camel_2.10-2.1.4.jar
akka-osgi_2.10-2.1.4.jar
akka-actor_2.10-2.1.4.jar
config-1.0.2.jar
slf4j-api-1.7.5.jar
slf4j-log4j12-1.7.5.jar
log4j-1.2.17.jar
org.osgi.compendium-5.0.0.jar
scala-library-2.10.3.jar

[ERROR] [11/21/2013 16:28:15.077] [bundle-1-ActorSystem-akka.actor.default-dispatcher-4] [akka://bundle-1-ActorSystem/user/camel-supervisor] error while processing Create(-1497307468)
d3238124-7959-41ea-896b-4b12a79037c5akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:170)
at akka.actor.ActorCell.create(ActorCell.scala:496)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:351)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:256)
at akka.dispatch.Mailbox.run(Mailbox.scala:211)
at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: 22f78687-ea62-4609-803b-5925a9d5cae1akka.actor.InvalidActorNameException: actor name camel-supervisor is not unique!
at akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:119)
at akka.actor.dungeon.Children$class.reserveChild(Children.scala:78)
at akka.actor.ActorCell.reserveChild(ActorCell.scala:306)
at akka.actor.dungeon.Children$class.makeChild(Children.scala:182)
at akka.actor.dungeon.Children$class.attachChild(Children.scala:43)
at akka.actor.ActorCell.attachChild(ActorCell.scala:306)
at akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:510)
at akka.camel.internal.DefaultCamel.<init>(DefaultCamel.scala:32)
at akka.camel.CamelExtension$.createExtension(Camel.scala:126)
at akka.camel.CamelExtension$.createExtension(Camel.scala:120)
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:649)
at akka.actor.ExtensionId$class.apply(Extension.scala:36)

[ERROR] [11/21/2013 16:28:15.080] [bundle-1-ActorSystem-akka.actor.default-dispatcher-2] [akka://bundle-1-ActorSystem/user/$a] error while processing Create(1321666067)
174638bc-b66c-4dd7-ab7e-3368c90a0b99akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:170)
at akka.actor.ActorCell.create(ActorCell.scala:496)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:351)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:256)
at akka.dispatch.Mailbox.run(Mailbox.scala:211)
at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.camel'
at com.typesafe.config.impl.SimpleConfig.findKey(Simpg.java:115)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:138)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:142)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:150)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:155)
at com.typesafe.config.impl.SimpleConfig.getConfigNumber(SimpleConfig.java:170)
at com.typesafe.config.impl.SimpleConfig.getNumber(SimpleConfig.java:176)
at com.typesafe.config.impl.SimpleConfig.getLong(SimpleConfig.java:187)
at com.typesafe.config.impl.SimpleConfig.getNanoseconds(SimpleConfig.java:248)
at com.typesafe.config.impl.SimpleConfig.getMilliseconds(SimpleConfig.java:239)
at akka.camel.CamelSettings.<init>(Camel.scala:64)
at akka.camel.internal.DefaultCamel.<init>(DefaultCamel.scala:48)
at akka.camel.CamelExtension$.createExtension(Camel.scala:126)
at akka.camel.CamelExtension$.createExtension(Camel.scala:120)
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:649)
at akka.actor.ExtensionId$class.apply(Extension.scala:36)
at akka.camel.CamelExtension$.apply(Camel.scala:120)
at akka.camel.CamelSupport$class.$init$(CamelSupport.scala:16)
at ap.test.akkamel.FileConsumer.<init>(Akkamel.scala:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at akka.util.Reflect$.instantiate(Reflect.scala:39)
at akka.actor.FromClassCreator.apply(Props.scala:181)
at akka.actor.FromClassCreator.apply(Props.scala:180)
at akka.actor.ActorCell.newActor(ActorCell.scala:461)
at akka.actor.ActorCell.create(ActorCell.scala:479)
... 8 more


Best regards,
Arjun

Patrik Nordwall

ungelesen,
22.11.2013, 06:13:4222.11.13
an akka...@googlegroups.com
Hi Arjun,

This error: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.camel'
indicates that the reference.conf for akka-camel is not loaded.
It should be included in akka-osgi_2.10-2.1.4.jar.

akka-osgi_2.10-2.1.4.jar should replace akka-actor_2.10-2.1.4.jar in an osgi environment.
It looks like you have both in the classpath.

/Patrik



To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.

To post to this group, send email to akka...@googlegroups.com.



--

Patrik Nordwall
Typesafe Reactive apps on the JVM
Twitter: @patriknw

Arjun Panday

ungelesen,
22.11.2013, 08:26:5922.11.13
an akka...@googlegroups.com
Hi Patrick,

Thanks your response. 
The akka-osgi bundle I have contains only the akka.osgi package, not the core of akka-actors; I can't remove it or I'm missing the required akka.actor package.

I get my akka bundles from the maven central repository:
org.apache.camel:camel-core:2.12.1
com.typesafe.akka:akka-camel_2.10:2.1.4
com.typesafe.akka:akka-osgi_2.10:2.1.4
com.typesafe:config:1.0.2

/Arjun

Cordialement

--

Arjun PANDAY
Developer | Kyriba

Mobile: +33 687 380 180
www.kyriba.com | Twitter | LinkedIn



You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/WsEbsOlcmBM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.

Patrik Nordwall

ungelesen,
22.11.2013, 08:42:5122.11.13
an akka...@googlegroups.com
On Fri, Nov 22, 2013 at 2:26 PM, Arjun Panday <apa...@kyriba.com> wrote:
Hi Patrick,

Thanks your response. 
The akka-osgi bundle I have contains only the akka.osgi package, not the core of akka-actors; I can't remove it or I'm missing the required akka.actor package.

Ah, I missed that you are using akka version 2.1.4.
In 2.2.3 it contains all classes from akka-actors, and reference.conf files from all akka modules.

I must admit that I don't know how it is supposed to work with 2.1.4. Somehow you must include the akka-camel reference.conf.
You can download http://repo1.maven.org/maven2/com/typesafe/akka/akka-osgi_2.10/2.2.3/akka-osgi_2.10-2.2.3.jar to see how all conf files are included in the reference.conf in that bundle.

/Patrik
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten