How to import a external jar file to websphere 6.1? - Websphere
This is a discussion on How to import a external jar file to websphere 6.1? - Websphere ; Hi, I have a have a jar from third part. But I can`t import it to WAS. I tried copy the jar file to %WASHOME%/java/jre/lib/ext/,
but still I got error information as below:
java.lang.NoClassDefFoundError: allone.wqs.QuoteReceiverable
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java ...
-
How to import a external jar file to websphere 6.1?
Hi, I have a have a jar from third part. But I can`t import it to WAS. I tried copy the jar file to %WASHOME%/java/jre/lib/ext/,
but still I got error information as below:
java.lang.NoClassDefFoundError: allone.wqs.QuoteReceiverable
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :258)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:151)
at com.ibm.ws.classloader.CompoundClassLoader._define Class(CompoundClassLoader.java:668)
at com.ibm.ws.classloader.CompoundClassLoader.findCla ss(CompoundClassLoader.java:606)
at com.ibm.ws.classloader.CompoundClassLoader.loadCla ss(CompoundClassLoader.java:414)
at java.lang.ClassLoader.loadClass(ClassLoader.java:6 03)
at session.ControllerSessionBean.testTA3(ControllerSe ssionBean.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
Any help? Thank you so much!
OlDTim
12/APR/2008
-
Re: How to import a external jar file to websphere 6.1?
zw88168@126.com wrote:
> Hi, I have a have a jar from third part. But I can`t import it to WAS. I tried copy the jar file to %WASHOME%/java/jre/lib/ext/,
> but still I got error information as below:
>
> java.lang.NoClassDefFoundError: allone.wqs.QuoteReceiverable
> at java.lang.ClassLoader.defineClassImpl(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java :258)
> at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:151)
> at com.ibm.ws.classloader.CompoundClassLoader._define Class(CompoundClassLoader.java:668)
> at com.ibm.ws.classloader.CompoundClassLoader.findCla ss(CompoundClassLoader.java:606)
> at com.ibm.ws.classloader.CompoundClassLoader.loadCla ss(CompoundClassLoader.java:414)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:6 03)
> at session.ControllerSessionBean.testTA3(ControllerSe ssionBean.java:206)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:618)
>
> Any help? Thank you so much!
>
> OlDTim
> 12/APR/2008
>
NoClassDefFoundError usually means that the classloader could find the
class named, but that it depends on something else it couldn't find. Are
you certain you only need the one jar?
Ken
-
Re: How to import a external jar file to websphere 6.1?
Tim,
You also may want to try setting the jar up as a shared library
instead of putting it in lib/ext.
If you go to Environment -> Shared Libraries ->
cluster or appserver> -> New
And put the classpath to where you copy the jar somewhere on the
server filesystem.
Then, in Enterprise Applications -> -> Shared Libraries ->
and then you should see the jar you
just added in the "Available" box. Just move it over to the use box
and apply / save / sync changes and try restarting. See if that
helps.
Andrew
On Apr 12, 12:59*am, zw88...@126.com wrote:
> Hi, I have a have a jar from third part. But I can`t import it to WAS. I tried copy the jar file to %WASHOME%/java/jre/lib/ext/, *
> but still I got error information as below:
>
> java.lang.NoClassDefFoundError: allone.wqs.QuoteReceiverable
> * * * * at java.lang.ClassLoader.defineClassImpl(Native Method)
> * * * * at java.lang.ClassLoader.defineClass(ClassLoader.java :258)
> * * * * at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:151)
> * * * * at com.ibm.ws.classloader.CompoundClassLoader._define Class(CompoundClassLoader .java:668)
> * * * * at com.ibm.ws.classloader.CompoundClassLoader.findCla ss(CompoundClassLoader.ja va:606)
> * * * * at com.ibm.ws.classloader.CompoundClassLoader.loadCla ss(CompoundClassLoader.ja va:414)
> * * * * at java.lang.ClassLoader.loadClass(ClassLoader.java:6 03)
> * * * * at session.ControllerSessionBean.testTA3(ControllerSe ssionBean.java:206)
> * * * * at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
> * * * * at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:7 9)
> * * * * at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImp l.java:43)
> * * * * at java.lang.reflect.Method.invoke(Method.java:618)
>
> Any help? Thank you so much!
>
> OlDTim
> 12/APR/2008
-
Re: How to import a external jar file to websphere 6.1?
Yes, there is only one jar, I have try to run as a java application, it is ok.
-
Re: How to import a external jar file to websphere 6.1?
zw88168@126.com wrote:
> Yes, there is only one jar, I have try to run as a java application, it is ok.
>
The recommended way of adding a jar to the WAS runtime is to create a
shared library and add it as a classloader to the appserver. Check the
InfoCenter for 'Shared Libraries'.
Ken
-
Re: How to import a external jar file to websphere 6.1?
The recommended way of adding a jar to the WAS runtime is to create a
shared library and add it as a classloader to the appserver. Check the
InfoCenter for 'Shared Libraries'.
Many thanks, mates! It is working now!