Skip to Content.
Sympa Menu

mace-opensaml-users - Re: xmltooling - ClassNotFoundException

Subject: OpenSAML user discussion

List archive

Re: xmltooling - ClassNotFoundException


Chronological Thread 
  • From: Mike Klein <>
  • To:
  • Subject: Re: xmltooling - ClassNotFoundException
  • Date: Tue, 27 Mar 2007 17:01:17 -0700
  • Organization: Virtual Appliance, Inc.

classpath issues is #1 issue with most java developers...biggest source
of problems.

You just need to understand classloader hierarchy and how this is
walked. Walking is different for applications than it is for
servlets/webapps.

Write a dump utility/method to walk tree of classloaders and dump their
archive/jar dirs, etc. Run this from cmdline and inside servlet. Then
evaluate the differences in ordering/contents.

Go to apache.org and sun.com and get info on pre-defined classpath for
each environment.


mike

Chad La Joie wrote:
> Asa, the only time I've seen this is when the classes were, in fact,
> not on the classpath.
>
> Can you attach you're .classpath file from eclipse? I seem to
> remember you saying you had another classpath issue on our last
> conference call. For what it's worth I can run the UnmarshallingTest
> in Eclipse as a JUnit test just fine.
>
> Asa Hardcastle wrote:
>> Hi All,
>>
>> I am very new to the java-xmltooling library and I am working my way
>> through the test code, writing my own tests as I go. I have
>> successfully build java-xmltooling from the commandline using the
>> ant.sh script and have placed the result in my class path.
>>
>> In a separate project I've created a set of objects for XML document
>> "MyDay." I can load and unmarshall using the default Provider
>> (DEFAULT) in my xmltooling-config.xml file, but as soon as I attempt
>> to use a specific provider that references the classes I've made
>> (MyDayXMLObjectBuilder, MyDayXMLObjectMarshaller,
>> MyDayXMLObjectUnmarshaller) the URLClassLoader cannot find them.
>>
>> XMLConfigurator#createClassInstance Can not create instance of PATH
>> TO MY CLASS HERE
>>
>> I am Running my class as a JUnit Test using eclipse. Is this the
>> problem? What can I do? I noticed that the same behavior shows up
>> if I use "Run As > JUnit Test" on UnmarshallingTest
>>
>>
>>
>> thanks in advance,
>>
>> asa
>



Archive powered by MHonArc 2.6.16.

Top of Page