• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strange oracle datasource problem in tomcat4.06 under solaris

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am trying to create a datasource in tomcat version 4.06 solaris version 8 apache version 2.1.3.27.
I copied the files (classes12.jar in $home/comon/lib folder.

I wonder why tomcat looks for org.hsql.jdbcDriver when I am specifying driver name oracle.jdbc.driver.OracleDriver.

Any help is highly appreciated.

Regards,
Bhiku.

CHANGES in SERVER.xml FILE
<Context path="/client" docBase="client" debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="My_log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/meintest" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/meintest">
<parameter><name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter>
<parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value> </parameter>
<parameter><name>driverName</name><value>jdbc racle:thin:@192.168.100.101:1521 rcl</value> </parameter>
<parameter><name>user</name><value>pappu</value> </parameter>
<parameter> <name>password</name> <value>pager</value></parameter>
<parameter> <name>maxActive</name> <value>15</value></parameter>
<parameter> <name>maxIdle</name> <value>5</value></parameter>
<parameter> <name>maxWait</name> <value>-1</value> </parameter>
</ResourceParams>
</Context>

CHANGES IN WEB.xml FILE
<resource-ref>
<description>Oracle Datasource</description>
<res-ref-name>jdbc/meintest</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

EXCEPTION..

java.lang.ClassNotFoundException: org.hsql.jdbcDriver
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1127)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:115)
at org.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(TyrexDataSourceFactory.java:210)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:164)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:299)
at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at com.blue.client.slotcarrace.DatabaseConnection.getDataSource(DatabaseConnection.java:36)
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.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.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:2347)
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.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.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
at java.lang.Thread.run(Thread.java:479)
[ November 05, 2003: Message edited by: Bhiku Mhatre ]
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope this is helpful...
I'm using Oracle 9i, Tomcat 4.1.29 and Solaris 9.
In my <Context...> Instead of driverName, I have url.
My <Context> section looks like this:

- Chris
 
Bhiku Mhatre
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chris,
Thanks for your reply.I know the difference. But my version is tomcat 4.06. It is necessary to state driverName instead of URL there. Hence I specified it.
Thanks once again.
Warm Regards,
Bhiku.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic