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

AS400JDBCDriver not working on NT's IBMWebAS Standard 3.0.2

6 views
Skip to first unread message

Steve Johnson-Evers

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
I have some database setup code in a jar file that is used by JSPs. The
code is failing at the statement:

Connection dbConn = DriverManager.getConnection(
"jdbc:as400://S103MW2M/EVERBRIT" );

with an exception I cannot catch and is being displayed in the browser
as:

Error 500
An error has occurred while processing
request:http://localhost/marathon/ListOpenRls.jsp
Message:Server caught unhandled exception from servlet [jsp]
Target Servlet: jsp
StackTrace:
--------------------------------------------------------------------------------

Root Error-1: Unhandled exception caught in JSP service method.
javax.servlet.ServletException: Unhandled exception caught in JSP
service method. at
pagecompile._marathon._ListOpenRls_xjsp.service(_ListOpenRls_xjsp.java:197)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:639) at
com.evb.http.EvbHttpServlet.service(EvbHttpServlet.java:192) at
com.ibm.servlet.jsp.http.pagecompile.JSPState.service(JSPState.java:257)
at
com.ibm.servlet.jsp.http.pagecompile.PageCompileServlet.doService(PageCompileServlet.java:833)
at...

What is most frustrating is that this works for me when I use MS IIS +
JRun but not when I use IBM's HTTP and WebAS packages. I and a co-worker
only need this for testing our pages before we place this on our V4R4
web server, so I thought it would be good to test with the same server
software that will deploy the pages. Will we need to use IIS+JRun
instead?

My NT is at SP6 and I did install IBM's 1.1.7 JDK.

-Stevers


Frances Stewart

unread,
Mar 10, 2000, 3:00:00 AM3/10/00
to
Steve,
Did you look in the standard output/standard error logs for errors? Also, what does your
statement which loads the driver manager class look like (i.e. your are specifiying
com.ibm.as400.access.AS400JDBCDriverManager, correct)? Do you have the host servers started on
S103MW2M (STRHOSTSVR *ALL)?

Steve Johnson-Evers

unread,
Mar 10, 2000, 3:00:00 AM3/10/00
to
Here are the steps I've taken to reproduce the problem:

1. stopped the servers.
2. deleted existing logs
3. started IBM HTTP Administration, IBM HTTP Server and IBM WS AdminServer
4. started Administrator's console (AdminClient)
5. started "Application Server: Default Server" under Topology (and it completed successfully)
6. refreshed the JSP page
7. TRACEDUMP in the browser (first part of which was shown in the original message)
8. closed Administrator's console (AdminClient)
9. stopped IBM WS AdminServer, IBM HTTP Server and IBM HTTP Administration
10. saved the logs

The only log files with anything in them are:

(tracefile)

InstantDB - Version 2.31
Copyright (c) 1997-1999 Instant Computer Solutions Ltd.
004.116 144fad AdminServer A Initializing WebSphere Administration server
004.126 144f25 DrAdminServer A DrAdmin available on port 1,256
048.630 144fad AdminServer A WebSphere Administration server open for e-business

(default_server_stderr.log)

Scratch dir for the JSP engine is: E:\WebSphere\AppServer\temp\default_host\admin
IMPORTANT: Do not modify the generated servlets

(default_server_stdout.log)

002.623 144f30 DrAdminServer A DrAdmin available on port 1,277
Load group: default_app
: (3 instantiates eliminated for brevity)
Load group: admin
: (4 instantiates eliminated for brevity)
Load group: examples
: (2 instantiates eliminated for brevity)
050.983 144d7c WebGroup A [Servlet.LOG]:."pagecompile._marathon._ListOpenRls_xjsp: init"
051.073 144d7c WebGroup A [Servlet.LOG]:."com.ibm.servlet.jsp.http.pagecompile.JSPState: init"
Debug: EvbHttpDbServlet.deriveRealPath in pagecompile._marathon._ListOpenRls_xjsp
servletcontext.getRealPath(...) = E:\PROGRA~1\IBMHTT~1\htdocs\marathon\ListOpenRls.jsp
request.getPathTranslated() = null
request.getPathInfo() = null
request.getRequestURI() = /marathon/ListOpenRls.jsp
request.getServletPath() = /marathon/ListOpenRls.jsp
Debug: EvbHttpDbServlet.initializeJDbc() in pagecompile._marathon._ListOpenRls_xjsp
Opened, read, and closed E:\PROGRA~1\IBMHTT~1\htdocs\marathon\db.properties
Debug: OK! (EvbHttpDbServlet.initializeJDbc() in pagecompile._marathon._ListOpenRls_xjsp)
ConnSpec information:
getPoolName() =
getDbDriver() = com.ibm.as400.access.AS400JDBCDriver
getUrl() = jdbc:as400://S103MW2M/EVERBRIT
Debug: EvbHttpDbServlet.getEvbDbConnection in pagecompile._marathon._ListOpenRls_xjsp
Connection information:
connSpec is not null
connectionPool =
URL = jdbc:as400://S103MW2M/EVERBRIT
driver = com.ibm.as400.access.AS400JDBCDriver
Getting dbConn jdbc:as400://S103MW2M/EVERBRIT...
(driver is registered)
065.033 144d7c ServletInstan X Uncaught service() exception thrown by servlet {0}: {1}
"jsp"
javax.servlet.ServletException: Uncaught exception from JSP:
/marathon/ListOpenRls.jsp
at com.ibm.servlet.jsp.http.pagecompile.PageCompileServlet.doService(PageCompileServlet.java:842)
at com.ibm.servlet.jsp.http.pagecompile.PageCompileServlet.doGet(PageCompileServlet.java:721)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:534)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:557)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:349)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:705)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:631)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebApp.java:1129)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.java:1001)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.java:960)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java:681)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:139)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300)
at
com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerImp.java:230)

at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.java:104)

at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.java:202)

at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(SQWrapperEventSource.java:347)

at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQWrapperEventSource.java:216)

at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(Compiled Code)
at java.lang.Thread.run(Thread.java:472)

065.283 144d7c WebGroup X [Servlet Error]-[{0}]: {1}: {2}
"jsp"


"Server caught unhandled exception from servlet [jsp]"

com.ibm.servlet.engine.webapp.UncaughtServletException: Server


caught unhandled exception from servlet [jsp]

at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebApp.java:1146)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.java:1001)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.java:960)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java:681)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:139)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300)
at
com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerImp.java:230)

at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.java:104)

at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.java:202)

at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(SQWrapperEventSource.java:347)

at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQWrapperEventSource.java:216)

at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(Compiled Code)
at java.lang.Thread.run(Thread.java:472)

144.668 144f7b ServletInstan A Servlet.unload.initiated:."jsp"
144.688 144f7b ServletInstan A Servlet.has.become.permanently.unavailable.for.service:."jsp"
: (more unload code traces)
146.240 144f7b WebGroup A
[Servlet.LOG]:."com.ibm.servlet.jsp.http.pagecompile.PageCompileServlet: destroy"
146.300 144f7b ServletInstan A Servlet.unloaded:."jsp"

(I hope you're still with me <g>) and the code being executed is:

try {
if ( debug )
System.out.println( " Getting dbConn " + connSpec.getUrl() + "..." );
DriverManager.registerDriver( new com.ibm.as400.access.AS400JDBCDriver ());
if ( debug )
System.out.println( " (driver is registered)" );
Connection dbConn = DriverManager.getConnection( connSpec.getUrl(), "xxx", "xxx" );
if ( debug )
System.out.println( " Successfully retrieved dbConn" );
evbDbConn = new EvbDbConnection( dbConn );
if ( debug )
System.out.println( " Successfully created evbDbConn" );
} catch ( SQLException e ) {
System.err.println( "Get database connection error in " +
this.getClass().getName() + ": " + e.getMessage() );
}

I initially was using getConnection( URL ) but someone suggested I try getConnection( URL, name,
password ) but that didn't make a difference.

>> Do you have the host servers started on S103MW2M (STRHOSTSVR *ALL)?

If I start IIS then JRun and refresh the browser page (immediately after ending IBM HTTP and WAS),
the connection works as I see "Successfully retrieved dbConn" in stdout.log and the browser reports
a problem with the SQL statement (field not found). This tells me that the host servers are running.

Please, any other ideas?

-Stevers

Frances Stewart

unread,
Mar 12, 2000, 3:00:00 AM3/12/00
to
Do you get anymore information if you just invoke the generated servlet directly? I.e. copy
pagecompile\_marathon\_ListOpenRls_xjsp.class to your servlets directory for default_app, and then invoke
http://host:port/servlet/pagecompile._marathon._ListOpenRls_xjsp

I assume you have the toolbox jar file in you application server classpath?

Also, I assume you do have the host servers started on the AS400 (STRHOSTSVR *ALL) - I can't see where you did that in the steps
you listed below.

Steve Johnson-Evers

unread,
Mar 13, 2000, 3:00:00 AM3/13/00
to
1. Not really. When I hit
"http://localhost/servlet/pagecompile._simple_xjsp" (a JSP that doesn't
use my classes but inherits from HttpServlet) with my browser I get
-------------------------------------
Unhandled exception caught in JSP service method:
com/ibm/as400/access/AS400JDBCStatement

javax.servlet.ServletException: Unhandled exception caught in JSP
service method: com/ibm/as400/access/AS400JDBCStatement at
pagecompile._simple_xjsp.service(_simple_xjsp.java:95) at

javax.servlet.http.HttpServlet.service(HttpServlet.java:639) at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:557)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105)
at
--------------------------------------

2. I have it in _a_ classpath, maybe not the _correct_ classpath. I have
it specified on "Topology, severs.everbrite.com, Default Server,
servletEngine, default_app, advanced" and I can see it listed under the
"Classpath in Use" section as "E:/jc/jt400.jar".

3. I didn't explicitly say HOSTSVR were running, but I did say that
after I stop IBM's HTTP and WebAS I can start IIS+JRun and get the
connection. It's part of the standard startup so I didn't think of
listing it. I ran the command (STRHOSTSVR *ALL) again just to be sure
and I still get the stack dump in the browser.

-Stevers

0 new messages