Issue Details (XML | Word | Printable)

Key: GLASSFISH-18609
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Mahesh Kannan
Reporter: emailnbw
Votes: 19
Watchers: 18
Operations

If you were logged in you would be able to see more operations.
glassfish

Glassfish throws NullPointerException on startup

Created: 10/Apr/12 03:39 AM   Updated: 08/Aug/13 03:07 PM
Component/s: other
Affects Version/s: 3.1.2
Fix Version/s: None

Time Tracking:
Not Specified

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


Tags:
Participants: disney2002, emailnbw, gfuser9999, Hong Zhang, jmkgreen, jwells, kithouna, linuxhippy, Mahesh Kannan, mhankus, rusty_turkey and smithh032772


 Description  « Hide

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.



linuxhippy added a comment - 08/Aug/13 03:07 PM

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)

#]

gfuser9999 added a comment - 02/Jun/13 03:30 AM

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


disney2002 added a comment - 30/May/13 06:34 AM

got the same problem while using GlassFish 3.1.2.2.

and restart glassfish maybe the will not happen.


kithouna added a comment - 08/Apr/13 10:03 AM

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.


gfuser9999 added a comment - 16/Sep/12 04:35 AM

See also GLASSFISH-18513


jwells added a comment - 04/Sep/12 10:55 AM

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


smithh032772 added a comment - 04/Sep/12 03:29 AM

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


jmkgreen added a comment - 25/Jul/12 02:39 PM

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.


rusty_turkey added a comment - 17/May/12 11:31 PM

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


mhankus added a comment - 05/May/12 12:05 PM

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


Hong Zhang added a comment - 10/Apr/12 01:50 PM

assign to HK2 team evaluation