1 Reply Latest reply on Jul 23, 2008 9:21 AM by Richard Thomas

    Deploying Event Listener (JBoss5 B4)

    Richard Thomas Newbie

      Hi

      I have an EventListener that receives its events from a Resource Adapter which is connected to an external application. This all works fine, but as we move towards a clustered solution, the EventListener needs to be deployed as an HASingleton.

      In order to achieve this, I have split out the Resource Adapter and the EventListener into two ear files separate from the main application. Because both the Resource Adapter ear and the Event Listener ear make references to EJBs within the main application ear file, the appropriate interfaces have been split out into a separate serviceinterfaces.jar module.

      Therefore, I have the following files to work with:
      resourceadapter-ds.xml
      resourceadapter.ear
      eventlistener.ear
      mainapplication.ear

      The three ear files all contain the serviceinterfaces.jar file, as well as other pertinent jars.

      I couldn't get the eventlistener.ear file to deploy inside the deploy-hasingleton folder, so decided to try hot deploying everything in the standard deploy folder. This gives me error messages, whereas deploying in the hasingleton folder didn't even cause the eventlistener.ear file to be mentioned in the logs.

      The order that I deploy is as follows:
      resourceadapter.ear
      resourceadapter-ds.xml
      eventlistener.ear

      At this stage, I receive the following in the log (my stuff is in the com.abc package):
      09:27:36,725 INFO [AppClientScanningDeployer] mainClass = class com.abc.eis.impl.EISImpl
      09:27:36,813 INFO [AppClientScanningDeployer] mainClass = class com.abc.eis.impl.EISImpl
      09:27:38,802 INFO [EISAdapter] EISAdapter started.
      09:27:38,806 INFO [EISAdapter] EISAdapter started.
      09:27:38,809 INFO [EISAdapter] EISAdapter started.
      09:27:53,905 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=eis/EIS' to JNDI name 'java:eis/EIS'
      09:28:09,125 INFO [AppClientScanningDeployer] mainClass = class com.abc.eis.impl.EISImpl
      09:28:09,470 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:ear=eventlistener.ear,jar=eventlistener.jar,name=EventListener,service=EJB3 with dependencies:
      09:28:09,470 INFO [MCKernelAbstraction] and demands:
      09:28:09,471 INFO [MCKernelAbstraction] jboss.jca:name='resourceadapter.ear#eisresourceadapter.rar',service=RARDeployment
      09:28:09,471 INFO [MCKernelAbstraction] jboss.ejb:service=EJBTimerService
      09:28:09,471 INFO [MCKernelAbstraction] and supplies:
      09:28:09,471 INFO [MCKernelAbstraction] Class:com.abc.def.eventlistener.IEventListener
      09:28:10,571 INFO [EJBContainer] STARTED EJB: com.abc.def.eventlistener.EventListener ejbName: EventListener
      09:28:10,654 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=eventlistener.ear,jar=eventlistener.jar,name=EventListener,service=EJB3 state=Create
      org.jboss.deployment.DeploymentException: MessagingType 'com.abc.def.eventlistener.IEventListener' not found in resource deployment jboss.jca:service=RARDeployment,name='resourceadapter.ear#resourceadapter.rar'
      at org.jboss.resource.deployers.RARDeployment.createActivationSpec(RARDeployment.java:310)
      at org.jboss.resource.deployers.RARDeployment.internalInvoke(RARDeployment.java:276)
      at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:294)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:192)
      at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:187)
      at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:151)
      at org.jboss.ejb3.mdb.MDB.start(MDB.java:123)
      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:585)
      at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56)
      at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
      at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:214)
      at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:69)
      at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:46)
      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:327)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:574)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
      at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:96)
      at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:90)
      at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:153)
      at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:352)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:413)
      at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:53)
      at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:37)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:906)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)
      09:28:10,668 WARN [HDScanner] Failed to process changes org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** CONTEXTS IN ERROR: Name -> Error
      jboss.j2ee:ear=eventlistener.ear,jar=eventlistener.jar,name=EventListener,service=EJB3 -> org.jboss.deployment.DeploymentException: MessagingType 'com.abc.def.eventlistener.IEventListener' not found in resource deployment jboss.jca:service=RARDeployment,name='resourceadapter.ear#resourceadapter.rar'
      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:291)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:595)

      So, for some reason it can't find the interface that the eventlistener implements. I know it's there, I've double and triple checked. I've also checked my application XMLs to make sure that the correct Jars are visible.

      I'm running JBoss 5 Beta 4 (our app won't yet deploy on CR1 due to other isuses) on Ubuntu 8.04.

      Thanks in advance for any help!

      Rich