3
votes

We have deployed application on glassfish3 server on Windows machine. The server and application were running fine. In the glassfish console, I restarted the server but it didn't start again.

I also tried from the command prompt(as administrator) but getting below error log:


C:\glassfish3\glassfish\bin> asadmin -p 4841 start-domain domain1 Waiting for domain1 to start ..Error starting domain domain1. The server exited prematurely with exit code 1. Before it died, it produced the following output:

Launching GlassFish on Felix platform ERROR: Error parsing system bundle export statement: org.osgi.framework; version=1.6.0, org.osgi.framework.launch; versi on=1.0.0, org.osgi.framework.wiring; version=1.0.0, org.osgi.framework.startlevel; version=1.0.0, org.osgi.framework.hoo ks.bundle; version=1.0.0, org.osgi.framework.hooks.resolver; version=1.0.0, org.osgi.framework.hooks.service; version=1. 1.0, org.osgi.framework.hooks.weaving; version=1.0.0, org.osgi.service.packageadmin; version=1.2.0, org.osgi.service.sta rtlevel; version=1.1.0, org.osgi.service.url; version=1.0.0, org.osgi.util.tracker; version=1.5.0, , org.glassfish.embed dable;org.glassfish.embeddable.spi;version=3.1.1 (org.osgi.framework.BundleException: Exported package names cannot be z ero length.) ERROR: Unable to re-install file:/C:/glassfish3/glassfish/modules/javax.transaction.jar (org.osgi.framework.BundleExcept ion: Could not create bundle object.) ERROR: Unable to re-install file:/C:/glassfish3/glassfish/modules/webservices-extra-jdk-packages.jar (org.osgi.framework .BundleException: Could not create bundle object.) ERROR: Unable to re-install file:/C:/glassfish3/glassfish/modules/flashlight-extra-jdk-packages.jar (org.osgi.framework. BundleException: Could not create bundle object.) ERROR: Unable to re-install file:/C:/glassfish3/glassfish/modules/glassfish-corba-omgapi.jar (org.osgi.framework.BundleE xception: Could not create bundle object.) ERROR: Unable to re-install file:/C:/glassfish3/glassfish/modules/glassfish-extra-jre-packages.jar (org.osgi.framework.B undleException: Could not create bundle object.) ERROR: Unable to re-install file:/C:/glassfish3/glassfish/modules/glassfish-oracle-jdbc-driver-packages.jar (org.osgi.fr amework.BundleException: Could not create bundle object.) ERROR: Bundle jaxb-api [2] Error starting file:/C:/glassfish3/glassfish/modules/endorsed/jaxb-api-osgi.jar (org.osgi.fra mework.BundleException: Unresolved constraint in bundle jaxb-api [2]: Unable to resolve 2.0: missing requirement [2.0] o sgi.wiring.package; (osgi.wiring.package=javax.activation)) ERROR: Bundle org.glassfish.metro.webservices-api-osgi [3] Error starting file:/C:/glassfish3/glassfish/modules/endorsed /webservices-api-osgi.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.metro.webse rvices-api-osgi [3]: Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (&(osgi.wiring.package=javax. xml.bind)(version>=2.2.0)) [caused by: Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package; (osgi.wirin g.package=javax.activation)]) ERROR: Bundle org.glassfish.main.core.glassfish [101] Error starting file:/C:/glassfish3/glassfish/modules/glassfish.jar (org.osgi.framework.BundleException: Activator start error in bundle org.glassfish.main.core.glassfish [101].) ERROR: Bundle org.glassfish.hk2.osgi-adapter [202] Error starting file:/C:/glassfish3/glassfish/modules/osgi-adapter.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.hk2.osgi-adapter [202]: Unable to re solve 202.0: missing requirement [202.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.enterprise.module)(version> =1.1.0)) [caused by: Unable to resolve 121.0: missing requirement [121.0] osgi.wiring.package; (&(osgi.wiring.package=or g.jvnet.hk2.config)(version>=1.1.0)) [caused by: Unable to resolve 37.0: missing requirement [37.0] osgi.wiring.package; (osgi.wiring.package=javax.management)]]) .... ....

4
What java version are you using? 8 or 7?Nurjan
version 7. Earlier today everything was working fine. We just restarted from the glassfish console and then getting the above mentioned error.Sushant Sharma
Have you tried to restart the server and try to start glassfish again?Nurjan
Restart from glassfish window didn't work. After that I tried from command prompt (as administrator): asadmin -p 4841 start-domain domain1 which prints the above error logSushant Sharma
Have you tried to restart the Windows machine?Nurjan

4 Answers

7
votes

I was installing Glassfish 3 (coming with JAVA EE 6) when I have configure JAVA_HOME for Java 8. The solution was to modify ./glassfish/config/asenv.conf and set AS_JAVA to point to Java 7

3
votes

The issue has been resolved. There are 2 java versions installed on the server. I changed asenv.bat file by adding AS_JAVA option pointing to java 7 and it worked.

2
votes

It looks like there is an error with your OSGi cache. Go to ${GlassFish_Home}/glassfish/domains/domain1/osgi-cache/ and delete everything in the directory. Alternatively, you could also just delete the directory itself (it will be recreated).

2
votes

I had the same issue after separately installing java8 and Glassfish3, chaged the jre-1.6=\ in the /glassfish/config/osgi.properties in (line 205) to jre-1.8=\ voila it worked