Just a bit more information, in case it is pertinent and not obvious. The rar is an inbound resource adapter that sends its messages to the MDB in the ejb.jar. It looks like the rar is not completely deployed (in that the classloader hasn't been set up) by the time the ejb.jar starts it's deployment aand configuration and this then causes the class to not be found. At least that's my take on the situation.
Is this a type of solution/deployment that is supported even? I haven't tried it with 2 separate parts yet, but that is what I will do next. Basically I'll take the rar out of the ear and deploy it and then see if I can deploy the ear.
The ra.rar just contains the ra.xml and the manifest Class-Path refers to lib/logic.jar. The ejb.jar also uses lib/logic.jar, and the definition of the MDB is within this jar. I sorted out the deployment issues around ordering, so I know the deployment order is not a problem.
You don't need to define the Class-Path entry in the manifest of the ra.rar, you can rely on the library-directory feature of javaee5 from Jboss, check
<attribute name="EnablelibDirectoryByDefault">true</attribute>from the$JBOSS_HOME/server/default/deploy/ear-deployer.xml
Where is MDB packaged, is it is in ejb.jar Or logic.jar?
How did you sort out the deployment ordering issue?
The MDB is packaged in the ejb.jar. It is done with annotations, so there is no ejb-jar.xml.
For the deployment issue, I read all of the posts about fixing the code for deployment ordering and then added the <module-order>strict</module-order> to the jboss-app.xml. And the modules are listed in the application.xml like so :
<application> <module> <connector>ra.rar</connector> </module> <module> <ejb>ejb.jar</ejb> </module> <module> <web> <web-uri>web</web-uri> </web> </module> </application>
And I saw in the log file that the order of deployment was preserved.
I will remove the classpath from the rar, and check on that setting.
Interestingly, i just tried the separate deployment and got the same error, so I must have something else wrong also.
Ok, sorry for the delay in posting this reply. This issue turned out to be a configuration error in the ra.xml. I had the wrong value in the messagelistener-type value. Once that was fixed everything deployed fine. I was even able to include the data source in the ear and have everything deployed in a single file.
Thanks for the help.