Unable to load the driver class - Mailing list pgsql-jdbc

From Vernon
Subject Unable to load the driver class
Date
Msg-id 20050406225214.75231.qmail@web40526.mail.yahoo.com
Whole thread Raw
List pgsql-jdbc
I have the postgresql-8.0.309.jdbc2.jar in my
application  library directry. The Hibernate complains
it can't load the driver class. Any clues? The
followings are the error stack:

2005-04-06 15:01:46,953 WARN
net.sf.hibernate.util.JDBCExceptionReporter - SQL
Error: 0, SQLState: null
2005-04-06 15:01:46,953 ERROR
net.sf.hibernate.util.JDBCExceptionReporter - Cannot
load JDBC driver class 'org.postgresql.Driver'
2005-04-06 15:01:46,968 WARN
net.sf.hibernate.cfg.SettingsFactory - Could not
obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot
load JDBC driver class 'org.postgresql.Driver'
    at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
    at

org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:59)
    at
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
    at
net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
    at
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
    at
org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:475)
    at
org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:413)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1037)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:305)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:945)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:879)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:820)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:648)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:288)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:945)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:879)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:820)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:648)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:288)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:945)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:879)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:820)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:648)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:288)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
    at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:496)
    at
org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:162)
    at
org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext(SimpleUrlHandlerMapping.java:96)
    at
org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:89)
    at

org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:79)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:185)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:304)
    at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:223)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:236)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
    at

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:261)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317)
    at

org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:131)
    at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:283)
    at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:230)
    at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:199)
    at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:103)
    at
javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
    at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
    at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
    at
org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
    at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at
org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    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.start(Bootstrap.java:287)
    at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Caused by: java.lang.ClassNotFoundException:
org.postgresql.Driver
    at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854)
    at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721)
    at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
    ... 81 more



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: UNICODE encoding and jdbc related issues
Next
From: Markus Schaber
Date:
Subject: Re: An I/O error occured while sending to the backend