tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unnikrishnan C" <c_unnikrish...@infosys.com>
Subject RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
Date Sun, 22 Feb 2004 05:25:21 GMT
Don't define it as a "GlobalNamingResource", instead make it as an
'Application level' resource, it works fine. (I know its strange, but
that's how I solved it in Tomcat 5.0.18.) I was getting the same error
with DB2 connection. 

Thanks,
Unni
 
 

-----Original Message-----
From: Nathan Pitts [mailto:jpitts@tahc.state.tx.us] 
Sent: Saturday, February 21, 2004 3:22 AM
To: Tomcat Users List
Subject: Re: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT

I have the same problem....My application works fine on Tomcat 4.x, but

when I move to 5.0.x I get the same exact error.  This is not a matter  
of just not knowing how to use the driver......yes, the driver is  
located in common/lib/jconn2.jar (Sybase driver)  .........HELP!

nate

Here's my error:
[DEBUG] 20 Feb 2004 15:44:05,103 tahc.hris.webapp.service.BaseManager -

Converters registered...
[DEBUG] 20 Feb 2004 15:44:05,376 tahc.hris.persistence.ServiceLocator -

Looking up SessionFactory in JNDI
[INFO] 20 Feb 2004 15:44:05,391 tahc.hris.persistence.ServiceLocator -  
ServiceLocator initialized SessionFactory
[DEBUG] 20 Feb 2004 15:44:05,799 tahc.hris.persistence.ServiceLocator -

jnp Opened a hibernate session with hashcode:  
net.sf.hibernate.impl.SessionImpl@f74a38
[ERROR] 20 Feb 2004 15:44:06,076  
net.sf.hibernate.util.JDBCExceptionReporter - Cannot create JDBC driver

of class '' for connect URL 'null'
[ERROR] 20 Feb 2004 15:44:06,103  
net.sf.hibernate.util.JDBCExceptionReporter - Cannot open connection
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver  
of class '' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver
	at java.sql.DriverManager.getDriver(DriverManager.java:243)
	at  
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource

.java:743)
	at  
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja

va:518)
	at  
net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(D

atasourceConnectionProvider.java:59)
	at  
net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
	at
net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
	at
net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
	at  
net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java

:65)
	at  
net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
	at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
	at  
net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo

ader.java:133)
	at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
	at net.sf.hibernate.loader.Loader.list(Loader.java:941)
	at
net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
	at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
	at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
	at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1483)
	at  
tahc.hris.persistence.StaticListDAOHibernate.getDepartments(StaticListDA

OHibernate.java:32)
	at  
tahc.hris.webapp.service.StaticListManager.getDepartments(StaticListMana

ger.java:65)
	at  
tahc.hris.webapp.listener.StartupListener.contextInitialized(StartupList

ener.java:101)



On Monday, February 2, 2004, at 01:44 PM, Chakravarthy, Sundar wrote:

> Try using JDBC in a stand-alone Java app instead of Tomcat.
> Just to make sure you have the right driver/classes .
>
> -----Original Message-----
> From: Keshav Sarin [mailto:KSarin@net-deposit.com]
> Sent: Monday, February 02, 2004 2:10 PM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>
> You need to remove all references to the database driver from the  
> system
> and web app classpath. Don't put the driver in web-inf/lib directory.
> Just keep the driver in the tomcat_home/common/lib directory.
>
>
>>>> CAK203C@motorola.com 02/02/04 10:34AM >>>
> This is setenv file:
>
> set
> classpath=.;C:\j2sdk1.4.2_03\lib\tools.jar;..\web-inf\classes;..\web- 
> inf
> \lib\cos.jar;..\web-inf\lib\jnlp.jar;..\web-inf\lib\log4j.jar;..\web- 
> inf
> \lib\xml4j.jar;..\web-inf\lib\ldapjdk.jar;..\web- 
> inf\lib\ldapsearch.jar.
> .\web-inf\lib\classes12.jar;%classpath%
>
>
> and Class path set in system is :
>
>
.;C:\Estimation;C:\Tomcat\common\lib\servlet.jar;C:\Tomcat\common\lib\m 
> a
>
il.jar;C:\Tomcat\common\lib\activation.jar;C:\Tomcat\common\lib\jndi.ja 
> r
> ;C:\Tomcat\common\lib\jdbc2_0- 
> stdext.jar;C:\Tomcat\common\lib\ojdbc14.ja
> r
>
> ANy Bug ??
>
> Regards
> Abhay
>
>
>
> -----Original Message-----
> From: Mike Curwen [mailto:mikec@gb-im.com]
> Sent: Monday, February 02, 2004 11:25 AM
> To: 'Tomcat Users List'
> Subject: RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>
>
> Just to be sure.. you tried classes12.**jar**  (renamed .zip to .jar)
> ?
>
>
>> -----Original Message-----
>> From: Kumar Abhay-CAK203C [mailto:CAK203C@motorola.com]
>> Sent: Monday, February 02, 2004 11:12 AM
>> To: 'Tomcat Users List'
>> Subject: RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>> Importance: High
>>
>>
>>
>> I hv tried this also .. No success
>>
>> Abhay
>>
>>
>>
>> -----Original Message-----
>> From: Chakravarthy, Sundar [mailto:schakravarthy@doas.ga.gov]
>> Sent: Monday, February 02, 2004 10:56 AM
>> To: Tomcat Users List
>> Subject: RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>>
>>
>> Trying using classes12.jar in <tomcat_home>/common/lib
>>
>> -----Original Message-----
>> From: Kumar Abhay-CAK203C [mailto:CAK203C@motorola.com]
>> Sent: Monday, February 02, 2004 11:50 AM
>> To: 'Tomcat Users List'
>> Subject: RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>> Importance: High
>>
>> Path of the dB driver is as follows: Still the same error
>>
>> C:\Tomcat\common\lib\ojdbc14.jar
>>
>> Abhay
>>
>> -----Original Message-----
>> From: Keshav Sarin [mailto:KSarin@net-deposit.com]
>> Sent: Monday, February 02, 2004 10:44 AM
>> To: tomcat-user@jakarta.apache.org
>> Subject: Re: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>>
>>
>> Put the database driver in tomcat_home/common/lib directory
>> and restart tomcat.
>>
>>
>>>>> CAK203C@motorola.com 02/02/04 09:35AM >>>
>> Hi ,
>>
>> I am getting the following error in JDBC conn. Error log and
>> other details are as follows:
>>
>> Please help !!
>>
>> Regards
>> Abhay
>>
>> --------------------------------------------------------------
>> ----------
>> -------------------------------------
>> I am using :==
>> Apache Tomcat/4.1.29
>> SQL*Plus: Release 9.0.1.4.0 - Production on Mon Feb 2 09:39:33 2004
>> Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
>> j2sdk1.4.2_03
>> ojdbc14.jar
>> --------------------------------------------------------------
>> ----------
>> ------
>> <GlobalNamingResources>
>> <Environment name="simpleValue" override="true"
>> type="java.lang.Integer" value="30"/> <Resource
>> auth="Container" description="User database that can be
>> updated and saved" name="UserDatabase" scope="Shareable"
>> type="org.apache.catalina.UserDatabase"/>
>> <Resource name="estimation" scope="Shareable"
>> type="javax.sql.DataSource"/> <ResourceParams
>> name="UserDatabase"> <parameter> <name>factory</name>
>> <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
>> </parameter>
>> <parameter>
>> <name>pathname</name>
>> <value>conf/tomcat-users.xml</value>
>> </parameter>
>> </ResourceParams>
>> <ResourceParams name="estimation">
>> <parameter>
>> <name>validationQuery</name>
>> <value>select sysdate from dual</value>
>> </parameter>
>> <parameter>
>> <name>maxWait</name>
>> <value>5000</value>
>> </parameter>
>> <parameter>
>> <name>maxActive</name>
>> <value>4</value>
>> </parameter>
>> <parameter>
>> <name>password</name>
>> <value>eppsys</value>
>> </parameter>
>> <parameter>
>> <name>url</name>
>> <value>jdbc:oracle:thin:@oswego.comm.mot.com:1521:DEV</value>
>> </parameter>
>> <parameter>
>> <name>driverClassName</name>
>> <value>oracle.jdbc.driver.OracleDriver</value>
>> </parameter>
>> <parameter>
>> <name>maxIdle</name>
>> <value>2</value>
>> </parameter>
>> <parameter>
>> <name>username</name>
>> <value>eppsys</value>
>> </parameter>
>> </ResourceParams>
>> </GlobalNamingResources>
>> ----------------------------------------------
>> Feb 2, 2004 9:38:47 AM org.apache.coyote.http11.Http11Protocol init
>> INFO: Initializing Coyote HTTP/1.1 on port 80
>> Starting service Tomcat-Standalone
>> Apache Tomcat/4.1.29
>> Feb 2, 2004 9:38:56 AM
> org.apache.struts.util.PropertyMessageResources
>> <init>
>> INFO: Initializing, config='org.apache.struts.util.LocalStrings',
>> returnNull=true
>> Feb 2, 2004 9:38:56 AM
> org.apache.struts.util.PropertyMessageResources
>> <init>
>> INFO: Initializing,
> config='org.apache.struts.action.ActionResources',
>> returnNull=true
>> Feb 2, 2004 9:39:02 AM
> org.apache.struts.util.PropertyMessageResources
>> <init>
>> INFO: Initializing,
>> config='org.apache.webapp.admin.ApplicationResources',
>> returnNull=true
>> Looking up jdbc/estimation
>> Found
>> Feb 2, 2004 9:39:23 AM org.apache.coyote.http11.Http11Protocol start
>
>> INFO: Starting Coyote HTTP/1.1 on port 80
>> Feb 2, 2004 9:39:23 AM org.apache.jk.common.ChannelSocket init
>> INFO: JK2: ajp13 listening on /0.0.0.0:8009
>> Feb 2, 2004 9:39:23 AM org.apache.jk.server.JkMain start
>> INFO: Jk running ID=0 time=30/220
>> config=C:\Tomcat\bin\..\conf\jk2.properties
>> org.apache.commons.dbcp.SQLNestedException: Cannot create
>> JDBC driver of class '' for connect URL 'null', cause:
>> java.sql.SQLException: No suitable driver
>> at java.sql.DriverManager.getDriver(DriverManager.java:243)
>> at
>> org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
>> DataSource
>> .java:743)
>>
>> at
>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
>> aSource.ja
>> va:518)
>>
>> at com.mot.iDEN.webapp.oes.servlet.TestServlet.doGet(TestServlet.
>> java:42)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>> er(Applica
>> tionFilterChain.j
>>
>> ava:247)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
>> cationFilt
>> erChain.java:193)
>>
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
>> rapperValv
>> e.java:256)
>>
>> at
>> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
>> eContext.i
>> nvokeNext(Standar
>>
>> dPipeline.java:643)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>> ine.java:4
>> 80)
>>
>> at
>>
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardC
>> ontextValv
>> e.java:191)
>>
>> at
>> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
>> eContext.i
>> nvokeNext(Standar
>>
>> dPipeline.java:643)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>> ine.java:4
>> 80)
>>
>> at
>>
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> at
>> org.apache.catalina.core.StandardContext.invoke(StandardContex
>> t.java:241
>> 7)
>>
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
>> Valve.java
>> :180)
>>
>> at
>> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
>> eContext.i
>> nvokeNext(Standar
>>
>> dPipeline.java:643)
>> at
>> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
>> spatcherVa
>> lve.java:171)
>>
>> at
>> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
>> eContext.i
>> nvokeNext(Standar
>>
>> dPipeline.java:641)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
>> Valve.java
>> :172)
>>
>> at
>> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
>> eContext.i
>> nvokeNext(Standar
>>
>> dPipeline.java:641)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>> ine.java:4
>> 80)
>>
>> at
>>
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
>> gineValve.
>> java:174)
>>
>> at
>> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
>> eContext.i
>> nvokeNext(Standar
>>
>> dPipeline.java:643)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>> ine.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(Http11Process
>> or.java:78
>> 1)
>>
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
>> r.processC
>> onnection(Http11P
>>
>> rotocol.java:549)
>> at
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
>> nt.java:58
>> 9)
>>
>> at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
>> ThreadPool
>> .java:666)
>>
>> at java.lang.Thread.run(Thread.java:534)
>>
>>
>>
>>
>>
> ---------------------------------------------------------------------
>> 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
>
>>
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: r
> 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
>
>>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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