daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Apr 2nd, 2014 28 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Grave: Context initialization failed
  2. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [jpaContext.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [jpaContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  3. PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.postgresql.driver]
  4.     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
  5.     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
  6.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
  7.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
  8.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
  9.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  10.     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
  11.     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  12.     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
  13.     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  14.     at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
  15.     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
  16.     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
  17.     at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
  18.     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
  19.     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
  20.     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
  21.     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
  22.     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  23.     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
  24.     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
  25.     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  26.     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  27.     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  28.     at java.lang.Thread.run(Thread.java:744)
  29. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [jpaContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  30. PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.postgresql.driver]
  31.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1427)
  32.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
  33.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
  34.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  35.     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
  36.     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  37.     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
  38.     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  39.     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
  40.     ... 24 more
  41. Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  42. PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.postgresql.driver]
  43.     at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:101)
  44.     at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
  45.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1424)
  46.     ... 32 more
  47.  
  48. févr. 11, 2014 2:53:35 PM org.apache.catalina.core.StandardContext listenerStart
  49. Grave: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener
  50. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [jpaContext.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [jpaContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  51. PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.postgresql.driver]
  52.     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
  53.     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
  54.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
  55.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
  56.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
  57.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  58.     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
  59.     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  60.     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
  61.     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  62.     at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
  63.     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
  64.     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
  65.     at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
  66.     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
  67.     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
  68.     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
  69.     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
  70.     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  71.     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
  72.     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
  73.     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  74.     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  75.     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  76.     at java.lang.Thread.run(Thread.java:744)
  77. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [jpaContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  78. PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.postgresql.driver]
  79.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1427)
  80.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
  81.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
  82.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  83.     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
  84.     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  85.     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
  86.     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  87.     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
  88.     ... 24 more
  89. Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
  90. PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.postgresql.driver]
  91.     at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:101)
  92.     at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
  93.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1424)
  94.     ... 32 more
  95.        
  96. <?xml version="1.0" encoding="UTF-8"?>
  97. <beans xmlns="http://www.springframework.org/schema/beans"
  98.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  99.     xmlns:tx="http://www.springframework.org/schema/tx"
  100.     xmlns:context="http://www.springframework.org/schema/context"
  101.     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  102.         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
  103.         http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
  104.  
  105.     <context:annotation-config />
  106.     <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
  107.  
  108.  
  109.     <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
  110.         <property name="persistenceUnitName" value="punit"/>
  111.         <property name="dataSource" ref="dataSource" />
  112.         <property name="jpaVendorAdapter">
  113.             <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
  114.                 <property name="showSql" value="true" />
  115.             </bean>
  116.         </property>
  117.  
  118.         <property name="jpaPropertyMap">
  119.             <map>
  120.                 <entry key="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect" />
  121.                 <entry key="hibernate.hbm2ddl.auto" value="none" />
  122.                 <entry key="hibernate.format_sql" value="true" />
  123.  
  124.             </map>
  125.         </property>
  126.  
  127.     </bean>
  128.  
  129.     <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
  130.             <property name="entityManagerFactory" ref="entityManagerFactory" />
  131.     </bean>
  132.  
  133.     <tx:annotation-driven transaction-manager="transactionManager"/>
  134.     <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" >
  135.         <property name ="driverClassName" value="com.postgresql.driver" />
  136.         <property name ="url" value="jdbc:postgres://localhost:5432/fitnessTracker?autoReconnect=true" />
  137.         <property name="username" value="postgres" />
  138.         <property name="password" value="admin" />
  139.     </bean>
  140. </beans>
  141.        
  142. <?xml version="1.0" encoding="UTF-8"?>
  143. <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
  144.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  145.     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  146.     <context-param>
  147.  
  148.     <param-name>contextConfigLocation </param-name>
  149.     <param-value>classpath:/jpaContext.xml</param-value>
  150.  
  151.     </context-param>
  152.  
  153.     <listener>
  154.         <listener-class>org.springframework.web.context.ContextLoaderListner</listener-class>
  155.     </listener>
  156.     <servlet>
  157.         <servlet-name>fitTrackerServlet</servlet-name>
  158.         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  159.         <init-param>
  160.             <param-name>contextConfigLocation</param-name>
  161.             <param-value>/WEB-INF/config/servlet-config.xml, /WEB-INF/config/jpaContext.xml</param-value>
  162.         </init-param>
  163.     </servlet>
  164.  
  165.     <servlet-mapping>
  166.         <servlet-name>fitTrackerServlet</servlet-name>
  167.         <url-pattern>*.html</url-pattern>
  168.     </servlet-mapping>
  169.  
  170.     <servlet-mapping>
  171.         <servlet-name>fitTrackerServlet</servlet-name>
  172.         <url-pattern>/pdfs/**</url-pattern>
  173.     </servlet-mapping>
  174.  
  175.     <servlet-mapping>
  176.         <servlet-name>fitTrackerServlet</servlet-name>
  177.         <url-pattern>/images/**</url-pattern>
  178.     </servlet-mapping>
  179.  
  180.     <servlet-mapping>
  181.         <servlet-name>fitTrackerServlet</servlet-name>
  182.         <url-pattern>*.json</url-pattern>
  183.     </servlet-mapping>
  184.  
  185.     <display-name>Archetype Created Web Application</display-name>
  186. </web-app>
  187.        
  188. java.lang.IllegalStateException: Could not load JDBC driver class [com.postgresql.driver]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top