tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mike jackson" <mjack...@cdi-hq.com>
Subject RE: Connect whit Oracle Db
Date Tue, 22 Apr 2003 21:53:36 GMT
Nevermind, I didn't see it there.  You don't need the "newInstance"
call, just the Class.forName.

--mikej
-=------
mike jackson
mjackson@cdi-hq.com

> -----Original Message-----
> From: mike jackson [mailto:mjackson@cdi-hq.com]
> Sent: Tuesday, April 22, 2003 1:48 PM
> To: 'Tomcat Users List'; 'Frederico Madeira'
> Subject: RE: Connect whit Oracle Db
> 
> Did you remember to load the driver?
> 
> It'd be a Class.forName call...
> 
> --mikej
> -=------
> mike jackson
> mjackson@cdi-hq.com
> 
> > -----Original Message-----
> > From: Frederico Madeira [mailto:fred@farmaciadospobres.com.br]
> > Sent: Tuesday, April 22, 2003 1:46 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Connect whit Oracle Db
> >
> > Sr´s,
> >
> > I want to connect my servlet application with oracle db.
> > I copy the drivers JDBC to lib folders.
> > When i run my application, the follow error apperars:
> >
> >
> > org.apache.jasper.JasperException: oracle.jdbc.driver.OracleDriver
> > 	at
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
> va
> > :254)
> > 	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
> ti
> > onFilterChain.java:247)
> > 	at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> er
> > Chain.java:193)
> > 	at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.
> > java:256)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(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
> nv
> > okeNext(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
> 5)
> > 	at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :1
> > 80)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(StandardPipeline.java:643)
> > 	at
> >
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> lv
> > e.java:171)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(StandardPipeline.java:641)
> > 	at
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :1
> > 72)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(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.
> ja
> > va:174)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(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:223)
> > 	at
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59
> 4)
> > 	at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> on
> > nection(Http11Protocol.java:392)
> > 	at
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56
> 5)
> > 	at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .j
> > ava:619)
> > 	at java.lang.Thread.run(Thread.java:536)
> >
> > root cause
> >
> > javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
> > 	at
> >
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
> tI
> > mpl.java:536)
> > 	at
> org.apache.jsp.Visitantes_jsp._jspService(Visitantes_jsp.java:218)
> > 	at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > 	at
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
> va
> > :210)
> > 	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
> ti
> > onFilterChain.java:247)
> > 	at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> er
> > Chain.java:193)
> > 	at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.
> > java:256)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(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
> nv
> > okeNext(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
> 5)
> > 	at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :1
> > 80)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(StandardPipeline.java:643)
> > 	at
> >
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> lv
> > e.java:171)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(StandardPipeline.java:641)
> > 	at
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :1
> > 72)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(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.
> ja
> > va:174)
> > 	at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nv
> > okeNext(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:223)
> > 	at
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59
> 4)
> > 	at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> on
> > nection(Http11Protocol.java:392)
> > 	at
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56
> 5)
> > 	at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .j
> > ava:619)
> > 	at java.lang.Thread.run(Thread.java:536)
> > My conection with oracle is:
> > <%
> > String nome, senha, cURL ;
> > cURL = "jdbc:oracle:oci8:hostdb:1521";
> > nome= "username";
> > senha= "passwd";
> > Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
> > Connection con =  DriverManager.getConnection(cURL,  nome, senha);
> > Statement stm = con.createStatement();
> > %>
> >
> > tanks
> >
> > Frederico Madeira
> > Coordenador de Suporte
> > N. Landim Comércio Ltda
> > PABX: 81. 3497.3029
> > e-mail: fred@farmaciadospobres.com.br
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message