-
1. Re: onMessage() is not invoked in JBoss 7.1.1
sfcoy Jun 29, 2012 8:45 AM (in response to ohmygod)It's my understanding* that EE components (such as MDBs) should not be packaged in the EAR/lib directory. Try moving your jar to to the root of the EAR file.
*§EE.8.4.1 Assembling a Java EE Application - JEE6 Spec.
-
2. Re: onMessage() is not invoked in JBoss 7.1.1
ctomc Jun 30, 2012 6:12 PM (in response to sfcoy)Not only to move them to top-level but also mark the jar that contains them as ejb-jar in application.xml
--
tomaz
-
3. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 2, 2012 2:48 AM (in response to ctomc)I moved my jar to root of EAR and added module to application.xml, but when deploying I got this error. Any thoughts?
Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found
at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:447) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFact
ry.java:273)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:1
3)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:81
at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionD
ploymentUnitProcessor.java:58)
at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
-
4. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 2, 2012 3:04 AM (in response to ohmygod)I followed the docs https://docs.jboss.org/author/display/AS71/Messaging+configuration but finally still cannot get the MDB working (onMessage() is not invoked). Are there other steps that are not mentioned in the documentation? Please suggest.
-
5. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 2, 2012 4:10 AM (in response to ohmygod)Seeing this message, I think the MDB has been deployed successfully. So the reason why onMessage() is not invoked should be some configuration in the MDB class is not annotated correctly
15:43:25,587 INFO [org.jboss.as.messaging] (MSC service thread 1-8) JBAS011601: Bound messaging object to jndi name java:/queue/com.demo.testMDB
15:43:25,587 INFO [org.jboss.as.messaging] (MSC service thread 1-8) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/queue/com.demo.testMDBCould somebody advise where the problem could be? Much appreciated.
-
6. Re: onMessage() is not invoked in JBoss 7.1.1
sfcoy Jul 2, 2012 6:41 AM (in response to ohmygod)Are you using the "standalone-full" server configuration?
The standard configuration doesn't include messaging.
-
7. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 2, 2012 6:45 AM (in response to sfcoy)Yes, I have copied the JMS messaging configuration from standalone-full as the documentation guides, but all these do not make onMessage() work...
-
8. Re: onMessage() is not invoked in JBoss 7.1.1
sfcoy Jul 2, 2012 6:50 AM (in response to ohmygod)Do you have this bit:
{code:xml}<extension module="org.jboss.as.messaging"/>{code}
?
-
9. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 2, 2012 6:51 AM (in response to sfcoy)Yes, I copied this item from this page
https://docs.jboss.org/author/display/AS71/Java+Message+Service+API+%28JMS%29 -
10. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 2, 2012 6:52 AM (in response to ohmygod)If you like, I could attach my standalone.xml. Do you want that to analyze?
-
11. Re: onMessage() is not invoked in JBoss 7.1.1
sfcoy Jul 2, 2012 7:26 AM (in response to ohmygod)I'll have a look, but it looks like there is something missing.
Please also post the output of
jar -tf yourapp.ear
-
12. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 2, 2012 7:30 AM (in response to sfcoy)my ear is not a jar file but a folder structure:
-web.war
-lib
-mylib.jar (contains all my classes including the mdb classes)
-META-INF
I can not list all the output of mylib.jar since there are too many classes..
If you do want them, I can attach them as a file.
-
13. Re: onMessage() is not invoked in JBoss 7.1.1
sfcoy Jul 2, 2012 8:17 AM (in response to ohmygod)The fact that you get an exception when you move the jar to the root of the "ear" tells us two things:
- This is where it belongs, otherwise the behaviour would be the same;
- There is something wrong with your configuration
Please attach your standalone.xml and the complete server log when starting it up with the jar in the root of your folder structure. You should not need an application.xml file.
-
14. Re: onMessage() is not invoked in JBoss 7.1.1
ohmygod Jul 3, 2012 1:34 AM (in response to sfcoy)Hi Stephen,
Thanks for your patience. I moved my jar to the root of EAR and did not use application.xml and found the error:
Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not foundIt seems a little farther from resolving the original problem..
I attached the standalone.xml and the log file for your analyze. Really appreciated for your help. I am really confused what the problem is for this issue. Let me know what else you need.
-
standalone.xml 18.8 KB
-
log.txt.zip 2.6 KB
-