This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have been used this forum a lot, thanks for the ones who previously posted useful information and shared knowledge.
This is my first post. And this is the scenario. Eclipse Ganymede, jboss 4.2. In Eclipse I have this: i) project A.jar with a set of useful class. ii) ejb project B.jar which include A.jar. iii) ear project C.ear which include A and B.
Whenever I deploy C.ear from eclipse (run on server) to jboss B it's telling me ClassNotFound exception relative to A.jar.
I unpacked the C.ear file in jboss deploy directory and found this structure:
C.ear --->A.jar --->B.jar
All at root level, and the manifest doesn't mention anything about A.jar But...if right click 'C' and export ear file the structure is:
C.ear lib +--->A.jar B.jar
And that ear deployed manually "drag and drop" on jboss run fine with no error.
Am I missing something ? Why this difference in behaviour ?
What do you mean by "unpacked"? How did you do that?
Also the C.ear in your two examples, was that the exact same C.ear?
I can see how the second C.ear worked - the JARs in the lib directory are automatically included in the classpath. In the first C.ear, the A.jar would have to be included in the META-INF/application.xml file (you do have one of these, don't you?)
Thanks for your reply...find the answer below -------------------------------------------
What do you mean by "unpacked"? How did you do that?
-opened with any archive manager...to see the content
Also the C.ear in your two examples, was that the exact same C.ear?
-One built and deployed by eclipse after pressing "play" or "run on server", the other one built by me with file-->export ear then deployed manually to jboss...
I can see how the second C.ear worked - the JARs in the lib directory are automatically included in the classpath. In the first C.ear, the A.jar would have to be included in the META-INF/application.xml file (you do have one of these, don't you?)
- That's the whole point...eclipse don't build the right structure when deploying on jboss...just put everything at root folder...
Also, which version of JBossAS?
- 4.2.2 GA
Jose Pereira
Greenhorn
Joined: Dec 10, 2002
Posts: 12
posted
0
If you are using the Eclipse EAR Application Project, when you create the project using the wizard, dont forget to check the "Generate Deployment Descriptor" option in the second screen ... If you don't check this option it dose not create the applications.xml ...
Jose Pereira
Greenhorn
Joined: Dec 10, 2002
Posts: 12
posted
0
One more thing, I found that when you use the "Default Configuration for JBoss v4.2" option when creating the Eclipse EAR Project the deployment dose not work so I created one using Minimum Configuration option and it worked.
Obvious things for a jobs that has no science to it .... :roll: