• 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

A Strange issue with ClassLoader

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

I have a very strange and probably a very popular issue with Class Loader. The following statement returns null.

java.net.URL url = Thread.currentThread().getContextClassLoader().getResource(xsdSchema);

The variable xsdSchema holds the name of a certain xsd file at a particular location in the workspace.

At one point of time, this statement was running absolutely fine. But suddenly, it started returning null and nothing was changed.

Its tough to crack what is going wrong. Does anyone have any idea as to what is happening here...?

Please help.

Thanks in advance,
Pankaj Poshirkar
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has your class path changed?
 
Pankaj Poshirkar
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Prime wrote:Has your class path changed?



The xsd file (which the ClassLoader is not able to load) is in 'resources' directory and this 'resources' directory is in the root of the EAR project. I didn't try to change the classpath. But anyways, I checked the class path entries in the MANIFEST.MF file but there is no change. Where all can the classpath be checked? Please help me as I m new to WebSphere ...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic