-
1. Re: Unable to invoke an EJB deployed on JBoss 7.1 from JBoss ESB 4.10
tcunning Sep 20, 2012 10:37 AM (in response to koevet)When you say you can successfully invoke the same EJB from a Java client, are you using libraries from JBoss AS 5 or JBoss AS 7?
Can you post a full stack trace?
-
2. Re: Unable to invoke an EJB deployed on JBoss 7.1 from JBoss ESB 4.10
koevet Sep 20, 2012 11:52 AM (in response to tcunning)Hi Tom,
the client invokation uses the AS 7 libraries.
This is the log I see when I deploy the EAR containing the Session Bean to AS 7 (all good here)
10:22:28,822 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "gwtbatis-ear.ear"
10:22:28,822 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "InvimallUserService.jar"
10:22:30,021 INFO [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015876: Starting deployment of "gwtibatis-ejb.jar"
10:22:30,134 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-7) JNDI bindings for session bean named UserServiceEJB in deployment unit subdeployment "gwtibatis-ejb.jar" of deployment "gwtbatis-ear.ear" are as follows:
java:global/gwtbatis-ear/gwtibatis-ejb/UserServiceEJB!com.aestasit.gwtibatis.UserServiceRemote
java:app/gwtibatis-ejb/UserServiceEJB!com.aestasit.gwtibatis.UserServiceRemote
java:module/UserServiceEJB!com.aestasit.gwtibatis.UserServiceRemote
java:jboss/exported/gwtbatis-ear/gwtibatis-ejb/UserServiceEJB!com.aestasit.gwtibatis.UserServiceRemote
java:global/gwtbatis-ear/gwtibatis-ejb/UserServiceEJB
java:app/gwtibatis-ejb/UserServiceEJB
java:module/UserServiceEJB
10:22:30,139 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-9) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
This is the stack trace from ESB 4.10
17:31:15,337 INFO [EsbDeployment] Starting ESB Deployment 'jbossesb-example-1.0.esb'
17:31:20,470 ERROR [AbstractKernelController] Error installing to Start: name=jboss.esb.vfszip:/Volumes/data/Users/luciano/tools/jboss-soa-p-5/jboss-as/server/default/deploy/jbossesb-example-1.0.esb/ state=Create
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.change(AbstractController.java:826)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
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:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
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)
... 61 more
Caused by: org.jboss.soa.esb.actions.ActionLifecycleException: Got an error while processing EJB login
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)
... 62 more
Caused by: org.jboss.soa.esb.actions.ActionLifecycleException: Could not lookup ejb:gwtbatis-ear/gwtibatis-ejb/UserServiceEJB!com.aestasit.gwtibatis.UserServiceRemote
at org.jboss.soa.esb.actions.EJBProcessor.getEjb3FromJndi(EJBProcessor.java:391)
at org.jboss.soa.esb.actions.EJBProcessor.ejbInitialise(EJBProcessor.java:339)
at org.jboss.soa.esb.actions.EJBProcessor.initialise(EJBProcessor.java:289)
... 64 more
Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:4447 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server localhost/127.0.0.1:4447 [Root exception is java.io.StreamCorruptedException: invalid stream header: 00000018]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.soa.esb.actions.EJBProcessor.getEjb3FromJndi(EJBProcessor.java:388)
... 66 more
Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server localhost/127.0.0.1:4447 [Root exception is java.io.StreamCorruptedException: invalid stream header: 00000018]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:327)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
... 70 more
Caused by: java.io.StreamCorruptedException: invalid stream header: 00000018
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:782)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:312)
... 71 more
This is the configured action:
<action name="EJBTestWithReturnValue" class="org.jboss.soa.esb.actions.EJBProcessor">
<property name="ejb3" value="true" />
<property name="method" value="login" />
<property name="jndi-name" value="ejb:gwtbatis-ear/gwtibatis-ejb/UserServiceEJB!com.aestasit.gwtibatis.UserServiceRemote" />
<property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory" />
<property name="security-principal" value="xxx" />
<property name="security-credentials" value="xxx" />
<property name="provider-url" value="localhost:4447" />
<property name="ejb-params">
<arg0 type="java.lang.String">username</arg0>
<arg1 type="java.lang.String">password</arg1>
</property>
<property name="esb-out-var" value="org.jboss.soa.esb.message.defaultEntry"/>
</action>
I have also tried to create a custom EJB invoker that uses the JBoss AS 7 client jar but it doesn't seem to work (some logging class issues)
Thanks
Luciano
-
3. Re: Unable to invoke an EJB deployed on JBoss 7.1 from JBoss ESB 4.10
tcunning Sep 21, 2012 10:54 AM (in response to koevet)My advice would be to try to get it to work with the AS 5 JARs independently with your java client. Maybe it is the JNDI name you are using (https://community.jboss.org/message/638692)?
If you get stuck trying to get the java client working with the AS 5 JARs backing it, I'd try throwing a post up on the AS 7 forum, where it's more likely to be seen by the AS 7 / EJB experts.