2013年7月31日 星期三

Cannot resolve: AWS Linux AMI + Glassfish4 Command start-domain failed.

Tried to setup a Glassfish4 server on AWS Linux AMI but not succeed.



After searched Google, seems there is a bug in openjdk and it was fixed on the release java-1.7.0-openjdk-devel-1.7.0.25-2.3.10.4.

Installed command: sudo yum install java-1.7.0-openjdk-devel
Installed version: 1.7.0.25-2.3.10.3.29.amzn1


Running Glassfish server and results the following error:

WARNING: Skipping entry  because it is not an absolute URI.
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: A MultiException has 8 exceptions.  They are:
1. java.lang.ExceptionInInitializerError
2. java.lang.IllegalStateException: Unable to perform operation: post construct on org.glassfish.server.ServerEnvironmentImpl
3. java.lang.NoClassDefFoundError: Could not initialize class com.sun.enterprise.util.net.NetUtils
4. java.lang.IllegalStateException: Unable to perform operation: post construct on org.glassfish.server.ServerEnvironmentImpl
5. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.sun.enterprise.v3.server.DomainXmlPersistence errors were found
6. java.lang.IllegalStateException: Unable to perform operation: resolve on com.sun.enterprise.v3.server.DomainXmlPersistence
7. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.sun.enterprise.v3.server.GFDomainXml errors were found
8. java.lang.IllegalStateException: Unable to perform operation: resolve on com.sun.enterprise.v3.server.GFDomainXml
....
Exception in thread "main" java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:490) 
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97) 
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: java.lang.ExceptionInInitializerError
at org.glassfish.common.util.admin.ManagedFile.<clinit>(ManagedFile.java:90)
at com.sun.enterprise.v3.server.DomainXmlPersistence.getPidFile(DomainXmlPersistence.java:102)
at com.sun.enterprise.v3.server.DomainXmlPersistence.accessRead(DomainXmlPersistence.java:114)
at org.glassfish.config.support.DomainXml.parseDomainXml(DomainXml.java:255)
at org.glassfish.config.support.DomainXml.run(DomainXml.java:117)
at org.jvnet.hk2.config.ConfigurationPopulator.populateConfig(ConfigurationPopulator.java:58)
at org.glassfish.hk2.bootstrap.HK2Populator.populateConfig(HK2Populator.java:158)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:211)
at com.sun.enterprise.module.bootstrap.Main.createServiceLocator(Main.java:273)
at org.jvnet.hk2.osgiadapter.HK2Main.createServiceLocator(HK2Main.java:120)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRuntime.java:95)
at com.sun.enterprise.glassfish.bootstrap.GlassFishRuntimeDecorator.newGlassFish(GlassFishRuntimeDecorator.java:68)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntime.newGlassFish(OSGiGlassFishRuntime.java:88)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113)
... 6 more
Caused by: java.util.MissingResourceException: Can't find com.sun.enterprise.util.LogMessages bundle
at java.util.logging.Logger.setupResourceInfo(Logger.java:1676)
at java.util.logging.Logger.<init>(Logger.java:285)
at java.util.logging.LogManager.demandLogger(LogManager.java:443)
at java.util.logging.Logger.demandLogger(Logger.java:347)
at java.util.logging.Logger.getLogger(Logger.java:438)
at com.sun.enterprise.util.CULoggerInfo.<clinit>(CULoggerInfo.java:61)
... 20 more

沒有留言:

張貼留言