Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: Tomcat not recognizing JDB drivers - 4.1.29!-Please Help

Jacob Kjome

2003-12-10

Replies:


Tomcat hasn't used the classpath upon startup since before the 4.0.xx
builds of Tomcat. *Nothing* on your classpath will be seen by your
apps. If you want to put your driver in the server classpath, you can
modify the startup script or, better yet, add it to
CATALNIA_HOME/common/lib. Additionally, you will need to rename
classes12.zip to classes12.jar and ".zip" files won't be picked up by
Tomcat from its lib directories.

Jake

At 01:45 PM 12/10/2003 +0100, you wrote:
>In common/lib
>
>-----Original Message-----
>From: GuptaD@(protected)]
>Sent: woensdag 10 december 2003 11:48
>To: tomcat-user@(protected)
>Subject: Tomcat not recognizing JDB drivers - 4.1.29!-Please Help
>
>
>Hi everybody,
>
>   I'm really new to Tomact and I'm facing this problem.
>
>
>    I have put the classes in the package and Tomcat is now able to
> recognize that. Now It is not recognizing the Oracle drivers which I have
> them in C:\Jdbcdrivers as classes12.zip and added in CLASSPATH but When I
> call it from jsp page , it is giving me error as :-
>
>      java.sql.SQLException: No suitable driver
>
>Could you please point me in the right direction as where it is expecting
>thoose drivers.
>
> -------My Jsp code is-----
>
><%@(protected).*" %>
><%@(protected)" %>
><%@(protected).*" %>
><jsp:useBean id="PV1" scope="page" class="pkgclass.UserLogin"/>
>
>
>
><%-- Statements to stop caching at client site --%>
><%
>      response.setHeader("Cache-Control","no-store"); //HTTP 1.1
>      response.setHeader("Pragma","no-cache"); //HTTP 1.0
>      response.setDateHeader ("Expires", 0); //prevents caching at the
> proxy
>%>
>
><% PV1.setSID("SDGT");
>      PV1.setHost("dpwdev02") ;
>      PV1.setSID("drpd");
>      PV1.setUID("crdbweb") ;
>      PV1.setPWD("crdbweb");
>      String sres = PV1.amplogin();
>      out.println("Msgback : "+sres);
>
>%>
>
>
>Broadband Online Order Tracking system
>
>--------------------------------------------------------
>I'm attaching my class code with this mail but I think the problem is that
>Tomcat can't recognize the drivers
>
>
>Thanks in advance for your reply..
>
>
>Regards,
>
>Divya
>
>
>
>-----Original Message-----
>From: jakarta [ mailto:jakarta@(protected)]
>Sent: 09 December 2003 15:04
>To: 'Tomcat Users List'
>Subject: RE: Tomcat error while using a class with JSP!
>
>
>I believe that you have to package your class ie boots.PVDatabase
>
>as I recall unpackaged classes are not valid
>
>John
>
>-----Original Message-----
>From: GuptaD@(protected)]
>Sent: Tuesday, December 09, 2003 9:42 AM
>To: tomcat-user@(protected)
>Subject: Tomcat error while using a class with JSP!
>
>
>
>
>Hi All,
>
>     I am new to Tomcat so I would really appreciate if somebody could
>help me in this.
>
>I have Tomcat 4.1.29 installed on my windows 2000 machine. At the same
>level as examples is in Tomcat path, I've created a directory called
>boots(this is my application directory.) and have a index.jsp under
>boots and a class called PVDatabase.class under C:\Program Files\Apache
>Group\Tomcat 4.1\webapps\boots\WEB-INF\classes directory where
>C:\Program Files\Apache Group\Tomcat 4.1 is my CATALINA_HOME variable.
>
>   I have modified server.xml to include the context boots there. When
>I try to call this class from my index.jsp it gives me the following
>error.
>
>
>org.apache.jasper.JasperException: Unable to compile class for JSP
>
>An error occurred at line: 2 in the jsp file: /index.jsp
>
>Generated servlet error:
>   [javac] Compiling 1 source file
>
>C:\Program Files\Apache Group\Tomcat
>4.1\work\Standalone\localhost\boots\index_jsp.java:44: cannot resolve
>symbol
>symbol : class PVDatabase
>location: class org.apache.jsp.index_jsp
>     PVDatabase PV1 = null;
>     ^
>
>
>
>An error occurred at line: 2 in the jsp file: /index.jsp
>
>Generated servlet error:
>C:\Program Files\Apache Group\Tomcat
>4.1\work\Standalone\localhost\boots\index_jsp.java:46: cannot resolve
>symbol
>symbol : class PVDatabase
>location: class org.apache.jsp.index_jsp
>      PV1 = (PVDatabase) pageContext.getAttribute("PV1",
>PageContext.PAGE_SCOPE);
>           ^
>
>
>
>An error occurred at line: 2 in the jsp file: /index.jsp
>
>Generated servlet error:
>C:\Program Files\Apache Group\Tomcat
>4.1\work\Standalone\localhost\boots\index_jsp.java:49: cannot resolve
>symbol
>symbol : class PVDatabase
>location: class org.apache.jsp.index_jsp
>         PV1 = (PVDatabase)
>java.beans.Beans.instantiate(this.getClass().getClassLoader(),
>"PVDatabase");
>             ^
>3 errors
>
>
>      at
>org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa
>ndler.java:130)
>      at
>org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja
>va:293)
>      at
>org.apache.jasper.compiler.Compiler.generateClass (Compiler.java:353)
>      at
>org.apache.jasper.compiler.Compiler.compile (Compiler.java:370)
>      at
>org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
>va:473)
>      at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
>va:190)
>      at
>org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:295)
>
>      at
>org.apache.jasper.servlet.JspServlet.service (JspServlet.java:241)
>      at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
>      at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>tionFilterChain.java:247)
>      at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>erChain.java:193)
>      at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>e.java:256)
>      at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:643)
>      at
>org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:4
>80)
>      at
>org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995)
>      at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>e.java:191)
>      at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:643)
>      at
>org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:4
>80)
>      at
>org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995)
>      at
>org.apache.catalina.core.StandardContext.invoke (StandardContext.java:241
>7)
>      at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>:180)
>      at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:643)
>      at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
>lve.java:171)
>      at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:641)
>      at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>:172)
>      at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:641)
>      at
>org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:4
>80)
>      at
>org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995)
>      at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>java:174)
>      at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:643)
>      at
>org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:4
>80)
>      at
>org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995)
>      at
>org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:193)
>      at
>org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:78
>1)
>      at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
>onnection(Http11Protocol.java:549)
>      at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
>9)
>      at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
>.java:666)
>      at java.lang.Thread.run (Thread.java:536)
>
>
>
>
>   I am not really sure as what am I missing here in configuration. I'm
>sending my server.xml and index.jsp with this mail..
>
>Looking forward to hear from you very soon.
>
>Thanks & Regards,
>
>
>Divya
><<server.xml>> <<index.jsp>>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.