java.lang.ExceptionInInitializerError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Cannot build the Session Factory in Websphere 4.x with hibernate 2.1 Steps : 1. use the config file as shown below <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> <hibernate-configuration> <session-factory> <property name="connection.driver_class">COM.ibm.db2.jdbc.app.DB2Driver</property> <property name="connection.url">jdbc:db2:ENTDB</property> <property name="connection.username">db2admin</property> <property name="connection.password">db2admin</property> <property name="show_sql">true</property> <property name="dialect">net.sf.hibernate.dialect.DB2Dialect</property> <!-- <property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property> <property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property> <property name="jta.UserTransaction">UserTransaction</property> --> <mapping resource="resources/xml/BankInformation.hbm.xml"/> </session-factory> </hibernate-configuration> 2. Call the method sessionFactory = new Configuration().configure().buildSessionFactory(); 3. We see a Stack trace like this 2003-12-30 15:01:07,973 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20 java.lang.ExceptionInInitializerError: java.lang.NullPointerException at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.getUserPath(Win32FileSystem.java:283) at java.io.Win32FileSystem.resolve(Win32FileSystem.java:299) at java.io.File.getCanonicalPath(File.java:454) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1744) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1685) at java.lang.Runtime.loadLibrary0(Runtime.java:780) at java.lang.System.loadLibrary(System.java:865) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:227) at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:142) at net.sf.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:53) at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83) at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:64) at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1091) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:737) at com.i21.autopay.framework.persist.HibernateManager.init(HibernateManager.java:39) at test.workarea.TestHibernate.testHibernate(TestHibernate.java:42) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:166) at junit.framework.TestCase.runBare(TestCase.java:140) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151) 4. Please note that I recompiled the code with jdk1.3
    via by Niraj,
  • Cannot build the Session Factory in Websphere 4.x with hibernate 2.1 Steps : 1. use the config file as shown below <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> <hibernate-configuration> <session-factory> <property name="connection.driver_class">COM.ibm.db2.jdbc.app.DB2Driver</property> <property name="connection.url">jdbc:db2:ENTDB</property> <property name="connection.username">db2admin</property> <property name="connection.password">db2admin</property> <property name="show_sql">true</property> <property name="dialect">net.sf.hibernate.dialect.DB2Dialect</property> <!-- <property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property> <property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property> <property name="jta.UserTransaction">UserTransaction</property> --> <mapping resource="resources/xml/BankInformation.hbm.xml"/> </session-factory> </hibernate-configuration> 2. Call the method sessionFactory = new Configuration().configure().buildSessionFactory(); 3. We see a Stack trace like this 2003-12-30 15:01:07,973 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20 java.lang.ExceptionInInitializerError: java.lang.NullPointerException at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.getUserPath(Win32FileSystem.java:283) at java.io.Win32FileSystem.resolve(Win32FileSystem.java:299) at java.io.File.getCanonicalPath(File.java:454) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1744) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1685) at java.lang.Runtime.loadLibrary0(Runtime.java:780) at java.lang.System.loadLibrary(System.java:865) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:227) at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:142) at net.sf.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:53) at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83) at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:64) at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1091) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:737) at com.i21.autopay.framework.persist.HibernateManager.init(HibernateManager.java:39) at test.workarea.TestHibernate.testHibernate(TestHibernate.java:42) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:166) at junit.framework.TestCase.runBare(TestCase.java:140) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151) 4. Please note that I recompiled the code with jdk1.3
    via by Niraj,
  • J3d Security error
    via by Unknown,
  • Ready to throw in the towel
    via by 843802,
  • Tomcat hates JNI? Security issue?
    via by 843833,
  • Somebody could help me?
    via by 11803,
    • java.lang.ExceptionInInitializerError: java.lang.NullPointerException at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.getUserPath(Win32FileSystem.java:283) at java.io.Win32FileSystem.resolve(Win32FileSystem.java:299) at java.io.File.getCanonicalPath(File.java:454) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1744) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1685) at java.lang.Runtime.loadLibrary0(Runtime.java:780) at java.lang.System.loadLibrary(System.java:865) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:227) at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:142) at net.sf.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:53) at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83) at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:64) at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1091) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:737) at com.i21.autopay.framework.persist.HibernateManager.init(HibernateManager.java:39) at test.workarea.TestHibernate.testHibernate(TestHibernate.java:42) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:166) at junit.framework.TestCase.runBare(TestCase.java:140) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
    No Bugmate found.