Hi,

It has been a while, but the problem persists. So i thought i'd pick it up 
again.

Werner, i have not set the custom classloader for Castor in any way. How can i 
do that?

Marko Kurm
tarkvara tehniline konsultant (Livelink)
MicroLink Eesti AS
mob:  +372 53497718
faks: +372 650 1751
[email protected]




MicroLinki klienditeenindus: 800 99 44
[email protected] | www.microlink.ee

-----Original Message-----
From: Werner Guttmann [mailto:[email protected]] 
Sent: Thursday, February 12, 2009 4:45 PM
To: [email protected]
Subject: Re: [castor-user] Castor ClassLoader problems

Hi,

are you setting the custom ClassLoader on Castor in any way ?

Werner

Marko Kurm wrote:
> Hi,
> 
> Im developed a litte  java plugin that uses castor to Access a web-service. 
> It worked perfectly.
> 
> Now i’m trying to incorporate that plugin into an application that uses it’s 
> own custom classLoader and i keep getting the following error:
> 
> org.castor.core.util.Configuration.getObjectArray(Configuration.java:677) 
> java.lang.NullPointerException
> org.castor.mapping.MappingLoaderRegistry.<init>(MappingLoaderRegistry.java:54)
> org.castor.mapping.MappingUnmarshaller.<init>(MappingUnmarshaller.java:80)
> org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:540)
> ee.microlink.livelink.mobilesign.util.XmlUtil.configure(XmlUtil.java:87)
> ee.microlink.livelink.mobilesign.util.XmlUtil.<init>(XmlUtil.java:102)
> ee.microlink.livelink.mobilesign.MobileSignImpl.prepareMobileSign(MobileSignImpl.java:122)
> 
> It seems that the NullPointerException is caused because the 
> „getClass().getClassLoader());“ returns null:
> 
> public MappingLoaderRegistry(final Configuration config) {
>         Object[] objects = config.getObjectArray(
>                 CoreConfiguration.MAPPING_LOADER_FACTORIES, 
> getClass().getClassLoader());
>         for (int i = 0; i < objects.length; i++) {
>             _mappingLoaderFactories.add(objects[i]);
>         }
>     }
> 
> Anyone have any suggestions on how to resolve this problem?
> 
> Best Regards!
> Marko Kurm

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to