Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MDB exception: InstanceNotFoundException wmq.jmsra.rar not registered.

 
Perry Langostine
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'm getting the following JBoss error with my MDB.

jboss.j2ee:ear=otisEAR.ear,jar=otisEJB.jar,name=IncomingMessageBean,service=EJB3 -> javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' is not registered.


I changed back to an EJB2 style MDB. The same error message appears.


Here's what I'm doing. Following this procedure:
http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html

Start with clean Jboss 5 install

rd /s c:\jboss-5.0.0.Beta4
unzip jboss-5.0.0.Beta4.zip

While jboss stopped
copy "C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqetclient.jar" C:\jboss-5.0.0.Beta4\server\default\lib

While jboss running
copy wmq.jmsra.rar C:\jboss-5.0.0.Beta4\server\default\deploy
output:
14:38:10,250 INFO [RARDeployment] Required license terms exist, view vfsfile:/C:/jboss-5.0.0.Beta4/server/default/deploy/wmq.jmsra.rar/META-INF/ra.xml

then
copy E:\dev\eCommerce\otis\wmq.jmsra-ds.xml C:\jboss-5.0.0.Beta4\server\default\deploy
output:
14:38:41,312 INFO [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'LPTestQueue'
14:38:41,406 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=IVTCF' to JNDI name 'java:IVTCF'

then deploy application (from MyEclipse).
Results in output fragment:
17:24:05,343 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:ear=otisEAR.ear,jar=otisEJB.jar,name=IncomingMessageBean,service=EJB3 with dependencies:
17:24:05,343 INFO [MCKernelAbstraction] and demands:
17:24:05,343 INFO [MCKernelAbstraction] jboss.ejb:service=EJBTimerService
17:24:05,343 INFO [MCKernelAbstraction] and supplies:
17:24:05,343 INFO [MCKernelAbstraction] Class:javax.jms.MessageListener
17:24:07,515 INFO [EJBContainer] STARTED EJB: test.service.ejb.IncomingMessageBean ejbName: IncomingMessageBean
17:24:07,687 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=otisEAR.ear,jar=otisEJB.jar,name=IncomingMessageBean,service=EJB3 state=Create
org.jboss.deployment.DeploymentException: Unable to create activation spec ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' messaging-type=javax.jms.MessageListener properties={destination=org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData@aac6440e{destination}, useJNDI=org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData@f7287ad0{useJNDI}, transportType=org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData@a8d93e03{transportType}, maxPoolDepth=org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData@3fca3f03{maxPoolDepth}, destinationType=org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData@96f19068{destinationType}}
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:299)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:246)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
at org.jboss.Main.boot(Main.java:208)
at org.jboss.Main$1.run(Main.java:534)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' is not registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:662)
at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:294)
... 56 more
17:24:07,796 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:ear=otisEAR.ear,jar=otisEJB.jar,name=ServiceDispatcherBean,service=EJB3 with dependencies:
17:24:07,796 INFO [MCKernelAbstraction] and demands:
17:24:07,796 INFO [MCKernelAbstraction] jboss.ejb:service=EJBTimerService
17:24:07,796 INFO [MCKernelAbstraction] and supplies:
17:24:07,796 INFO [MCKernelAbstraction] Class:test.service.IServiceDispatcher
17:24:10,203 INFO [EJBContainer] STARTED EJB: test.service.ejb.ServiceDispatcherBean ejbName: ServiceDispatcherBean
17:24:10,546 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=possumSybase15Dev' to JNDI name 'java ossumSybase15Dev'
17:24:10,687 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=bilbySybase119Legacy' to JNDI name 'java:bilbySybase119Legacy'
17:24:10,734 INFO [TomcatDeployment] deploy, ctxPath=/otis, vfsUrl=otisEAR.ear/otisWeb.war
17:24:17,000 INFO [[/otis]] Initializing Spring root WebApplicationContext
17:24:17,000 INFO [ContextLoader] Root WebApplicationContext: initialization started
17:24:17,031 INFO [XmlWebApplicationContext] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@102dfd9: display name [Root WebApplicationContext]; startup date [Fri Jun 06 17:24:17 EST 2008]; root of context hierarchy
17:24:17,078 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
17:24:17,515 INFO [XmlWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@102dfd9]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1ffc401
17:24:17,546 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1ffc401: defining beans [possumSybase15Dev,bilbySybase119Legacy,otisLogicalDataSource,bilbyLogicalDataSource,serviceConfiguration,sampleService,webConfiguration]; root of factory hierarchy
17:24:17,734 INFO [ContextLoader] Root WebApplicationContext: initialization completed in 719 ms
17:24:17,859 INFO [RARDeployment] Required license terms exist, view vfsfile:/C:/jboss-5.0.0.Beta4/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
17:24:17,953 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
17:24:17,968 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
17:24:17,968 INFO [RAMJobStore] RAMJobStore initialized.
17:24:17,968 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
17:24:17,968 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
17:24:17,968 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
17:24:18,031 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
17:24:19,593 INFO [RARDeployment] Required license terms exist, view vfsfile:/C:/jboss-5.0.0.Beta4/server/default/deploy/wmq.jmsra.rar/META-INF/ra.xml
17:24:20,375 INFO [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'wsmq/LPTestQ'
17:24:20,468 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=MQCF' to JNDI name 'java:MQCF'
17:24:20,546 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

*** CONTEXTS IN ERROR: Name -> Error

jboss.j2ee:ear=otisEAR.ear,jar=otisEJB.jar,name=IncomingMessageBean,service=EJB3 -> javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' is not registered.


17:24:20,796 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
17:24:20,921 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
17:24:20,953 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.Beta4 (build: SVNTag=JBoss_5_0_0_Beta4 date=200802091115)] Started in 2m:30s:250ms




contents of wmq.jmsra-ds.xml

<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>

<!-- JCA Connection factory definitions -->
<tx-connection-factory>
<jndi-name>MQCF</jndi-name>
<xa-transaction />
<rar-name>wmq.jmsra.rar</rar-name>
<connection-definition>javax.jms.ConnectionFactory</connection-definition>
<config-property name="channel" type="java.lang.String">SYSTEM.DEF.SVRCONN</config-property>
<config-property name="hostName" type="java.lang.String">127.0.0.1</config-property>
<config-property name="port" type="java.lang.String">1414</config-property>
<config-property name="queueManager" type="java.lang.String">QM_stg352670</config-property>
<config-property name="transportType" type="java.lang.String">CLIENT</config-property>
</tx-connection-factory>

<!-- mbeans defining JCA administered objects -->
<mbean code="org.jboss.resource.deployment.AdminObject" name="jca.wmq:name=wsmqLPTestQ">
<attribute name="JNDIName">wsmq/LPTestQ</attribute>
<depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
<attribute name="Type">javax.jms.Queue</attribute>
<attribute name="Properties">
baseQueueManagerName=QM_stg352670
baseQueueName=LPTestQ
</attribute>
</mbean>

</connection-factories>

EJB is

@MessageDriven
(
name = "IncomingMessageBean",
activationConfig =
{
@ActivationConfigProperty (propertyName = "destination", propertyValue = "wsmq/LPTestQ"),
@ActivationConfigProperty (propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty (propertyName = "transportType", propertyValue = "CLIENT"),
@ActivationConfigProperty (propertyName = "useJNDI", propertyValue = "true"),
@ActivationConfigProperty (propertyName = "maxPoolDepth", propertyValue = "1")
},
messageListenerInterface = MessageListener.class
)
@ResourceAdapter ("wmq.jmsra.rar")
public class IncomingMessageBean implements MessageListener
{
public void onMessage (Message msg)
{
}
}
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you have the wrong name for the mbean created for the rar. You have the following line in your wmq.jmsra-ds.xml file:



I question the use of the single quotes.

You could use the jmx-console to look up the actual name assigned to the rar.
 
Perry Langostine
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter

Thanks for your response. (Where would JBoss users be without your superb book!)

However, the config I am using is consistent with that in the article at http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html. Also, web searches such as this one tend to suggest that the single quotes are required.

Failing a direct resolution of my problem, can you point me to the definitive documentation of this XML voodoo for JBoss resource adapter config? Unfortunately, that's the one area that JBoss In Action doesn't deal with in any detail.

Thanks again.
 
Perry Langostine
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey again Peter. After a lot of experimentation, I've made some headway.

In the server logs, I can see that my MDB is loaded before the RAR for MQ. If I deploy my app after JBoss and the RAR are running, all is well. If I start JBoss with my app already deployed, I get an exception:

I believe I have set the dependencies up correctly:

JBoss 5 beta 4 doesn't seem to heed the dependency instructions in my mbean, excerpted here:


Is this a known issue, or am I doing something wrong here?

TIA.
Perry
 
Perry Langostine
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Turned out to be a JBoss startup dependency issue here:

http://jira.jboss.com/jira/browse/EJBTHREE-1199

Hope this helps others who follow.

Perry
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the 5.0 betas are notoriously bad when it comes to deploying apps in the proper order. Sorry I missed that you were running 5.0 or I would have suggested "start and then deploy" as a possible solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic