Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Eclipse and ear files on jboss

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

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 ?

thanks for all responses...
Leonardo
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?)

Also, which version of JBossAS?
 
Leonardo Celati
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
author & internet detective
Posts: 40913
840
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
kidjim,
Please check your private messages about an important administrative matter.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic