[jboss-user] Re: having problems getting started with JMS in JBoss 5 Beta 4

samk at twinix.com samk at twinix.com
Tue Oct 21 20:17:57 EDT 2008


See Thread at: http://www.techienuggets.com/Detail?tx=27049 Posted on behalf of a User

I have the same error on the same sample application.
20:03:35,794 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/C:/JBoss5/jboss-5.0.0.CR2/server/default/deploy/DexCenterQueueing2.ear state=Not Installed mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/C:/JBoss5/jboss-5.0.0.CR2/server/default/deploy/DexCenterQueueing2.ear/DexCenterQueueing2-ejb.jar
        at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
        at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:343)
        at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:303)
        at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:275)
        at org.jboss.deployment.JBossEjbParsingDeployer.createMetaData(JBossEjbParsingDeployer.java:105)
        at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:236)
        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1056)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
        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: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:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)

Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: jndi-name not found as a child of message-driven
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
        at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
        at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:199)
        at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
        at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
        at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
        at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
        at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
        at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:329)
        ... 29 more
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: jndi-name not found as a child of message-driven
        at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:400)
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
        ... 37 more
20:03:36,148 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

vfszip:/C:/JBoss5/jboss-5.0.0.CR2/server/default/deploy/DexCenterQueueing2.ear -> org.jboss.xb.binding.JBossXBRuntimeException: jndi-name not found as a child of message-driven


        at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:709)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:661)
        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: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:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)


Did you manage to solve the problem? 

thanks very much

In Response To: 

Hi,

I'm a newbie trying to get messaging to work in the jboss 5 beta 4. Having some problems which I tried to google-up and getting nowhere. Any hints from you folks are much appreciated. 

I modified destinations-service.xml to include my test queue definition.

  |    <mbean code="org.jboss.jms.server.destination.QueueService"
  |       name="jboss.messaging.destination:service=Queue,name=testQueue"
  |       xmbean-dd="xmdesc/Queue-xmbean.xml">
  |       <depends optional-attribute-name="ServerPeer">
  |                   jboss.messaging:service=ServerPeer
  |       </depends>
  |       <depends>jboss.messaging:service=PostOffice</depends>
  |       <attribute name="SecurityConfig">
  |          <security>
  |             <role name="guest" read="true" write="true"/>
  |             <role name="publisher" read="true" write="true" create="false"/>
  |             <role name="noacc" read="false" write="false" create="false"/>
  |          </security>
  |       </attribute>
  |    </mbean>
  | 

When I start jboss I see correctly that the queue is created:


  | 13:59:48,548 INFO  [QueueService] Queue[/queue/testQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  | 

I used NetBeans 6.0.1 to create EJB app. I added an MDB using the wizard and connected to to queue 'queue/testQueue'. 

My jboss.xml is:


  | <jboss>
  |   <enterprise-beans>
  |     <message-driven>
  |       <ejb-name>NewMessageBean</ejb-name>
  |       <jndi-name>NewMessageBean</jndi-name>      
  |       <destination-jndi-name>queue/testQueue</destination-jndi-name>
  |     </message-driven>
  |   </enterprise-beans>
  | </jboss>
  | 

the ejb-jar.xml is:


  | <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
  |   <enterprise-beans>
  |         <message-driven>
  |             <display-name>NewMessageMDB</display-name>
  |             <ejb-name>NewMessageBean</ejb-name>
  |             <ejb-class>org.rex.NewMessageBean</ejb-class>
  |             <transaction-type>Container</transaction-type>
  |             <message-destination-type>javax.jms.Queue</message-destination-type>
  |             <message-destination-link>testQueue</message-destination-link>
  |             <activation-config>
  |                 <activation-config-property>
  |                     <activation-config-property-name>acknowledgeMode</activation-config-property-name>
  |                     <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
  |                 </activation-config-property>
  |                 <activation-config-property>
  |                     <activation-config-property-name>destinationType</activation-config-property-name>
  |                     <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
  |                 </activation-config-property>
  |             </activation-config>
  |         </message-driven>
  |         </enterprise-beans>
  |     <assembly-descriptor>
  |         <container-transaction>
  |             <method>
  |                 <ejb-name>NewMessageBean</ejb-name>
  |                 <method-name>*</method-name>
  |             </method>
  |             <trans-attribute>Required</trans-attribute>
  |         </container-transaction>
  |         <message-destination>
  |             <display-name>Destination for NewMessageMDB</display-name>
  |             <message-destination-name>testQueue</message-destination-name>
  |         </message-destination>
  |         </assembly-descriptor>
  |     </ejb-jar>
  | 

Looks like NetBeans is not yet compatible with jboss 5: you can't register servers (domain drop-down ends up being empty) and so you can't do deployments from NetBeans. So here is what I did to manually deploy my test app: I build the .jar and put it under  server/default/deploy and I see the server starting the deployment. I see the exception shown below and that's where I am getting stuck:

exception:   jndi-name not found as a child of message-driven

details:


  | 15:19:51,173 ERROR [AbstractKernelController] Error installing to Parse: name=vfsfile:/usr/local/jboss-5.0.0.Beta4/server/default/deploy/Test1-ejb.jar state=Not Installed m
  | ode=Manual requiredState=Parse
  | org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/usr/local/jboss-5.0.0.Beta4/server/default/deploy/Test1-ejb.jar
  | .........
  | 15:19:51,242 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
  | 
  | vfsfile:/usr/local/jboss-5.0.0.Beta4/server/default/deploy/Test1-ejb.jar -> org.jboss.xb.binding.JBossXBRuntimeException: jndi-name not found as a child of message-driven
  | 
  | 
  |         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: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:181)
  |         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
  |         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
  |         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
  |         at java.lang.Thread.run(Thread.java:619)
  | 


If I remove jndi-name element from jboss.xml (I added it after NetBeans MDB wizard), I get following error during deployment:


  | jboss.j2ee:binding=message-driven-bean,jndiName=local/NewMessageBean at 24490290,plugin=invoker,service=EJB -> org.jboss.deployment.DeploymentException: The message-destination 'testQueue' has no jndi-name in jboss.xml
  | 

So it seems I'm providing wrong jndi-name which for some reason is a required param in Jboss 5. Perhaps the jndi-name is correct but my NewMessageBean class is somenow not compliant with something. I wonder if this has anything to do with differences between JBoss MQ and Jboss Messaging. I suspect NetBeans generated the code and config files targeted for JBoss MQ.

My MDB class head is:

public class NewMessageBean implements MessageDrivenBean, MessageListener { ...


I'm new to enterprise beans in general so I'm sorry if I'm missing something obvious. 










More information about the jboss-user mailing list