WebSphere Application Server - Setting server's Classpath

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > April 2005 > Setting server's Classpath





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Setting server's Classpath

2005-04-18, 8:00 am

Hi,

I have deployed my application on WAS 5.1 but on startup its unable to make a connection to the Oracle database as the Oracle driver is not bundled in the application.
As a solution i tried setting the driver location in the server's classpath variable. Still the application is unable to find the Oracle Driver.

This is what i have tried so far.
Set the WAS_CLASSPATH variable present in the setupCmdLine.bat file present in the %WAS_HOME%\bin folder and started the server using: startServer.bat server1
The following was observered in the logs.

In startServer.log
************ Start Display Current Environment ************
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = E:\WAS 5.1\AppServer
user.install.root = null
Java Home = E:\WAS 5.1\AppServer\java\jre
ws.ext.dirs = E:\WAS 5.1\AppServer\java\lib;E:\WAS 5.1\AppServer\classes;E:\WAS 5.1\AppServer\lib;E:\WAS 5.1\AppServer\lib\ext;E:\WAS 5.1\AppServer\web\help;E:\WAS 5.1\AppServer\deploytool\itp\plugins\com.ibm.etools.ejbdeploy\runtime;E:\Program Files\IBM\
WebSphere MQ\java\lib
Classpath = E:\Len_Work\additionalJar\classes12.jar;E:\Len_Work\additionalJar\classes12.jar;E:\WAS 5.1\AppServer\properties;E:\WAS 5.1\AppServer\lib\bootstrap.jar;E:\WAS 5.1\AppServer\lib\j2ee.jar;E:\WAS 5.1\AppServer\lib\lmproxy.jar;E:\WAS 5.1\AppServer\
lib\urlprotocols.jar;
Java Library path = E:\WAS 5.1\AppServer\java\bin;.;C:\WINDOWS\system32;C:\WINDOWS;E:\WAS 5.1\AppServer\bin;E:\WAS 5.1\AppServer\java\bin;E:\WAS 5.1\AppServer\java\jre\bin;E:\Program Files\IBM\WebSphere MQ\Java\lib;C:\Documents and Settings\TEMP.D193.000\
Desktop\cvs;E:\Len_Work\ibm_Cert\WebSphe
re\AppServer\bin;C:\jdk1.4\bin;C:\Len\LEN-D- Drive\installed\perl\bin\;C:\oracle\ora8
1\bin;C:\Program Files\Oracle\jre\1.1. 7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;.;C:\Program Files\Rational\com
mon;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA
~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\S
QLLIB\SAMPLES\REPL;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\WEMPS\bin;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\ja
va\bin;E:/Program Files/IBM/WebSphere MQ/WEMPS\bin
Current trace specification = *=all=disabled
************* End Display Current Environment *************
[4/18/05 14:55:25:609 IST] 7d233905 ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
[4/18/05 14:55:26:000 IST] 7d233905 AdminTool A ADMU3100I: Reading configuration for server: server1
[4/18/05 14:55:32:484 IST] 7d233905 AdminTool A ADMU3200I: Server launched. Waiting for initialization status.
[4/18/05 14:57:06:922 IST] 7d233905 AdminTool A ADMU3000I: Server server1 open for e-business; process id is 3524

In SystemOut.log
************ Start Display Current Environment ************
WebSphere Platform 5.1 [BASE 5.1.0 b0344.02] running with process name LenNode1\LenNode1\server1 and process id 3524
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = E:\WAS 5.1\AppServer
user.install.root = E:\WAS 5.1\AppServer
Java Home = E:\WAS 5.1\AppServer\java\jre
ws.ext.dirs = E:\WAS 5.1\AppServer\java/lib;E:\WAS 5.1\AppServer/classes;E:\WAS 5.1\AppServer/classes;E:\WAS 5.1\AppServer/lib;E:\WAS 5.1\AppServer/lib/ext;E:\WAS 5.1\AppServer/web/help;E:\WAS 5.1\AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/
runtime
Classpath = E:\WAS 5.1\AppServer/properties;E:\WAS 5.1\AppServer/properties;E:\WAS 5.1\AppServer/lib/bootstrap.jar;E:\WAS 5.1\AppServer/lib/j2ee.jar;E:\WAS 5.1\AppServer/lib/lmproxy.jar;E:\WAS 5.1\AppServer/lib/urlprotocols.jar
Java Library path = E:\WAS 5.1\AppServer\java\bin;.;C:\WINDOWS\system32;C:\WINDOWS;E:\WAS 5.1\AppServer\bin;E:\WAS 5.1\AppServer\java\bin;E:\WAS 5.1\AppServer\java\jre\bin;E:\Program Files\IBM\WebSphere MQ\Java\lib;C:\Documents and Settings\TEMP.D193.000\
Desktop\cvs;E:\Len_Work\ibm_Cert\WebSphe
re\AppServer\bin;C:\jdk1.4\bin;C:\Len\LEN-D- Drive\installed\perl\bin\;C:\oracle\ora8
1\bin;C:\Program Files\Oracle\jre\1.1. 7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;.;C:\Program Files\Rational\com
mon;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA
~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\S
QLLIB\SAMPLES\REPL;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\WEMPS\bin;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\ja
va\bin;E:/Program Files/IBM/WebSphere MQ/WEMPS\bin
************* End Display Current Environment *************
[4/18/05 14:55:40:531 IST] 7d233901 ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
[4/18/05 14:55:42:016 IST] 7d233901 AdminInitiali A ADMN0015I: AdminService initialized
[4/18/05 14:55:44:797 IST] 7d233901 Configuration A SECJ0215I: Successfully set JAAS login provider configuration class to com.ibm.ws.security.auth.login.Configuration.
[4/18/05 14:55:44:875 IST] 7d233901 SecurityDM I SECJ0231I: The Security component's FFDC Diagnostic Module com.ibm.ws.security.core.SecurityDM registered successfully: true.
....
....
....


From the above i have observed that the classpath is reflected in startServer.log but not in the SystemOut.log.
Can someone tell me where i need to set the classpath so that the same would be reflected in the SystemOut.log
Daniel Garcia

2005-04-18, 8:00 am

Hi,


Copy the Oracle JDBC jar driver on E:\WAS 5.1\AppServer\libs\ext and
restart WebSphere.

The JVM have some problems with classpath with spaces.

Put on the navigator http://LenNode1:9080/snoop to view the classpath



Regards
Dani

len@zycus.com escribió:
> Hi,
>
> I have deployed my application on WAS 5.1 but on startup its unable to make a connection to the Oracle database as the Oracle driver is not bundled in the application.
> As a solution i tried setting the driver location in the server's classpath variable. Still the application is unable to find the Oracle Driver.
>
> This is what i have tried so far.
> Set the WAS_CLASSPATH variable present in the setupCmdLine.bat file present in the %WAS_HOME%\bin folder and started the server using: startServer.bat server1
> The following was observered in the logs.
>
> In startServer.log
> ************ Start Display Current Environment ************
> Host Operating System is Windows XP, version 5.1
> Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
> was.install.root = E:\WAS 5.1\AppServer
> user.install.root = null
> Java Home = E:\WAS 5.1\AppServer\java\jre
> ws.ext.dirs = E:\WAS 5.1\AppServer\java\lib;E:\WAS 5.1\AppServer\classes;E:\WAS 5.1\AppServer\lib;E:\WAS 5.1\AppServer\lib\ext;E:\WAS 5.1\AppServer\web\help;E:\WAS 5.1\AppServer\deploytool\itp\plugins\com.ibm.etools.ejbdeploy\runtime;E:\Program Files\IB

M\WebSphere MQ\java\lib
> Classpath = E:\Len_Work\additionalJar\classes12.jar;E:\Len_Work\additionalJar\classes12.jar;E:\WAS 5.1\AppServer\properties;E:\WAS 5.1\AppServer\lib\bootstrap.jar;E:\WAS 5.1\AppServer\lib\j2ee.jar;E:\WAS 5.1\AppServer\lib\lmproxy.jar;E:\WAS 5.1\AppServe

r\lib\urlprotocols.jar;
> Java Library path = E:\WAS 5.1\AppServer\java\bin;.;C:\WINDOWS\system32;C:\WINDOWS;E:\WAS 5.1\AppServer\bin;E:\WAS 5.1\AppServer\java\bin;E:\WAS 5.1\AppServer\java\jre\bin;E:\Program Files\IBM\WebSphere MQ\Java\lib;C:\Documents and Settings\TEMP.D193.00

0\Desktop\cvs;E:\Len_Work\ibm_Cert\WebSp
here\AppServer\bin;C:\jdk1.4\bin;C:\Len\LEN-D- Drive\installed\perl\bin\;C:\oracle\ora8
1\bin;C:\Program Files\Oracle\jre\1.1. 7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;.;C:\Program Files\Rational\c
ommon;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROG
RA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM
\SQLLIB\SAMPLES\REPL;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\WEMPS\bin;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\
java\bin;E:/Program Files/IBM/WebSphere MQ/WEMPS\bin
> Current trace specification = *=all=disabled
> ************* End Display Current Environment *************
> [4/18/05 14:55:25:609 IST] 7d233905 ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
> [4/18/05 14:55:26:000 IST] 7d233905 AdminTool A ADMU3100I: Reading configuration for server: server1
> [4/18/05 14:55:32:484 IST] 7d233905 AdminTool A ADMU3200I: Server launched. Waiting for initialization status.
> [4/18/05 14:57:06:922 IST] 7d233905 AdminTool A ADMU3000I: Server server1 open for e-business; process id is 3524
>
> In SystemOut.log
> ************ Start Display Current Environment ************
> WebSphere Platform 5.1 [BASE 5.1.0 b0344.02] running with process name LenNode1\LenNode1\server1 and process id 3524
> Host Operating System is Windows XP, version 5.1
> Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
> was.install.root = E:\WAS 5.1\AppServer
> user.install.root = E:\WAS 5.1\AppServer
> Java Home = E:\WAS 5.1\AppServer\java\jre
> ws.ext.dirs = E:\WAS 5.1\AppServer\java/lib;E:\WAS 5.1\AppServer/classes;E:\WAS 5.1\AppServer/classes;E:\WAS 5.1\AppServer/lib;E:\WAS 5.1\AppServer/lib/ext;E:\WAS 5.1\AppServer/web/help;E:\WAS 5.1\AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeplo

y/runtime
> Classpath = E:\WAS 5.1\AppServer/properties;E:\WAS 5.1\AppServer/properties;E:\WAS 5.1\AppServer/lib/bootstrap.jar;E:\WAS 5.1\AppServer/lib/j2ee.jar;E:\WAS 5.1\AppServer/lib/lmproxy.jar;E:\WAS 5.1\AppServer/lib/urlprotocols.jar
> Java Library path = E:\WAS 5.1\AppServer\java\bin;.;C:\WINDOWS\system32;C:\WINDOWS;E:\WAS 5.1\AppServer\bin;E:\WAS 5.1\AppServer\java\bin;E:\WAS 5.1\AppServer\java\jre\bin;E:\Program Files\IBM\WebSphere MQ\Java\lib;C:\Documents and Settings\TEMP.D193.00

0\Desktop\cvs;E:\Len_Work\ibm_Cert\WebSp
here\AppServer\bin;C:\jdk1.4\bin;C:\Len\LEN-D- Drive\installed\perl\bin\;C:\oracle\ora8
1\bin;C:\Program Files\Oracle\jre\1.1. 7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;.;C:\Program Files\Rational\c
ommon;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROG
RA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM
\SQLLIB\SAMPLES\REPL;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\WEMPS\bin;E:\Program Files\IBM\WebSphere MQ\bin;E:\Program Files\IBM\WebSphere MQ\
java\bin;E:/Program Files/IBM/WebSphere MQ/WEMPS\bin
> ************* End Display Current Environment *************
> [4/18/05 14:55:40:531 IST] 7d233901 ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
> [4/18/05 14:55:42:016 IST] 7d233901 AdminInitiali A ADMN0015I: AdminService initialized
> [4/18/05 14:55:44:797 IST] 7d233901 Configuration A SECJ0215I: Successfully set JAAS login provider configuration class to com.ibm.ws.security.auth.login.Configuration.
> [4/18/05 14:55:44:875 IST] 7d233901 SecurityDM I SECJ0231I: The Security component's FFDC Diagnostic Module com.ibm.ws.security.core.SecurityDM registered successfully: true.
> ...
> ...
> ...
>
>
> From the above i have observed that the classpath is reflected in startServer.log but not in the SystemOut.log.
> Can someone tell me where i need to set the classpath so that the same would be reflected in the SystemOut.log

2005-04-18, 5:54 pm

Hi Dani,

If we put the Oracle JDBC jar driver in the Application Server's Library or Application's library folder then the Application runs smoothly.

My problem is that i cannot move/copy the driver files into the library folders nor can i add the same thru the admin console (company policies).

You said that JVM has problems with classpath's containing spaces.
The Driver's path doesn't contain any spaces.

Had checked the snoop servlet. The classpath doesn't contain the required Oracle drivers.

Any other suggestion will be appreciated.

Thanks n Regards,
Len
Ben_

2005-04-18, 5:54 pm

Hello,

There is an ORACLE_JDBC_DRIVER_PATH variable foreseen for this purpose
(Environment > Manage WebSphere Variables). I don't think you'll see this
entry in SystemOut.log however, because the Web App classpath is not traced.

Looks from your comments that you did not create a DataSource to access the
db but create the connection by code. If so, I'd advise not to do so and use
the DataSource to benefit from the connection pooling facility of WebSphere.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com