tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: Tomcat 5.5.25 -> 6.0.14 upgrade problem
Date Thu, 27 Sep 2007 15:42:20 GMT
hibernate is using the org.apache.commons.dbcp pool, so you need to 
configure that one, or tell hibernate to use tomcat's pool

the clue here is, that tomcat's connection pool (while the same as 
commons.dbcp) has the package renamed to org.apache.tomcat.dbcp.

this is a hibernate problem, your tomcat pool is configured correctly

Filip

aku1234 wrote:
> My code works on Tomcat 5.5.25, but when I move it to
> Tomcat 6.0.14 it stops working.  When it starts up
> it succefully loads Acegi(Spring) which is using JNDI.
> Then when it tries to load Hibernate which uses the
> same JNDI resource, it doesn't work.  Hibernate and JNDI
> work just fine on Tomcat 5.5.25.    
>
> The exception says that it's trying to connect to URL 'null' 
> which is pretty weird.  The "no suitable driver" message
> is probably a byproduct of the null URL, since ojdbc.jar
> is in the lib directory.   
>
>
> context.xml
> <Context docBase="oms" path="/oms" reloadable="true">
>       <Resource name="jdbc/OracleWellness"
>             type="javax.sql.DataSource" auth="Container"
> 		description="Database connection to Oracle wellness"
> 		driverClassName="oracle.jdbc.driver.OracleDriver" maxIdle="10"
> 		maxWait="1000" maxActive="20" username="foo" password="bar"
> 		url="jdbc:oracle:thin:@10.10.1.1:1521:topdb"  />
>
> web.xml
> <resource-ref>
>       <description>SQL Datasource for Oracle Wellness</description>
>       <res-ref-name>jdbc/OracleWellness</res-ref-name>
>       <res-type>javax.sql.DataSource</res-type>
>       <res-auth>Container</res-auth>
> </resource-ref>
>
> hibernate.cfg.xml
> <session-factory>
> 	<property name="hibernate.connection.datasource">
> 		java:comp/env/jdbc/OracleWellness
> 	</property>
> </session-factory>
>
> applicationContext-acegi-security.xml
> <bean id="dataSource"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>        <property name="jndiName">
>             <value>java:comp/env/jdbc/OracleWellness</value>
>        </property>
> </bean>
>
> INFO  DatasourceConnectionProvider - Using datasource:
> java:comp/env/jdbc/OracleWellness
> WARN  SettingsFactory - Could not obtain connection metadata
> org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
> class '' for connect URL 'null'
>         at
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
>         at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
>         at
> org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
>         at
> org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
>         at
> org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
>         at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
>         at
> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
>         at
> com.bhl.store.persistence.HibernateUtil.init(HibernateUtil.java:22)
>         at
> com.bhl.store.persistence.HibernateUtil.getSessionFactory(HibernateUtil.java:44)
>         at
> com.bhl.store.persistence.HibernateSessionRequestFilter.init(HibernateSessionRequestFilter.java:73)
>         at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:229)
>         at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:312)
>         at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:83)
>         at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3881)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4528)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:847)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:483)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:485)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.sql.SQLException: No suitable driver
>         at java.sql.DriverManager.getDriver(DriverManager.java:243)
>         at
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
>         ... 27 more
> INFO  Dialect - Using dialect: org.hibernate.dialect.Oracle10gDialect
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message