GlassFish有时不会加载我的网络应用程序

时间:2015-06-10 01:55:39

标签: glassfish

有时,当GlassFishis启动时,3个网络应用程序中的一个将无法加载(提供空白页面)。

有什么想法吗?

我得到以下stacktrace:

WebDirContext.java:358)-06-09t21:43:56.410-0400] [glassfish 4.1] [severe]       [as-web-core-00037] [javax.enterprise.web.core] [tid: _threadid=67 _threadname=https-listener-1(15)] [timemillis: 1433900636410] [levelvalue: 1000] [[
  an exception or error occurred in the container during the request processing
java.lang.runtimeexception: java.lang.nullpointerexception
        at com.sun.enterprise.security.jmac.authmessagepolicy.getdefaultcallbackhandler(authmessagepolicy.java:377)
        at com.sun.enterprise.security.jmac.config.confighelper.getcallbackhandler(confighelper.java:254)
        at com.sun.enterprise.security.jmac.config.confighelper.init(confighelper.java:100)
        at com.sun.enterprise.security.jmac.config.httpservlethelper.<init>(httpservlethelper.java:81)
        at com.sun.web.security.realmadapter.getconfighelper(realmadapter.java:1604)
        at com.sun.web.security.realmadapter.initconfighelper(realmadapter.java:1992)
        at com.sun.web.security.realmadapter.issecurityextensionenabled(realmadapter.java:1588)
        at com.sun.enterprise.web.webpipeline.invoke(webpipeline.java:95)
        at org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:174)
        at org.apache.catalina.connector.coyoteadapter.doservice(coyoteadapter.java:415)
        at org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:282)
        at com.sun.enterprise.v3.services.impl.containermapper$httphandlercallable.call(containermapper.java:459)
        at com.sun.enterprise.v3.services.impl.containermapper.service(containermapper.java:167)
        at org.glassfish.grizzly.http.server.httphandler.runservice(httphandler.java:201)
        at org.glassfish.grizzly.http.server.httphandler.dohandle(httphandler.java:175)
        at org.glassfish.grizzly.http.server.httpserverfilter.handleread(httpserverfilter.java:235)
        at org.glassfish.grizzly.filterchain.executorresolver$9.execute(executorresolver.java:119)
        at org.glassfish.grizzly.filterchain.defaultfilterchain.executefilter(defaultfilterchain.java:284)
        at org.glassfish.grizzly.filterchain.defaultfilterchain.executechainpart(defaultfilterchain.java:201)
        at org.glassfish.grizzly.filterchain.defaultfilterchain.execute(defaultfilterchain.java:133)
        at org.glassfish.grizzly.filterchain.defaultfilterchain.process(defaultfilterchain.java:112)
        at org.glassfish.grizzly.processorexecutor.execute(processorexecutor.java:77)
        at org.glassfish.grizzly.nio.transport.tcpniotransport.fireioevent(tcpniotransport.java:561)
        at org.glassfish.grizzly.strategies.abstractiostrategy.fireioevent(abstractiostrategy.java:112)
        at org.glassfish.grizzly.strategies.workerthreadiostrategy.run0(workerthreadiostrategy.java:117)
        at org.glassfish.grizzly.strategies.workerthreadiostrategy.access$100(workerthreadiostrategy.java:56)
        at org.glassfish.grizzly.strategies.workerthreadiostrategy$workerthreadrunnable.run(workerthreadiostrategy.java:137)
        at org.glassfish.grizzly.threadpool.abstractthreadpool$worker.dowork(abstractthreadpool.java:565)
        at org.glassfish.grizzly.threadpool.abstractthreadpool$worker.run(abstractthreadpool.java:545)
        at java.lang.thread.run(thread.java:744)
Caused by: java.lang.NullPointerException
    at org.apache.naming.resources.WebDirContext.lookupFromJars(WebDirContext.java:325)
    at org.apache.naming.resources.WebDirContext.getAttributes(WebDirContext.java:298)
    at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:787)
    at org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1533)
    at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1456)
    at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:274)
    at org.glassfish.web.loader.WebappClassLoader.findResourceInternalFromRepositories(WebappClassLoader.java:2892)
    at org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2842)
    at org.glassfish.web.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2736)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1194)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1750)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at com.sun.enterprise.security.jmac.AuthMessagePolicy$7.run(AuthMessagePolicy.java:370)
    at com.sun.enterprise.security.common.AppservAccessController.doPrivileged(AppservAccessController.java:72)
    at com.sun.enterprise.security.jmac.AuthMessagePolicy.getDefaultCallbackHandler(AuthMessagePolicy.java:359)
    ... 29 more

]]

另请注意,它似乎会随机影响正在运行的4个Web应用程序之一。 4个webapps中的3个将正确加载。我重新启动域名,它会随机导致另一个应用程序提供空白页面...

1 个答案:

答案 0 :(得分:0)

看起来它从未在GL 4.1.2中得到修复,而在Payara 4.1.1.163中得到了修复。 (请参见https://github.com/payara/Payara/issues/693)和GL5(请参见https://github.com/eclipse-ee4j/glassfish/issues/21522