5 Replies Latest reply: Apr 25, 2012 9:54 AM by joe_boy12 RSS

Do we always have to write some action class when we are using all the Out-of-the-Box Actions in the jboss-esb.xml

Viral Gohel Newbie

Hi,

 

I am referring to the EJBProcessor Quickstart and trying to develop a similar .esb archive. What i want to ask is that is it mandatory to include some action class in the action processing pipeline ?

I am only using the org.jboss.soa.esb.actions.EJBProcessor alongwith all the properties. I have developed a Stateless EJB and this is already deplyed in my server.

 

The .esb archive i am making is unable deploy and it gives the following such exception in the server console.

 

org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Error configuring action processing pipeline

          at org.jboss.soa.esb.listeners.message.MessageAwareListener.doInitialise(MessageAwareListener.java:192)

          at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)

          at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:109)

          at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:66)

          at org.jboss.soa.esb.listeners.deployers.mc.EsbDeployment.start(EsbDeployment.java:232)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:616)

          at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)

          at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)

          at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)

          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:243)

          at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)

          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:111)

          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)

          at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)

          at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

          at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)

          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:125)

          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:52)

          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)

          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

          at java.lang.Thread.run(Thread.java:679)

Caused by: org.jboss.soa.esb.ConfigurationException: Unexpected exception during lifecycle initialisation

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.initialise(ActionProcessingPipeline.java:396)

          at org.jboss.soa.esb.listeners.message.MessageAwareListener.doInitialise(MessageAwareListener.java:188)

          ... 57 more

Caused by: org.jboss.soa.esb.actions.ActionLifecycleException: Got an error while processing EJB printMessage

          at org.jboss.soa.esb.actions.EJBProcessor.initialise(EJBProcessor.java:293)

          at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.initialise(OverriddenActionLifecycleProcessor.java:123)

          at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.initialise(ActionProcessingPipeline.java:391)

          ... 58 more

Caused by: org.jboss.soa.esb.actions.ActionLifecycleException: Could not create a new InitialContext with properties : {java.naming.provider.url=localhost:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContext}

          at org.jboss.soa.esb.actions.EJBProcessor.getInitialContext(EJBProcessor.java:378)

          at org.jboss.soa.esb.actions.EJBProcessor.ejbInitialise(EJBProcessor.java:334)

          at org.jboss.soa.esb.actions.EJBProcessor.initialise(EJBProcessor.java:289)

          ... 60 more

Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContext [Root exception is java.lang.InstantiationException: org.jnp.interfaces.NamingContext]

          at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)

          at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)

          at javax.naming.InitialContext.init(InitialContext.java:240)

          at javax.naming.InitialContext.<init>(InitialContext.java:214)

          at org.jboss.soa.esb.actions.EJBProcessor.getInitialContext(EJBProcessor.java:375)

          ... 62 more

Caused by: java.lang.InstantiationException: org.jnp.interfaces.NamingContext

          at java.lang.Class.newInstance0(Class.java:357)

          at java.lang.Class.newInstance(Class.java:325)

          at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)

          ... 66 more

 

Can anyone let me know what is the problem ?

Do we need to include some action classes for this ?

 

Attached is the jboss-esb.xml for reference.

 

Regards,

  • 2. Re: Do we always have to write some action class when we are using all the Out-of-the-Box Actions in the jboss-esb.xml
    Viral Gohel Newbie

    Hi Joe,

     

    The EJB is already deployed in my SOA Server with its relevant jar. It is a simple SLSB which has 2 methods, printMessage() --- which accepts a String parameter and prints the same and another method sayConsole()  which return some string and outputs the same to the console.

     

    I am making a seperate .esb archive with the configuration as in jboss-esb.xml where i am not specifying any action classes in the pipeline, because there is no need to.

    But when i deploy the .esb achive, i am not able to deploy and get the above exception stack trace.

     

    Can anyone let me know what causes these things ?

     

    Thanks,

  • 3. Re: Do we always have to write some action class when we are using all the Out-of-the-Box Actions in the jboss-esb.xml
    joe_boy12 Novice

    try this

     

    <property name="jndi-name" value="StatelessBean_for_ESB/local" />

    <property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory" />

     

    Joe

  • 4. Re: Do we always have to write some action class when we are using all the Out-of-the-Box Actions in the jboss-esb.xml
    Viral Gohel Newbie

    Hi Joe,

     

    Thanks, but stil no success. Do i need to place the EJB class directories inside the .esb archive. (think that would be lumb).

    The EJB is already deployed as my server console shows :

     

    12:39:24,596 INFO  [JBossASKernel] Created KernelDeployment for: Stateless_For_ESB.jar

    12:39:24,599 INFO  [JBossASKernel] installing bean: jboss.j2ee:jar=Stateless_For_ESB.jar,name=StatelessBean_for_ESB,service=EJB3

    12:39:24,599 INFO  [JBossASKernel]   with dependencies:

    12:39:24,599 INFO  [JBossASKernel]   and demands:

    12:39:24,600 INFO  [JBossASKernel]           jboss.ejb:service=EJBTimerService

    12:39:24,600 INFO  [JBossASKernel]   and supplies:

    12:39:24,600 INFO  [JBossASKernel]           jndi:StatelessBean_for_ESB/remote

    12:39:24,600 INFO  [JBossASKernel]           jndi:StatelessBean_for_ESB/local-ws.Stateless_for_ESB

    12:39:24,600 INFO  [JBossASKernel]           jndi:StatelessBean_for_ESB/local

    12:39:24,600 INFO  [JBossASKernel]           Class:ws.Stateless_for_ESB

    12:39:24,600 INFO  [JBossASKernel] Added bean(jboss.j2ee:jar=Stateless_For_ESB.jar,name=StatelessBean_for_ESB,service=EJB3) to KernelDeployment of: Stateless_For_ESB.jar

    12:39:25,082 INFO  [SessionSpecContainer] Starting jboss.j2ee:jar=Stateless_For_ESB.jar,name=StatelessBean_for_ESB,service=EJB3

    12:39:25,092 INFO  [EJBContainer] STARTED EJB: ws.StatelessBean_for_ESB ejbName: StatelessBean_for_ESB

    12:39:25,156 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

     

     

              StatelessBean_for_ESB/local - EJB3.x Default Local Business Interface

              StatelessBean_for_ESB/local-ws.Stateless_for_ESB - EJB3.x Local Business Interface

     

    I wonder that it will be really lumb, if we cannot make/have our own ESB project that does the same thing instead of running couple of ANT tasks from the quickstarts and running the same.

     

    Any more suggestions please ??

    What am i doing wrong here ?

     

    Regards,

    Viral

  • 5. Re: Do we always have to write some action class when we are using all the Out-of-the-Box Actions in the jboss-esb.xml
    joe_boy12 Novice

    well that should have worked - is this the same exception again or different one? you dont need to bundle EJB in .esb - as long as the EJB is bound and esb actions are able to do lookup. Is the provider-url correct? check the naming host and port on jmx-console one more time - is it really localhost:1099 or something else?