October 2014 Posts

How To Fix Glassfish’s Exception “only one instance running in the cluster”

Recently ive met a new exception on my Glassfish 3.1 log file, here is the complete stack trace

[#|2014-10-09T13:22:09.248+0700|INFO|glassfish3.1.2|
org.shoal.ha.cache.command.load_request|_ThreadID=301;_ThreadName=Thread-2;|
Skipped Loading of 396544c17b8bbbc620000f9b2196 since there is only one instance running in the cluster.|#]

Because of this error, somehow im unable to do a session failover on my Glassfish.

Using asadmin get-health show that my instance are both healthy and alive

glassfish3>asadmin get-health
Enter the value for the clusterName operand> cluster1
instance1 started since Thu Oct 09 16:43:21 ICT 2014
instance2 started since Thu Oct 09 16:45:40 ICT 2014
Command get-health executed successfully.

but both instances started not at the same time.

So what i do is very simple, i restarted my cluster so both of my instances started at the same time. And somehow, my error is gone and i can do failover seamlessly.

restart glassfish cluster

Google+

A Weird Error At Glassfish, “Class [ java/lang/AutoCloseable ] not found.”

Today i’ve found a very weird error on my Glassfish 3.1, here is the complete stack trace

[#|2014-10-09T10:54:02.685+0700|SEVERE|glassfish3.1.2|global|_ThreadID=24;_ThreadName=Thread-2;
|Class [ java/lang/AutoCloseable ] not found. 
Error while loading [ class com.edw.dodol.service.MyService ]|#]

Im using SpringMVC and the error affect all my service classes, so somehow my application is unable to start.
After trying several solution, i found out that my JAVA_HOME variable are still pointing to a JDK6 version, while my application need at least JDK7.

Changing my JAVA_HOME variable into JDK7 solve this issue.

A very weird error actually, usually running an application under a different SDK version will create a “Major-Minor Version Exception”, but somehow i cant see that error anywhere :-(

Google+