Hi, I'm new to NW Portal.
I'm try to connect to the DB2 application through the portal application.
The DB2 JDBC driver db2java.zip has been put into the Java Build path/Libraries.
I also have a standalone program to test the connection. Everything is fine.
But once I export the PAR file and run the test.
I got the error message from log file:
java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
-
Loader Info -
ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@131d6c1]
Parent loader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@c3230b]
References:
not registered!
Where should I put the jdbc driver file. I/ve tried to put under dist/PORTAL-INF/lib, still didn't work.
My code for the connection is like following:
Connection c = null;
try {
// Establish a connection through the DriverManager
Class.forName( "COM.ibm.db2.jdbc.app.DB2Driver" );
String url = "jdbc:db2:DBName";
String login = "user";
String dbpwd = "pwd";
c = java.sql.DriverManager.getConnection( url, login, dbpwd );
} catch ( Exception se ) {
se.printStackTrace();
}
Thanks al ot for your help.