glassfish
  1. glassfish
  2. GLASSFISH-18609

Glassfish throws NullPointerException on startup

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: other
    • Labels:
      None
    • Environment:

      Windows Server 2008 R2 Standard SP1 & Windows XP Version 2003 SP2 x64, JDK 1.7u3, GF 3.1.2, embedded derby drivers and Oracle ojdbc6

      Description

      During GF server startup/restart the following SEVERE exception is thrown:

      [#|2012-04-09T23:29:00.171-0400|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=57;_ThreadName=Thread-2;|Exception while visiting com/sun/gjc/spi/JdbcObjectsFactory.class of size 3630
      java.lang.NullPointerException
      at org.glassfish.hk2.classmodel.reflect.impl.TypesImpl.getType(TypesImpl.java:78)
      at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor.visit(ModelClassVisitor.java:119)
      at org.objectweb.asm.ClassReader.accept(Unknown Source)
      at org.objectweb.asm.ClassReader.accept(Unknown Source)
      at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363)
      at org.glassfish.hk2.classmodel.reflect.util.JarArchive.onSelectedEntries(JarArchive.java:125)
      at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:348)
      at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:70)
      at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:307)
      at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:296)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

      #]

      This may be related to http://java.net/jira/browse/GLASSFISH-17061. One of our environments where we see this uses the bundled embedded derby with a GF managed Derby connection pool. The other environment we see this uses Oracle's ojdbc6 thin driver with a GF managed JDBC connection pool/resource.

        Activity

        emailnbw created issue -
        Hide
        Hong Zhang added a comment -

        assign to HK2 team evaluation

        Show
        Hong Zhang added a comment - assign to HK2 team evaluation
        Hong Zhang made changes -
        Field Original Value New Value
        Assignee Hong Zhang [ hzhang_jn ] jwells [ jwells ]
        Component/s other [ 10611 ]
        Component/s deployment [ 10594 ]
        Hide
        mhankus added a comment -

        Stacktrace is exactly the same as GLASSFISH-18513.
        It happens to me too

        Show
        mhankus added a comment - Stacktrace is exactly the same as GLASSFISH-18513 . It happens to me too
        Hide
        rusty_turkey added a comment -

        I also get error intermittently, and I already am already watching GLASSFISH-18513

        Show
        rusty_turkey added a comment - I also get error intermittently, and I already am already watching GLASSFISH-18513
        Hide
        jmkgreen added a comment -

        Me too... In my case my .war had other faults. As seems usual, Glassfish decided to give me an apparently random NPE and stacktrace instead of the real error. JBoss told me exactly what was wrong.

        Show
        jmkgreen added a comment - Me too... In my case my .war had other faults. As seems usual, Glassfish decided to give me an apparently random NPE and stacktrace instead of the real error. JBoss told me exactly what was wrong.
        Hide
        smithh032772 added a comment -

        Interesting, I am running on Windows Server 2008 (test/development) and Windows Server 2003 (production), and I see this error on startup or restart of Glassfish via NetBeans 7.2. I don't recall if I see this error on Windows Server 2003 when deploying app via NetBeans 7.1.2. Anyway, here is system log from beginning:

        Launching GlassFish on Felix platform
        INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
        INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
        INFO: Grizzly Framework 1.9.50 started in: 19ms - bound to [0.0.0.0:8181]
        INFO: Grizzly Framework 1.9.50 started in: 60ms - bound to [0.0.0.0:8080]
        INFO: Grizzly Framework 1.9.50 started in: 4ms - bound to [0.0.0.0:4848]
        INFO: Grizzly Framework 1.9.50 started in: 13ms - bound to [0.0.0.0:3700]
        INFO: Grizzly Framework 1.9.50 started in: 15ms - bound to [0.0.0.0:7676]
        INFO: The Admin Console is already installed, but not yet loaded.
        INFO: Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false
        INFO: SEC1002: Security Manager is OFF.
        INFO: SEC1010: Entering Security Startup Service
        INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
        INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
        INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
        INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
        INFO: SEC1011: Security Service(s) Started Successfully
        INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
        INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
        INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]
        INFO: WEB0171: Created virtual server [server]
        INFO: WEB0171: Created virtual server [__asadmin]
        INFO: WEB0172: Virtual server [server] loaded default web module []
        SEVERE: Exception while visiting com/sun/gjc/spi/JdbcObjectsFactory.class of size 3615
        java.lang.NullPointerException
        at org.glassfish.hk2.classmodel.reflect.impl.TypesImpl.getType(TypesImpl.java:78)
        at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor.visit(ModelClassVisitor.java:119)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363)
        at org.glassfish.hk2.classmodel.reflect.util.JarArchive.onSelectedEntries(JarArchive.java:125)
        at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:348)
        at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:70)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:307)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:296)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

        INFO: HV000001: Hibernate Validator 4.3.0.Final
        INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461

        Show
        smithh032772 added a comment - Interesting, I am running on Windows Server 2008 (test/development) and Windows Server 2003 (production), and I see this error on startup or restart of Glassfish via NetBeans 7.2. I don't recall if I see this error on Windows Server 2003 when deploying app via NetBeans 7.1.2. Anyway, here is system log from beginning: Launching GlassFish on Felix platform INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5) INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry INFO: Grizzly Framework 1.9.50 started in: 19ms - bound to [0.0.0.0:8181] INFO: Grizzly Framework 1.9.50 started in: 60ms - bound to [0.0.0.0:8080] INFO: Grizzly Framework 1.9.50 started in: 4ms - bound to [0.0.0.0:4848] INFO: Grizzly Framework 1.9.50 started in: 13ms - bound to [0.0.0.0:3700] INFO: Grizzly Framework 1.9.50 started in: 15ms - bound to [0.0.0.0:7676] INFO: The Admin Console is already installed, but not yet loaded. INFO: Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false INFO: SEC1002: Security Manager is OFF. INFO: SEC1010: Entering Security Startup Service INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created. INFO: SEC1011: Security Service(s) Started Successfully INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848] INFO: WEB0171: Created virtual server [server] INFO: WEB0171: Created virtual server [__asadmin] INFO: WEB0172: Virtual server [server] loaded default web module [] SEVERE: Exception while visiting com/sun/gjc/spi/JdbcObjectsFactory.class of size 3615 java.lang.NullPointerException at org.glassfish.hk2.classmodel.reflect.impl.TypesImpl.getType(TypesImpl.java:78) at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor.visit(ModelClassVisitor.java:119) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363) at org.glassfish.hk2.classmodel.reflect.util.JarArchive.onSelectedEntries(JarArchive.java:125) at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:348) at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:70) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:307) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:296) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) INFO: HV000001: Hibernate Validator 4.3.0.Final INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
        Hide
        jwells added a comment -

        Classmodel is only used by the config subsystem, so assigning to Mahesh.

        Show
        jwells added a comment - Classmodel is only used by the config subsystem, so assigning to Mahesh.
        jwells made changes -
        Assignee jwells [ jwells ] Mahesh Kannan [ mk111283 ]
        Hide
        gfuser9999 added a comment -

        See also GLASSFISH-18513

        Show
        gfuser9999 added a comment - See also GLASSFISH-18513
        Hide
        kithouna added a comment -

        I've got the exact same exception using GlassFish 3.1.2.2 and an h2 database version 1.3.170. Please fix this, it's really annoying.

        Show
        kithouna added a comment - I've got the exact same exception using GlassFish 3.1.2.2 and an h2 database version 1.3.170. Please fix this, it's really annoying.
        Hide
        disney2002 added a comment -

        got the same problem while using GlassFish 3.1.2.2.

        and restart glassfish maybe the will not happen.

        Show
        disney2002 added a comment - got the same problem while using GlassFish 3.1.2.2. and restart glassfish maybe the will not happen.
        Hide
        gfuser9999 added a comment -

        I thought the fix made to 3.1.2.4 (available from Oracle)
        since many months now (on the HK2 module) for GF-18513. See
        https://blogs.oracle.com/GlassFishForBusiness/entry/oracle_glassfish_server_ogfs_v3
        15884192 INTEGRATE NEW HK2
        14512884 EXCEPTION WHILE VISITING COM/SUN/GJC/COMMON/DATASOURCESPEC.CLASS OF SIZE 3267

        Show
        gfuser9999 added a comment - I thought the fix made to 3.1.2.4 (available from Oracle) since many months now (on the HK2 module) for GF-18513. See https://blogs.oracle.com/GlassFishForBusiness/entry/oracle_glassfish_server_ogfs_v3 15884192 INTEGRATE NEW HK2 14512884 EXCEPTION WHILE VISITING COM/SUN/GJC/COMMON/DATASOURCESPEC.CLASS OF SIZE 3267
        Hide
        linuxhippy added a comment -

        Same here on Linux x86_64 with:

        java version "1.7.0_25"
        OpenJDK Runtime Environment (fedora-2.3.12.3.fc19-x86_64)
        OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

        Stack: [#|2013-08-08T17:01:44.899+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=85;_ThreadName=Thread-2;|Exception while visiting EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.class of size 6209
        java.lang.NullPointerException
        at org.glassfish.hk2.classmodel.reflect.impl.TypesImpl.getType(TypesImpl.java:78)
        at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor.visit(ModelClassVisitor.java:119)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:171)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:133)
        at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:348)
        at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:70)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:307)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:296)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)

        #]
        Show
        linuxhippy added a comment - Same here on Linux x86_64 with: java version "1.7.0_25" OpenJDK Runtime Environment (fedora-2.3.12.3.fc19-x86_64) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) Stack: [#|2013-08-08T17:01:44.899+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=85;_ThreadName=Thread-2;|Exception while visiting EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.class of size 6209 java.lang.NullPointerException at org.glassfish.hk2.classmodel.reflect.impl.TypesImpl.getType(TypesImpl.java:78) at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor.visit(ModelClassVisitor.java:119) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:171) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:133) at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:348) at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:70) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:307) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:296) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) #]

          People

          • Assignee:
            Mahesh Kannan
            Reporter:
            emailnbw
          • Votes:
            21 Vote for this issue
            Watchers:
            18 Start watching this issue

            Dates

            • Created:
              Updated: