This MDB is a simple hello world mdb, trying to create an instance of class Dummy based on the message content. It simply contains "new Dummy();" inside the onMessage() Method.
Whats the best suitable place for the my/Dummy.class?
as simplest aproach, which leads to
[ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=test.ejb3
My next try was:
test.ear/test.ejb3/my/SomeBdb.class test.ear/test.ejb3/META-INF/MANIFEST.MF with "Class-Path dummy.jar" test.ear/META-INF/application.xml with "<module><java>test.jar</java></module>" test.ear/test.jar/my.Dummy.class
Whats necessary to be able to instantiate my Dummy class inside the MDB onMessage()?
Where is dummy.jar? The later should work, i.e. if you have an EAR with two jars (test.jar and test.ejb3) and put the test.jar module first in your application.xml, then it should work. You will get a UCL for the test.jar classes and then the EJB3 module should get deployed.
The dummy.jar file resides in the root of the ear file.
The test.jar file directly contains the classpath as root so
I also tried different module orders inside the application.xml.
Moved the jar entry to the top but the mdb is still unable to find the Dummy.class
:| I already tried all possible combinations, but i still fail to instantiate my Dummy.class. And as such im absolutly clueless.
I also failed to find an example ear to re-engineer it. Seems like there are no examples availabe where the MDB tries to access other self written non-ejb classes.
I also tried to remove the dummy.jar and placed it inside the deploy/lib directory. Hoped that this would work but it also fails to find the class.
Im sure its just some kind of peanunt, but im unable to find my miss-configuration.
Found the cause of my Problem.
The ErrorMessage was missleading. I thought that he cant find the Dummy.class, but he was unable to find another dependency.
Dummy was enhanced by jibx for xml serialisation purposes. He just lacked on the jibx-run.jar.
In such a case i would expect some kind of ErrorMessage telling me, that he need an additional Class to be able to load the dummy class.
Caused by: NoClassDefError SomeJibx.class