java.lang.ExceptionInInitializerError

Spring JIRA | Lars Hoss | 1 decade ago
  1. 0

    Upgraded to Spring 1.0.1 today. Now my application failes during the initializiation of my JdbcTemplate: java.lang.ExceptionInInitializerError at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:99) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:88) at org.springframework.jdbc.support.JdbcAccessor.getExceptionTranslator(JdbcAccessor.java:74) at org.springframework.jdbc.support.JdbcAccessor.afterPropertiesSet(JdbcAccessor.java:87) followd by: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PostgreSQL' defined in class path resource [org/springframework/jdbc/support/sql-error-codes.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Property 'useSqlStateForTranslation' is not writable in bean class [org.springframework.jdbc.support.SQLErrorCodes] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:575) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:409) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:183) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.jdbc.support.SQLErrorCodesFactory.<init>(SQLErrorCodesFactory.java:112) at org.springframework.jdbc.support.SQLErrorCodesFactory.<clinit>(SQLErrorCodesFactory.java:74) ... 73 more Caused by: org.springframework.beans.NotWritablePropertyException: Property 'useSqlStateForTranslation' is not writable in bean class [org.springframework.jdbc.support.SQLErrorCodes] at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:586) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:540) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:642) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:669) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:658) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:570) ... 78 more I have simply set up a jdbc template: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <!-- The DataSource --> <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" singleton="true"> <property name="jndiName"><value>java:comp/env/jdbc/sitebaseDS</value></property> </bean> <!-- Configure JdbcTemplate--> <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource"><ref local="dataSource"/></property> </bean> ...

    Spring JIRA | 1 decade ago | Lars Hoss
    java.lang.ExceptionInInitializerError
  2. 0

    Upgraded to Spring 1.0.1 today. Now my application failes during the initializiation of my JdbcTemplate: java.lang.ExceptionInInitializerError at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:99) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:88) at org.springframework.jdbc.support.JdbcAccessor.getExceptionTranslator(JdbcAccessor.java:74) at org.springframework.jdbc.support.JdbcAccessor.afterPropertiesSet(JdbcAccessor.java:87) followd by: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PostgreSQL' defined in class path resource [org/springframework/jdbc/support/sql-error-codes.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Property 'useSqlStateForTranslation' is not writable in bean class [org.springframework.jdbc.support.SQLErrorCodes] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:575) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:409) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:183) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.jdbc.support.SQLErrorCodesFactory.<init>(SQLErrorCodesFactory.java:112) at org.springframework.jdbc.support.SQLErrorCodesFactory.<clinit>(SQLErrorCodesFactory.java:74) ... 73 more Caused by: org.springframework.beans.NotWritablePropertyException: Property 'useSqlStateForTranslation' is not writable in bean class [org.springframework.jdbc.support.SQLErrorCodes] at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:586) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:540) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:642) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:669) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:658) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:570) ... 78 more I have simply set up a jdbc template: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <!-- The DataSource --> <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" singleton="true"> <property name="jndiName"><value>java:comp/env/jdbc/sitebaseDS</value></property> </bean> <!-- Configure JdbcTemplate--> <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource"><ref local="dataSource"/></property> </bean> ...

    Spring JIRA | 1 decade ago | Lars Hoss
    java.lang.ExceptionInInitializerError
  3. 0

    db:: 4.71::BEA-001129:Received exception while creating connection for pool sc

    hivmr.com | 5 months ago
    java.lang.ExceptionInInitializerError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException - Calendar.getInstance()

    GitHub | 1 year ago | danielross
    java.lang.ExceptionInInitializerError

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ExceptionInInitializerError

      No message provided

      at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource()
    2. Spring Framework
      JdbcAccessor.afterPropertiesSet
      1. org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:99)
      2. org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:88)
      3. org.springframework.jdbc.support.JdbcAccessor.getExceptionTranslator(JdbcAccessor.java:74)
      4. org.springframework.jdbc.support.JdbcAccessor.afterPropertiesSet(JdbcAccessor.java:87)
      4 frames