You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by mirpuri <mi...@myway.com> on 2009/12/17 02:07:28 UTC
ClassNotFoundException for class in wsif.jar at
Thread.currentThread().getContextClassLoader()
Hello,
I am using wsif wsif-2.0.1_IB3 to connect to a webservice to create user
accounts. Everything works great in Eclipse.
When I deployed my jars (application jars, wsif and dependencies) to
weblogic 8.1 sp6, I run into the following error:
org.apache.wsif.WSIFException: Unable to create new mapper; nested exception
is:
java.lang.ClassNotFoundException:
org.apache.wsif.mapping.WSIFDefaultMapper
.............
Caused by: java.lang.ClassNotFoundException:
org.apache.wsif.mapping.WSIFDefaultMapper
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:199)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
org.apache.wsif.mapping.WSIFMapperFactory.newMapper(WSIFMapperFactory.java:100)
The WSIFMapperFactory.class exists in wsif.jar file and makes a call to
newMapper but is unable to load org.apache.wsif.mapping.WSIFDefaultMapper
that is in the same wsif.jar file.
public static WSIFMapper newMapper() throws WSIFException {
return newMapper(false);
}
The line that it fails on is Class c =
Class.forName(mapperClassNameBuffer.toString(), true,
Thread.currentThread().getContextClassLoader());
from the following code snippet in WSIFMapperFactory.class file
try {
Class c =
Class.forName(
mapperClassNameBuffer.toString(),
true,
Thread.currentThread().getContextClassLoader());
return (WSIFMapper) c.newInstance();
} catch (ClassNotFoundException cnf) {
throw new WSIFException("Unable to create new mapper", cnf);
} catch (Exception e) {
throw new WSIFException("Unable to create new mapper", e);
}
Any ideas on how to fix this? I tried using Class c =
Thread.currentThread().getContextClassLoader().loadClass(mapperClassNameBuffer.toString());
but it had the same effect.
Again, the same code path works great standalone in Eclipse.
Any help/pointers would be appreciated.
Thank you!
Sunil
--
View this message in context: http://old.nabble.com/ClassNotFoundException-for-class-in-wsif.jar-at-Thread.currentThread%28%29.getContextClassLoader%28%29-tp26821462p26821462.html
Sent from the WSIF - User mailing list archive at Nabble.com.