-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate tries to use conn. config, but DataSource is jndi
PostPosted: Sat Oct 18, 2003 1:07 am 
Newbie

Joined: Tue Sep 30, 2003 8:14 pm
Posts: 10
Location: Southern Cali.
I'm using Tomcat, Spring, and Hibernate. The app. uses a DataSource
made available using Tomcat's JNDI and a SessionFactory made
available by Spring in a WebApplicationContext. My application works great and the DataSource is used just fine, but when the SessionFactory
is initialized, I get the following Exceptions. Is there some configuration
issue that would make this occur? It doesn't seem to make my
app. hiccup whatsoever. I just don't like seeing exceptions popup when
I run my apps!!!



21:40:55,525 DEBUG JDBCExceptionReporter:36 - SQL Exception
java.sql.SQLException: Cannot load JDBC driver class 'null'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:44)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:167)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:221)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:189)
at org.springframework.beans.factory.support.AbstractBeanFactory.callLifecycleMethodsIfNecessary(AbstractBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.AbstractBeanFactory.getSharedInstance(AbstractBeanFactory.java:232)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBeanInternal(AbstractBeanFactory.java:161)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveReference(AbstractBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveValueIfNecessary(AbstractBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.applyPropertyValues(AbstractBeanFactory.java:327)
at org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.AbstractBeanFactory.getSharedInstance(AbstractBeanFactory.java:232)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBeanInternal(AbstractBeanFactory.java:161)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:139)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:478)
at org.springframework.context.support.AbstractApplicationContext.preInstantiateSingletons(AbstractApplicationContext.java:308)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:234)
at org.springframework.web.context.support.XmlWebApplicationContext.setServletContext(XmlWebApplicationContext.java:121)
at org.springframework.web.context.ContextLoader.initContext(ContextLoader.java:55)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:29)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:307)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
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:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
21:40:55,535 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
21:40:55,535 ERROR JDBCExceptionReporter:46 - Cannot load JDBC driver class 'null'
21:40:55,535 WARN SessionFactoryImpl:178 - Could not obtain connection metadata
java.sql.SQLException: Cannot load JDBC driver class 'null'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:44)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:167)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:221)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:189)
at org.springframework.beans.factory.support.AbstractBeanFactory.callLifecycleMethodsIfNecessary(AbstractBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.AbstractBeanFactory.getSharedInstance(AbstractBeanFactory.java:232)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBeanInternal(AbstractBeanFactory.java:161)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveReference(AbstractBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveValueIfNecessary(AbstractBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.applyPropertyValues(AbstractBeanFactory.java:327)
at org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.AbstractBeanFactory.getSharedInstance(AbstractBeanFactory.java:232)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBeanInternal(AbstractBeanFactory.java:161)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:139)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:478)
at org.springframework.context.support.AbstractApplicationContext.preInstantiateSingletons(AbstractApplicationContext.java:308)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:234)
at org.springframework.web.context.support.XmlWebApplicationContext.setServletContext(XmlWebApplicationContext.java:121)
at org.springframework.web.context.ContextLoader.initContext(ContextLoader.java:55)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:29)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:307)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
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:324)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.