java-7 - 使用 openjdk7 在 Linux openshift 云服务器上运行 Glassfish 4

标签 java-7 java openshift glassfish-4

使用 openjdk7 在 Linux openshift 云服务器上运行 glassfish 4。我只是无法启动服务器给我异常(exception)。我可以毫无问题地运行 glassfish 3。知道是什么原因造成的吗?

Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@1651733 in service registry.
Completed shutdown of GlassFish runtime
We are in non-embedded mode, so org.glassfish.main.core.glassfish [107] has nothing to do.
Jun 26, 2013 8:08:18 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Jun 26, 2013 8:08:18 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Jun 26, 2013 8:08:18 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
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

        at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:84)
        at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:229)
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:311)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
        at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:118)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2204)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetAllServiceHandles(ServiceLocatorImpl.java:1149)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:651)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:639)
        at org.jvnet.hk2.config.ConfigurationPopulator.populateConfig(ConfigurationPopulator.java:56)
        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:91)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113)
        ... 6 more
Caused by: java.lang.ExceptionInInitializerError
        at com.sun.enterprise.util.net.NetUtils.<clinit>(NetUtils.java:55)
        at com.sun.enterprise.universal.glassfish.ASenvPropertyReader$ASenvMap.getHostname(ASenvPropertyReader.java:310)
        at com.sun.enterprise.universal.glassfish.ASenvPropertyReader$ASenvMap.get(ASenvPropertyReader.java:153)
        at com.sun.enterprise.universal.glassfish.ASenvPropertyReader$ASenvMap.completeMap(ASenvPropertyReader.java:191)
        at com.sun.enterprise.universal.glassfish.ASenvPropertyReader$ASenvMap.entrySet(ASenvPropertyReader.java:171)
        at org.glassfish.server.ServerEnvironmentImpl.postConstruct(ServerEnvironmentImpl.java:165)
        at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
        at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:118)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2204)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:549)
        at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
        at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:191)
        at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:214)
        ... 22 more
Caused by: java.util.MissingResourceException: Can't find com.sun.enterprise.util.LogMessages bundle
        at java.util.logging.Logger.setupResourceInfo(Logger.java:1400)
        at java.util.logging.Logger.<init>(Logger.java:256)
        at java.util.logging.LogManager.demandLogger(LogManager.java:399)
        at java.util.logging.Logger.demandLogger(Logger.java:315)
        at java.util.logging.Logger.getLogger(Logger.java:408)
        at com.sun.enterprise.util.CULoggerInfo.<clinit>(CULoggerInfo.java:61)
        ... 37 more

最佳答案

是的,您可以在 OpenShift 上运行 GlassFish 4。我编写了快速入门,其中展示了 https://github.com/shekhargulati/glassfish4-openshift-quickstart

关于java-7 - 使用 openjdk7 在 Linux openshift 云服务器上运行 Glassfish 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17332547/

相关文章:

java - 如何使用可变参数调用 MethodHandle

java - OpenShift 构建错误 : Unable to import child module class in parent module of multi module Maven Spring boot project

java - 从 OpenShift Java REST 客户端重新启动 Pod

JavaFX - Mac 断言失败

java - TimSort 什么时候提示损坏的比较器?

java - 基于 no 的线程配置。 CPU 核心数

java - 当我将 xml 中的数据放入我的 customJTable 时,"prepareRenderer"不起作用

java - 为什么我收到堆栈溢出?

maven - gofabric8>无法解压缩/Users/apple/.fabric8/bin/oc.zip zip:无效的zip

java - 从 jdk1.7.0_25 迁移到 jdk1.7.0_40 时的性能回归