Sometimes when GlassFishis started one out of the 3 web apps will not load (a blank page gets served).
Any ideas?
I get the following 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
]]
Also note that it seems to randomly affect one of the 4 webapps running. 3 of the 4 webapps will load correctly. I restart the domain and it will randomly cause a different app to serve a blank page...
Looks like it was never fixed in GL 4.1.2, but was fixed in Payara 4.1.1.163. (see https://github.com/payara/Payara/issues/693) and in GL5 (see https://github.com/eclipse-ee4j/glassfish/issues/21522)
Related
Issue- Test FX application using Marathon driver - Unable to establish connection with the application.
Steps-
FX based Client Application Launch happens successfully using marathon profile set.
2.Exception while setting driver.
Unable to set text in textfield.
Code shown in image
Output after launch-
FAILED: createJavaProfile
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(Ljava/util/Comparator;)Ljava/util/stream/Collector;
at org.openqa.selenium.remote.NewSessionPayload.lambda$validate$3(NewSessionPayload.java:191)
at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:441)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442)
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at org.openqa.selenium.remote.NewSessionPayload.validate(NewSessionPayload.java:207)
at org.openqa.selenium.remote.NewSessionPayload.(NewSessionPayload.java:152)
at org.openqa.selenium.remote.NewSessionPayload.create(NewSessionPayload.java:99)
at org.openqa.selenium.remote.NewSessionPayload.create(NewSessionPayload.java:94)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:69)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138)
at net.sourceforge.marathon.javadriver.JavaDriverCommandExecutor.execute(JavaDriverCommandExecutor.java:135)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:582)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:136)
at net.sourceforge.marathon.javadriver.JavaDriver.(JavaDriver.java:156)
at net.sourceforge.marathon.javadriver.JavaDriver.(JavaDriver.java:131)
at net.sourceforge.marathon.javadriver.JavaDriver.(JavaDriver.java:112)
at io.mosio.demograph.demo.Demo2stack.createJavaProfile(Demo2stack.java:60)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Please check the google guava version. As marathon java driver 5.4.0.0 uses selenium 3.14.0 which is internally dependent on google.guava version 25.0-jre. That might be causing the issue.
Similar issue:
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(Ljava/util/Comparator;)Ljava/util/stream/Collector;
Keep getting warnings like below in CloudHub. CloudHub logs are restricted to 30days and 100mb. This is a problem as it clutters logs and important ones are lost. I know there is a way to restrict/suppress this GRIZZLY0013 warning in LOG4J2 configuration but I forgot it and can't find it anywhere. Is there a way to disable it?
Mule version - 3.9.2
Worker-0 [app-name].HTTP_Default_Listener_Configuration.worker.01 WARN
GRIZZLY0013: Exception during FilterChain execution
java.lang.IllegalArgumentException: path parameter must start with /
at org.mule.util.Preconditions.checkArgument(Preconditions.java:26)
at org.mule.module.http.internal.listener.HttpListenerRegistry$ServerAddressRequestHandlerRegistry.findRequestHandler(HttpListenerRegistry.java:222)
at org.mule.module.http.internal.listener.HttpListenerRegistry.getRequestHandler(HttpListenerRegistry.java:83)
at org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:109)
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:540)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:126)
at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:32)
at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:149)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
You can set the package org.glassfish.grizzly.filterchain to ERROR level so the warning is ignored. However first you should check if the HTTP listener configuration really is not starting with a path and fix it.
There is a non-deterministic error occuring within my Web-Application on a Glashfish 4.1. When I call
KeyStore.getInstance("BouncyCastle", "BC")
I get the follwoing stack trace:
Warnung: javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy309.load(Unknown Source)
at de.lkrnrw.careso.das.server.business.keymanagement.boundary.__EJB31_Generated__CaresoKeyManager__Intf____Bean__.load(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:414)
at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:65)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
at de.lkrnrw.careso.das.server.business.keymanagement.boundary.CaresoKeyManager$Proxy$_$$_Weld$EnterpriseProxy$.load(Unknown Source)
at de.lkrnrw.careso.das.server.business.keymanagement.rest.KeyService.onUnlockKeyStore(KeyService.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at de.lkrnrw.careso.das.server.restconfig.config.Authenticator.doFilter(Authenticator.java:35)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
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:745)
Caused by: de.ekrnrw.commons.ee.keystore.control.exceptions.ManagedKeyStoreException: java.security.KeyStoreException: BouncyCastle not found
at de.ekrnrw.commons.ee.keystore.control.ManagedKeyStorePersistenceService.loadKeyStore(ManagedKeyStorePersistenceService.java:50)
at de.ekrnrw.commons.ee.keystore.boundary.KeyManager.load(KeyManager.java:269)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 72 more
Caused by: java.security.KeyStoreException: BouncyCastle not found
at java.security.KeyStore.getInstance(KeyStore.java:899)
at de.ekrnrw.commons.ee.keystore.control.ManagedKeyStorePersistenceService.loadKeyStore(ManagedKeyStorePersistenceService.java:47)
... 102 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: BouncyCastle, provider: BC, class: org.bouncycastle.jce.provider.JDKKeyStore$BouncyCastleStore)
at java.security.Provider$Service.newInstance(Provider.java:1621)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
at java.security.Security.getImpl(Security.java:698)
at java.security.KeyStore.getInstance(KeyStore.java:896)
... 103 more
Caused by: java.lang.IllegalStateException: This web container has not yet been started
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1674)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
at java.security.Provider$Service.getImplClass(Provider.java:1636)
at java.security.Provider$Service.newInstance(Provider.java:1592)
... 107 more
The error can be fixed temporarily by undeploying the application from the glasfish and restarting the same.
I looked into the obious reasons, like adding the Security Provider in Java and adding the Bouncy Castle dependency:
<dependency>
<groupId>bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>140</version>
</dependency>
There are a few variations to choose from for the Bouncy Castle dependency, but as I mentioned, it does work sometimes.
I know this is a shot in the dark to make, but do you have any idea what could be the source of this? Any help is greatly appreciated and if I forgot given any relevant information, please let me know.
Thanks, Yannik.
Final Workaround:
Since we could never figure out why this not deterministic error occurred we went ahead and added bouncy castle directly to the JVM of the glassfish server. Since then the error never occurred again.
Here is a brief instruction how to add libraries to the JVM:
Copy "bcprov-ext-jdk15on-1.54.jar" into JDK folder. Under Linux this might be at "/opt/Oracle_Java", in that case run
sudo scp bcprov-ext-jdk15on-1.54.jar /opt/Oracle_Java/jdk1.8.0_76/jre/lib/ext
on terminal.
After that register the new library. Go to "/opt/Oracle_Java/jdk1.8.0_76/jre/lib/security" and add the last line to "java.security" file:
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=sun.security.ec.SunEC
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
security.provider.7=com.sun.security.sasl.Provider
security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.9=sun.security.smartcardio.SunPCSC
security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider //line to be added
Your java.security file might look different depending on the libraries that are already registered.
I guess the problem is caused because you package a very old and outdated version of the cryptographic provider.
You shouldn't use the bcprov-jdk16 provider.
People should not be using the jdk16 distributions. They are very
out of date. The jdk15on distribution covers everything from 1.5 up.
Try the following:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.54</version>
</dependency>
I am trying to install Quercus 4.0.37 on Glassfish 4.0, while deploying it on glassfish from admin interface I am getting this error:
Exception while loading the app : CDI definition failure:WELD-000071 Managed bean class com.caucho.jms.MemoryQueue must be #Dependent.
I have came across this post on this same issue http://forum.caucho.com/showthread.php?t=30655
But I am not able to understand both the solutions that nam mentioned in this post:
1) How to disable weld
2) How to use standalone quercus WAR (I downloaded from http://quercus.caucho.com/ 4.0.37 version war)
In my glassfish installation folder I have these weld jar:
1. /glassfish/lib/appclient/weld-se-core.jar
2. /glassfish/modules/gf-weld-connector.jar
3. /glassfish/modules/weld-integration-fragment.jar
4. /glassfish/modules/weld-integration.jar
5. /glassfish/modules/weld-osgi-bundle.jar
Detailed stack trace is:
Exception while loading the app : CDI definition failure:WELD-000071 Managed bean class com.caucho.jms.MemoryQueue must be #Dependent
org.jboss.weld.exceptions.DefinitionException: WELD-000071 Managed bean class com.caucho.jms.MemoryQueue must be #Dependent
at org.jboss.weld.bean.ManagedBean.checkType(ManagedBean.java:205)
at org.jboss.weld.bean.AbstractBean.initializeAfterBeanDiscovery(AbstractBean.java:115)
at org.jboss.weld.bean.ManagedBean.initializeAfterBeanDiscovery(ManagedBean.java:122)
at org.jboss.weld.bootstrap.BeanDeployer.doAfterBeanDiscovery(BeanDeployer.java:354)
at org.jboss.weld.bootstrap.BeanDeployment.afterBeanDiscovery(BeanDeployment.java:280)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:522)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:213)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:235)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:257)
at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:134)
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 org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:318)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:744)
]]
I encountered the same exception today. I deleted resin.jar from WEB-INF/lib directory of quercus and it deployed successfully.
I hope this helps.
First I dont know much about this application but I encountered this exception not the first time.
If you are able to edit the WEB-INF folder of the project you can try to add a glassfish-web.xml with the following inside:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<class-loader delegate="false"/>
</glassfish-web-app>
where <class-loader delegate="false"/> is the point. Thus the "webapplication-classloader" will not delegate the search of a classes to the "glassfish-classloader" until nothing is found. The problem seems to be some implementation of CDI inside of the application which is not applicable on Weld. With the classloader-delegate flag glassfish will use the lib inside the application if possible otherwise Weld which is provided by glassfish.
When I deploy using cloudbees-deploy-config, I got a Null Pointer exception on BrowserLauncher. I followed the instruction on sbt-cloudbees-play-plugin to set it up. Did I miss anything?
[info] Deploying myapp-1.0.3[config=application-prod] to Run#Cloud/myapp/a
........................uploaded 25%
........................uploaded 50%
........................uploaded 75%
........................upload completed
deploying application to server(s)...
[info] Application available at http://a.myapp.cloudbees.net
java.lang.ExceptionInInitializerError
at cloudbees.Plugin$.cloudbees$Plugin$$performDeploy(cloudbees.scala:236)
at cloudbees.Plugin$$anonfun$deployConfigTask$1$$anonfun$apply$4.apply(cloudbees.scala:150)
at cloudbees.Plugin$$anonfun$deployConfigTask$1$$anonfun$apply$4.apply(cloudbees.scala:113)
at sbt.Scoped$$anonfun$hf6$1.apply(Structure.scala:582)
at sbt.Scoped$$anonfun$hf6$1.apply(Structure.scala:582)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
at edu.stanford.ejalbert.launching.BrowserLaunchingFactory.createSystemBrowserLaunching(BrowserLaunchingFactory.java:62)
at edu.stanford.ejalbert.BrowserLauncher.initBrowserLauncher(BrowserLauncher.java:248)
at edu.stanford.ejalbert.BrowserLauncher.<init>(BrowserLauncher.java:226)
at edu.stanford.ejalbert.BrowserLauncher.<init>(BrowserLauncher.java:162)
at cloudbees.BrowserLauncher$.<init>(cloudbees.scala:13)
at cloudbees.BrowserLauncher$.<clinit>(cloudbees.scala)
at cloudbees.Plugin$.cloudbees$Plugin$$performDeploy(cloudbees.scala:236)
at cloudbees.Plugin$$anonfun$deployConfigTask$1$$anonfun$apply$4.apply(cloudbees.scala:150)
at cloudbees.Plugin$$anonfun$deployConfigTask$1$$anonfun$apply$4.apply(cloudbees.scala:113)
at sbt.Scoped$$anonfun$hf6$1.apply(Structure.scala:582)
at sbt.Scoped$$anonfun$hf6$1.apply(Structure.scala:582)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
[error] (*:cloudbees-deploy-config) java.lang.ExceptionInInitializerError
[error] Total time: 131 s, completed Aug 15, 2013 11:46:14 PM
I can see you already created an issue for this https://github.com/CloudBees-community/sbt-cloudbees-play-plugin/issues/5
I expect plugin contributors to reply there