Hello.  I am trying to implement a DB connection
manager with my Struts webapp.  I created a servlet
that gets called when Tomcat is initialized, that
creates a DbConnectionBroker, and puts it in the
ServletContext:
getServletContext().setAttribute("dbPool", dbPool);

In a 'ActionForm', I'm validating a username against
the database, so I grab the dbPool object to pass into
my database bean:
DbConnectionBroker pool =
(DbConnectionBroker)servlet.getServletContext().getAttribute("dbPool");

This works fine for the first page.  When I attempt to
access the next page (any other following page), right
after the "checkLogin" tag is called, it throws the
exception below.  Two questions...  First, I would
like to utilize Struts datasource mapping, but don't
know how to do so while using a different connection
manager.  (There was a post yesterday suggesting
Poolman... ) Second, what am I doing wrong so that I
cannot access my next page?  The 'Action' called after
the working page executes normally, then it dies.  I'm
loading two servlets (action, and my initDBPool) in
web.xml.  Is there some rule about which must be
loaded first?  I'm new to the whole servlet thing, but
it seems like it's looking to my initDBPool servlet
for information it should find elsewhere (hence the
IncompatibleClassChangeError).  I would be most
grateful if someone could explaine the 'proper' method
for merging connectionPooling with Struts - but I'd be
happy for a solution for my problem at hand too...
Thanks, Andy Timm

java.lang.IncompatibleClassChangeError
        at
_0002fregister_0002ejspregister_jsp_0._jspService(_0002fregister_0002
ejspregister_jsp_0.java:578)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
vlet.java:177)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
18)
        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
04)
        at
org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
        at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
herImpl.java:194)
        at
org.apache.struts.action.ActionServlet.processActionForward(ActionSer
vlet.java:1758)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:159
5)
        at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
04)
        at
org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:797)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743
)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
:498)
        at java.lang.Thread.run(Thread.java:484)


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to