• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JBoss class loader

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

I am working on JBoss 5.0.0 GA. I have an .ear file which contains few libraries(.jar files) at the root level in the ear.

I was under the impression that all the libraries(.jar files) at the root level of ear are in the classpath by default but i get class not found exceptions while deploying the ear. However If, i add the jar file to the application.xml then it works fine.

Is this the intended behaviour? Shouldn't JBoss add the libraries to classpath by default?

Thanks,
Srikanth.
 
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
Yes, this is the intended behavior. Only JAR files in the lib directory within the EAR file are automatically added to the classpath.
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Peter Johnson:
Yes, this is the intended behavior. Only JAR files in the lib directory within the EAR file are automatically added to the classpath.



Peter,

This question might be silly but want some clarification from you.
I have few .properties files at the root level of ear and JBoss picks all the files which means they are in the classpath by default then why doesn't it pick the jar files? Is it how the JBoss is designed?

Thanks,
Srikanth.
 
Peter Johnson
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
Yes, it is strange but true. But recall that if you place a directory in your classpath that the JVM does not pick up the JAR files located in that directory - you have to add the JAR files specifically. (Rumor has it that this will be "fixed" in JDK 7...)
reply
    Bookmark Topic Watch Topic
  • New Topic