Glassfish 3.1.2.1 and ObjectDB 2.4.3

#1

Hello,

I tried to get the Guestbook tutorial run with Glassfish (see above) but it's not working. When I try to add a guest I got a

HTTP Status 404

Wich versions of ObjectDB should I use?

Thanks

#2

Please provide more details:

  • There are several GuestBook examples - which one are you running?
  • Please specify the url that you are trying to access.
  • What tools are you using (IDE, Browser, etc.).

In addition, check if there are exceptions in the console or in the server log.

ObjectDB Support
#3

OK, I run the NetBeans/JPA Java EE 6 Guestbook with following url: http://localhost:8080/Guestbook-objectdb/guest.

I use firefox 15.0

When I try to add a guest I got a HTTP Status 404 - The requested resource () is not available.

I tried it on Glassfish server 3.1.2 and 3.1.2.2. Sometimes I get no execptions in server log and sometimes yes like here:

Launching GlassFish on Felix platform
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23)
INFO: Grizzly Framework 1.9.46 started in: 33ms - bound to [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.46 started in: 17ms - bound to [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.46 started in: 4ms - bound to [0.0.0.0:3700]
INFO: Grizzly Framework 1.9.46 started in: 12ms - bound to [0.0.0.0:4848]
INFO: Grizzly Framework 1.9.46 started in: 1ms - bound to [0.0.0.0:7676]
INFO: The Admin Console is already installed, but not yet loaded.
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
SEVERE: Exception while visiting com/objectdb/o/BTI.class of size 166
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:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

SEVERE: Exception while visiting com/objectdb/o/MST.class of size 22459
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:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

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 []
INFO: Hibernate Validator 4.2.0.Final
INFO: EJB5181:Portable JNDI names for EJB GuestDao: [java:global/Guestbook-objectdb/GuestDao, java:global/Guestbook-objectdb/GuestDao!guest.GuestDao]
INFO: WEB0671: Loading application [Guestbook-objectdb] at [/Guestbook-objectdb]
INFO: CORE10010: Loading application Guestbook-objectdb done in 4,303 ms
INFO: GlassFish Server Open Source Edition 3.1.2 (23) startup time : Felix (2,562ms), startup services(5,018ms), total(7,580ms)
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.46 started in: 2ms - bound to [0.0.0.0:8080]
INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://aliph3:8686/jndi/rmi://aliph3:8686/jmxrmi
INFO: Initiating Jersey application, version 'Jersey: 1.11 12/09/2011 10:27 AM'
INFO: EJB5181:Portable JNDI names for EJB GuestDao: [java:global/Guestbook-objectdb/GuestDao, java:global/Guestbook-objectdb/GuestDao!guest.GuestDao]
INFO: WEB0671: Loading application [Guestbook-objectdb] at [/Guestbook-objectdb]
INFO: Guestbook-objectdb was successfully deployed in 2,062 milliseconds.
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
INFO: REST00001: Listening to REST requests at context: /management/domain
INFO: Grizzly Framework 1.9.46 started in: 6ms - bound to [0.0.0.0:8181]
INFO: The Admin Console is already installed, but not yet loaded.
INFO: The Admin Console is starting. Please wait.
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''
INFO: WEB0671: Loading application [__admingui] at [/]
INFO: CORE10010: Loading application __admingui done in 3,106 ms
INFO: The Admin Console application is loaded.
INFO: Redirecting to /common/index.jsf
INFO: Admin-Konsole: Sessionattribute werden initialisiert...

..and sometime nothing like:

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: 30ms - bound to [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 13ms - bound to [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.50 started in: 8ms - bound to [0.0.0.0:4848]
INFO: Grizzly Framework 1.9.50 started in: 5ms - bound to [0.0.0.0:3700]
INFO: Grizzly Framework 1.9.50 started in: 2ms - 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 []
INFO: HV000001: Hibernate Validator 4.3.0.Final
INFO: EJB5181:Portable JNDI names for EJB GuestDao: [java:global/Guestbook-objectdb/GuestDao, java:global/Guestbook-objectdb/GuestDao!guest.GuestDao]
INFO: WEB0671: Loading application [Guestbook-objectdb] at [/Guestbook-objectdb]
INFO: CORE10010: Loading application Guestbook-objectdb done in 4.029 ms
INFO: GlassFish Server Open Source Edition 3.1.2.2 (5) Startzeit: Felix (1.520ms), Startservices(4.726ms), gesamt(6.246ms)
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 1ms - bound to [0.0.0.0:8080]
INFO: Initiating Jersey application, version 'Jersey: 1.11.1 03/31/2012 06:49 PM'
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.50 started in: 10ms - bound to [0.0.0.0:8181]
INFO: REST00001: Listening to REST requests at context: /management/domain
INFO: The Admin Console is already installed, but not yet loaded.
INFO: The Admin Console is starting. Please wait.
INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://aliph3:8686/jndi/rmi://aliph3:8686/jmxrmi
INFO: Mojarra 2.1.6 (SNAPSHOT 20111206) für Kontext '' wird initialisiert.
INFO: WEB0671: Loading application [__admingui] at [/]
INFO: CORE10010: Loading application __admingui done in 2.460 ms
INFO: The Admin Console application is loaded.

I have no clue what's wrong.

#4

I just tried the Java EE GuestBook tutorial with NetBeans 7.2 + GlassFish 3.1.2.1 + ObjectDB 2.4.3 and it worked.

Please try:

  • Download and install NetBeans 7.2.
  • Download and extract ObjectDB 2.4.3.
  • In NetBeans open the project objectdb-2.4.3\tutorials\guestbook-jee6
  • In the pom.xml file change 2.4.0 to 2.4.3 (but 2.4.0 should also work).
  • Run the project (F6).
ObjectDB Support
#5

Yes it works fine! Now I've to figure out why my netbeans project doesn't work properly.

Thank u very much for the fast support.

Reply