java.lang.ExceptionInInitializerError: java.lang.NullPointerException at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code))

Hibernate JIRA | Niraj | 1 decade ago
  1. 0

    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

    Hibernate JIRA | 1 decade ago | Niraj
    java.lang.ExceptionInInitializerError: java.lang.NullPointerException at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code))
  2. 0

    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

    Hibernate JIRA | 1 decade ago | Niraj
    java.lang.ExceptionInInitializerError: java.lang.NullPointerException at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code)) at java.io.Win32FileSystem.normalize(Win32FileSystem.java(Compiled Code))
  3. 0

    J3d Security error

    Google Groups | 2 decades ago | Unknown
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.J3D ) at java.security.AccessControlContext.checkPermission(Compiled Code) at java.security.AccessController.checkPermission(Compiled Code) at java.lang.SecurityManager.checkPermission(Compiled Code)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JNI Works for application, but not when used over Tomcat...

    Oracle Community | 2 decades ago | 843829
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.native)
  6. 0

    Question about Signed Applets with JNI

    Oracle Community | 1 decade ago | 843811
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: ac ess denied (java.lang.RuntimePermission loadLibrary.InstanceMethodCall)

    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

      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()
    2. Java RT
      System.loadLibrary
      1. java.io.Win32FileSystem.getUserPath(Win32FileSystem.java:283)
      2. java.io.Win32FileSystem.resolve(Win32FileSystem.java:299)
      3. java.io.File.getCanonicalPath(File.java:454)
      4. java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1744)
      5. java.lang.ClassLoader.loadLibrary(ClassLoader.java:1685)
      6. java.lang.Runtime.loadLibrary0(Runtime.java:780)
      7. java.lang.System.loadLibrary(System.java:865)
      7 frames
    3. COM.ibm.db2
      DB2Driver.<clinit>
      1. COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:227)
      2. COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130)
      2 frames
    4. Java RT
      Class.forName
      1. java.lang.Class.forName1(Native Method)
      2. java.lang.Class.forName(Class.java:142)
      2 frames
    5. net.sf.hibernate
      Configuration.buildSessionFactory
      1. net.sf.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:53)
      2. net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
      3. net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:64)
      4. net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1091)
      5. net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:737)
      5 frames
    6. com.i21.autopay
      HibernateManager.init
      1. com.i21.autopay.framework.persist.HibernateManager.init(HibernateManager.java:39)
      1 frame
    7. test.workarea
      TestHibernate.testHibernate
      1. test.workarea.TestHibernate.testHibernate(TestHibernate.java:42)
      1 frame
    8. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    9. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runTest(TestCase.java:166)
      2. junit.framework.TestCase.runBare(TestCase.java:140)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:131)
      7. junit.framework.TestSuite.runTest(TestSuite.java:173)
      8. junit.framework.TestSuite.run(TestSuite.java:168)
      8 frames
    10. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
      3 frames