Re: Connection pool question:

2002-11-06 Thread Ricardo Moral
Sorry but I cant't find nothing wrong... Please send
the part of the server.xml and web.xml files where you
have defined the references. Are you sure there are no
diferences between the two web applications?

--- Michael Nicholson <[EMAIL PROTECTED]> wrote:
> I'm running it through Forte/SunOneStudio, which is
> built on netbeans (I
> think).  Does that make a difference?
> 
> 
> - Original Message -
> From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
> To: "Tomcat Users List"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, November 05, 2002 8:03 PM
> Subject: Re: Connection pool question:
> 
> 
> > Are you running the tomcat which is built into
> Netbeans ?
> >
> >
> > Michael Nicholson wrote:
> >
> > >I'm building a webapp, and I want to use
> connection pooling with it.  In
> order to play around some, I made a dummy webapp
> that does virtually
> nothing, but uses the connection pool.  So then I
> cut and pasted some code
> out into the bigger webapp, but now I get this
> error:
> > >
> > >MonitorFilter::java.lang.ClassCastException:
> org.apache.commons.dbcp.BasicDataSource
> > >at CPPSDB.DBQuery.(DBQuery.java:34)
> > >at
>
org.apache.jsp.Login$jsp._jspService(Login$jsp.java:127)
> > >at
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> > >at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >at
>
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper
> .service(IDEJspServlet.java:174)
> > >at
>
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(ID
> EJspServlet.java:247)
> > >at
>
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspSer
> vlet.java:339)
> > >at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> > >at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> > >at
>
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
> .java:223)
> > >at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:213)
> > >at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> > >at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> > >at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:190)
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> > >at
>
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> .java:528)
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> > >at
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
> 46)
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> > >at
>
org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.j
> ava:142)
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> > >at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
> > >at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> > >at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> > >at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> )
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> > >at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
> > >at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> > >at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> > >at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > >at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
> > >at
>
org.apache.catalina.cor

Re: Connection pool question:

2002-11-06 Thread Ricardo Moral
Send us the code of the DBQuery.java. (The shorter the
better)


--- Michael Nicholson <[EMAIL PROTECTED]> wrote:
> I'm building a webapp, and I want to use connection
> pooling with it.  In order to play around some, I
> made a dummy webapp that does virtually nothing, but
> uses the connection pool.  So then I cut and pasted
> some code out into the bigger webapp, but now I get
> this error:
> 
> MonitorFilter::java.lang.ClassCastException:
> org.apache.commons.dbcp.BasicDataSource
> at CPPSDB.DBQuery.(DBQuery.java:34)
> at
>
org.apache.jsp.Login$jsp._jspService(Login$jsp.java:127)
> at
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:174)
> at
>
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:247)
> at
>
org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at
>
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:223)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
>
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
>
org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:142)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
> at java.lang.Thread.run(Thread.java:536)
> 
> My server.xml has the same resource and resource
> params for both contexts, and my web.xml has the
> same resource-ref as the dummy app, but I still get
> the same error.  Any ideas?
> 
> Michael Nicholsn


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://h

Re: JSP error handling

2002-11-06 Thread Ricardo Moral
There are two valves used to handle errors. The first
one is the ErrorDispatcherValve. This is the valve
that will forward the request to the error page if
there is a uncaught exception. The second valve is the
ErrorReportValve wich is the last valve on the list of
valves of a Host and is used to generate a error
report in HTML. 

You don't need to add this valves by hand because they
are added by the start method of the StandardHost
implementation. If you are using other implementation
of the Host interface you must add this valves
yourself.

The exception of JSP's are stored under the attibute
'javax.servlet.jsp.jspException' of the request. But
you must access this value directly using the
'exception' variable already declared on the context
of the error page.


--- Jan Kunzmann <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I've a problem with JSP error handling.
> 
> I tried to make custom error pages with the
> <% page errorPage="..." %> element. If an error
> occurs during the 
> execution of my jsp page, the error page is called,
> but the 
> javax.servlet.error.* attributes do not contain any
> values.
> 
> I looked into the Tomcat 4.0 source and found a
> valve called 
> ErrorDispatcherValve. Has it something to do with
> jsp error handling? I 
> tried to include the valve with  and with
>  errorReportingValve="">, but the error page still
> reports the attributes 
> to be null.
> 
> I use Tomcat 4.0.4 from the Debian distribution with
> marginal chances in 
> server.xml.
> 
> Thanks in advance,
> Jan
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JNDI JDBC Question

2002-11-05 Thread Ricardo Moral
Are you writing the driver class name this way:
'com.ibm.as400.access.AS400JDBCDriver()'? when you
configure the BasicDataSource...? I think the problem
may be that you must not use the '()' at the end of
the class name.


--- Brian Kautz <[EMAIL PROTECTED]> wrote:
> I have a Class Not Found Exception error I am not
> certain how to fix.
> 
> I have a file called jt400.jar in my
> CATALINA_HOME/common/lib .  My
> servlets access the classes in this jar with no
> problem.
> 
> One of the classes in this jar is my JDBC Driver
> class.  Again it works
> fine from a servlet making direct connections using
> this driver.  However
> when trying to use the connect pooling, this same
> driver can not be
> accessed by the JNDI services.  My servlet gets the
> error Cannot load JDBC
> driver class
> 'com.ibm.as400.access.AS400JDBCDriver()' , but
> tomcat's stdout
> records that the real problem is:
> 
> Cannot load JDBC driver class
> 'com.ibm.as400.access.AS400JDBCDriver()'
> java.lang.ClassNotFoundException:
> com/ibm/as400/access/AS400JDBCDriver()
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:140)
> at
>
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
> rce.java:523)
> at
>
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
> .java:312)
> at org.apache.jsp.jsp.JDBCTest2_jsp.
> _jspService(JDBCTest2_jsp.java:56)
> 
> Why can my servlets find the driver, but the
> connection pool cannot?
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: