Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with jboss\lib\endorsed jar loading

 
Anurag Blore
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

I am using jboss4.2 with jdk 1.6.

I am trying to deploy a webservices with JAX-WS, I created a war file and tried to deploy in
jboss\server\default\deploy folder and have placed all the jar files related to the webservices in the
endorsed directory
jboss\lib\endorsed

When I start the jboss it fails because one of the class which is inside a jar in jboss\lib\endorsed directory is not able to get the reference of servlet-api.jar (which is here jboss\server\default\deploy) and gives NoClassDefenitonFound error.

If I copy the servlet-api.jar inside the directory jboss\lib\endorsed the error disappears (NoClassDefenitonFound error) but doesn't find my .war file refernce.

My question is, is there a path settings which I need to do so the classes in the jboss\lib\endorsed directory can get refernce of classes in the deploy folder?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
 
Anurag Blore
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark.

My question is not getting the reference of jars in deploy directory by the jars in the
jboss\lib\endorsed directory could be different issue.

May be some classloader issue , I am not sure.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a war file and tried to deploy in jboss\server\default\deploy folder and have placed all the jar files related to the webservices in the endorsed directory jboss\lib\endorsed


Any specific reason for doing that? The endorsed/lib folder is not meant for application specific libraries. You should either package those jars in your application (recommended) along with classloader scoping or drop them in the %JBOSS_HOME%/server/< serverName>/lib folder.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anurag Blore wrote:Thanks Mark.

My question is not getting the reference of jars in deploy directory by the jars in the
jboss\lib\endorsed directory could be different issue.

May be some classloader issue , I am not sure.


My reply is that if you want to use Java 6. Then go to 4.3 or don't use Java 6.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic