Look at line 677 in Configuration.java, that's where the problem lies. It's okay for getClassLoader() to return null for system classes, such as java.lang.Object.class
On Wed, Feb 11, 2009 at 4:57 AM, Marko Kurm <[email protected]> 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

