Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing Websphere Classpath

18 views
Skip to first unread message

edwar...@gmail.com

unread,
Nov 15, 2006, 1:53:52 PM11/15/06
to
Is there any chance to change the Websphere Application Server 5.1 classpath that is loaded when the server starts? I found in ./startServer.sh a constant or variable called "$WAS_CLASSPATH", where can i change the value? I'm trying to access an application but i get an error that looks that there is a mismatch with the libraries.

Any suggestions?

AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - java.lang.reflect.InvocationTargetException

AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: java.lang.reflect.InvocationTargetException
faultActor: null
faultDetail:
stackTrace: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:372)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:292)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
at org.apache.axis.transport.http.AxisServlet.invokeEndpointFromGet(AxisServlet.java:476)
at org.apache.axis.transport.http.AxisServlet.processMethodRequest(AxisServlet.java:410)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:289)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
Caused by: java.lang.NoSuchFieldError: OCIEnvHandle
at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at ciwspkg.ClientInfo.Conectar(ClientInfo.java:35)
at ciwspkg.ClientInfo.getClientInfoByAccount(ClientInfo.java:104)
... 37 more


Ben_

unread,
Nov 15, 2006, 3:46:36 PM11/15/06
to
You can try to set the classloader policy to PARENT_LAST on the web module.


Paul Ilechko

unread,
Nov 15, 2006, 4:28:43 PM11/15/06
to
edwar...@gmail.com wrote:
> Is there any chance to change the Websphere Application Server 5.1
> classpath that is loaded when the server starts? I found in
> ./startServer.sh a constant or variable called "$WAS_CLASSPATH",
> where can i change the value? I'm trying to access an application but
> i get an error that looks that there is a mismatch with the
> libraries.

WAS is a just a java process, so in theory you can set the classpath to
whatever you want. However, I would not recommend doing that, as you
would probably break the WAS runtime. It's more likely that you have
classloader issues, and as Ben says, you may be able to get the behavior
you need by setting the classloader policy on the module in question.
You can also use shared libraries to extend the classpath. All this is
documented in the WAS infocenter.

adw...@pulpjava.com

unread,
Nov 15, 2006, 6:09:12 PM11/15/06
to
Rather than changing the classpath, I would prefer it if you explored
the various locations the WebSphere Classloaders look for files, and
why certain JAR files are placed in certain locations.

Check out this link for an article that demystifies WebSphere
Classloading:

http://www.technicalfacilitation.com/get.php?link=classloading

Cheers!


-Cameron McKenzie
Author of the SCJA Certification Guide and What is WebSphere?


Certification Resources: www.examscam.com
Free WebSphere Tutorials: www.pulpjava.com
Free Mock Java Certification Exams: www.scja.com
Free J2EE and Java Multimedia Tutorials: www.mcnz.com


Classloader


Purpose


Default Scope

null classloader


Machine code that initializes the Java environment


classes from the basic Java runtime libraries

System classloader

sun.misc.Launcher


Loads classes used by the basic Java Runtime Environment


Classes found in the lib directory of the JRE

WebSphere Bootstrap Classloader

ExtClassLoader


Loads the J2EE and WebSphere runtime environment


The WebSphere \lib directory

Security Classloader

ProtectionClassLoader


Loads security related Java classes, I think


Not sure L

External Jar Classloader

ExtJarClassLoader


Loads common classes needing a PARENT_LAST mode of delegation


The \lib\app directory of the application server

Non WAR Classloader

CompoundClassLoader


Used to load files inside modules of an ear, with the exception of the
web module


This instance of the CompoundClassLoader has scope in all non-web
modules of an EAR

Internal Jar Classloader

JarClassLoader


Makes classes in non-web modules of an EAR visible to web module
components

Parent of the WAR classloader


This instance of the CompoundClassLoader has scope in all non-web
modules of an EAR

WAR Classloader

CompoundClassLoader


Loads the web components and Java code found in the WAR


Individual WAR files within an EAR

0 new messages