java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?

JBoss Issue Tracker | Tomek D | 3 years ago
  1. 0

    Exception, which indicates that an old jetty version is requested: {code} 09:46:19.586 [main] INFO o.j.w.e.g.GwtDevHostedModeContainer - GWTHostedMode detected, JSR-299 injection will be available in Servlets and Filters. Injection into Listeners is not supported. [WARN] FAILED c.g.g.d.s.j.WebAppContextWithReload{/,[file:/a.jar, jar:file:b.jar/]},: java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:413) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.getWeldServletHandlerClass(GwtDevHostedModeContainer.java:46) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.initialize(GwtDevHostedModeContainer.java:57) at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:150) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:518) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:717) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844) at com.google.gwt.dev.DevMode.main(DevMode.java:322) Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.servlet.ServletHandler at java.lang.ClassLoader.findClass(ClassLoader.java:531) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:407) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) ... 35 more [WARN] FAILED org.eclipse.jetty.server.handler.RequestLogHandler@1d85e52e: java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:413) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.getWeldServletHandlerClass(GwtDevHostedModeContainer.java:46) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.initialize(GwtDevHostedModeContainer.java:57) at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:150) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:518) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:717) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844) at com.google.gwt.dev.DevMode.main(DevMode.java:322) Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.servlet.ServletHandler at java.lang.ClassLoader.findClass(ClassLoader.java:531) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:407) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) ... 35 more [WARN] FAILED org.eclipse.jetty.server.Server@2c0e7d40: java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:413) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.getWeldServletHandlerClass(GwtDevHostedModeContainer.java:46) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.initialize(GwtDevHostedModeContainer.java:57) at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:150) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:518) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:717) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844) at com.google.gwt.dev.DevMode.main(DevMode.java:322) {code}

    JBoss Issue Tracker | 3 years ago | Tomek D
    java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?
  2. 0

    Exception, which indicates that an old jetty version is requested: {code} 09:46:19.586 [main] INFO o.j.w.e.g.GwtDevHostedModeContainer - GWTHostedMode detected, JSR-299 injection will be available in Servlets and Filters. Injection into Listeners is not supported. [WARN] FAILED c.g.g.d.s.j.WebAppContextWithReload{/,[file:/a.jar, jar:file:b.jar/]},: java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:413) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.getWeldServletHandlerClass(GwtDevHostedModeContainer.java:46) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.initialize(GwtDevHostedModeContainer.java:57) at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:150) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:518) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:717) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844) at com.google.gwt.dev.DevMode.main(DevMode.java:322) Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.servlet.ServletHandler at java.lang.ClassLoader.findClass(ClassLoader.java:531) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:407) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) ... 35 more [WARN] FAILED org.eclipse.jetty.server.handler.RequestLogHandler@1d85e52e: java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:413) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.getWeldServletHandlerClass(GwtDevHostedModeContainer.java:46) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.initialize(GwtDevHostedModeContainer.java:57) at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:150) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:518) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:717) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844) at com.google.gwt.dev.DevMode.main(DevMode.java:322) Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.servlet.ServletHandler at java.lang.ClassLoader.findClass(ClassLoader.java:531) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:407) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) ... 35 more [WARN] FAILED org.eclipse.jetty.server.Server@2c0e7d40: java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler java.lang.NoClassDefFoundError: org/mortbay/jetty/servlet/ServletHandler at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:413) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.getWeldServletHandlerClass(GwtDevHostedModeContainer.java:46) at org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer.initialize(GwtDevHostedModeContainer.java:57) at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:150) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:518) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:717) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844) at com.google.gwt.dev.DevMode.main(DevMode.java:322) {code}

    JBoss Issue Tracker | 3 years ago | Tomek D
    java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?
  3. 0

    [WELD-1615] org.jboss.weld.environment.servlet.Listener crashes in GWT dev hosted mode - JBoss Issue Tracker

    jboss.org | 12 months ago
    java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Project that tries to illustrate error: https://drive.google.com/file/d/0B_dEiNBGUsxqaG5tdTVuT2RqT00/edit?usp=sharing Summary: - surefire threaded option - test thread calls weld.shutdown() - all other threads still working will have random problems using their own non shared weld containers Context: I am creating some UI Tests based on selenium. UI testing is overall a slow process with the opening of the browser and all the orchestration, so multi-threading the tests is a must. Initially I was using Google Guice for IoC, but I have switched to weld. The UI tests used to be successful in Guice using surefire <threadCound></threadCoun> configuration property. When I switched to Weld, this stopped being the case. The tests consistently break with several different exceptions at several different points of the life cycle of the test. Summary of test policy: Each test class contains a Weld and WeldContainer object that is unique to itself and not shared in any way. There are no race conditions on these objects, since each test class contains a single test, and each test is given a single thread by the surefire plugin. What seems to be happening here is that the weld.shutdown(); call seems to have a cross cutting power across all the running threads. That is, even though each test class has its own weld object that it uses to create a weld container. As soon as the first test thread concludes the test and reaches the tearDown() moment, and invokes weld.shutdown(), from this point onward the ramaining tests seem to start dieing with arbitrary exceptions. For example, I have head tests where the container.initilize() appears to be very successful, but after that trying to get a bean from the container will result in a: WELD-001308 Unable to resolve any beans for Types: Other tests that seem to have passe the @Test() point ad have reached teh tearDown() phase, these will failing trying to close the weld instance variable with arbtirary erros, such as: java.lang.NullPointerException at org.jboss.weld.environment.se.ShutdownManager.shutdown(ShutdownManager.java:42) at org.jboss.weld.environment.se.ShutdownManager$Proxy$_$$_WeldClientProxy.shutdown(ShutdownManager$Proxy$_$$_WeldClientProxy.java) at org.jboss.weld.environment.se.Weld.shutdown(Weld.java:218) Or such as: java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly? at org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52) at org.jboss.weld.Container.instance(Container.java:67) at org.jboss.weld.bean.AbstractBean.initialize(AbstractBean.java:134) at org.jboss.weld.bean.AbstractClassBean.initialize(AbstractClassBean.java:205) at org.jboss.weld.bean.ManagedBean.initialize(ManagedBean.java:327) at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:116) at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:217) at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:365) at org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans(ForwardingBootstrap.java:70) at org.jboss.weld.environment.se.Weld.initialize(Weld.java:137) at WeldBugReportSurefireTest.setUp(WeldBugReportSurefireTest.java:65) It is very hard to decide on an exception to report, so many take place an arbitrarly. To make the tests pass I have have to use surefire configured for forking, witout re-use of forks. This solves my multi-threading issue. But I am concerned with the erros I am getting, because I can envision scenarios where an application really needs to created different container objects that it shutsdown when appropriate without disturbing the other opened containers, as you can do with guice. I have tried to compile a small project where this error can be reproduced. I cannot use the real project for privacy reasons, so the exceptions that my sample project yields do not correspond exactly to the ones I get in my project... In this project, tests can be triggered through the comand line with either: mvn test mvn -P parallel test the mvn test runs one test at a time, the normal way, and should be successful. the mvn -P parallel test should break most of the time with arbitrary exceptions on arbitrary test classes And if the managed bean DummyManagedBean.java has a flag property that can be used to get the tests to pass when in parallel. what this flag will do is make the thread postpone the test for long enough, for all other threads to complete their business logic, thus avoiding a weld shutdown to occur before the tests complete.

    JBoss Issue Tracker | 3 years ago | Nuno Godinho de Matos
    java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?
  6. 0

    It would appear there is problem with the CDI Container service in Glassfish 4.0 b78 fails to be initialised. I even tried a new WAR with just a single POJO, a dummy Java class with no methods at all, and I received the same error. There is not an issue with GlassFish 4.0 b77 server, only since I upgraded. [main] INFO org.jboss.weld.Version - WELD-000900 SNAPSHOT [main] WARN org.jboss.weld.Bootstrap - WELD-001440 Scope type @javax.enterprise.context.ApplicationScoped() used on injection point [BackedAnnotatedField] @Inject @ApplicationScoped private je7hb.websocket.basic.FakeServlet.chatRoom >>>> SampleSingleton.init() called Mar 07, 2013 9:33:48 AM org.glassfish.tyrus.servlet.TyrusServletContainerInitializer onStartup INFO: Registering WebSocket filter for url pattern /* Mar 07, 2013 9:33:48 AM com.sun.enterprise.web.WebApplication start INFO: Loading application [mywebapp] at [/mywebapp] [weld-worker-2] WARN org.jboss.weld.Bootstrap - WELD-001440 Scope type @javax.enterprise.context.ApplicationScoped() used on injection point [BackedAnnotatedField] @Inject @ApplicationScoped private je7hb.websocket.basic.ChatServiceEndPoint.chatRoom [weld-worker-3] WARN org.jboss.weld.Bootstrap - WELD-001440 Scope type @javax.enterprise.context.ApplicationScoped() used on injection point [BackedAnnotatedField] @Inject @ApplicationScoped private je7hb.websocket.basic.FakeServlet.chatRoom [main] WARN org.jboss.weld.Bootstrap - WELD-001440 Scope type @javax.enterprise.context.ApplicationScoped() used on injection point [BackedAnnotatedField] @Inject @ApplicationScoped private je7hb.websocket.basic.FakeServlet.chatRoom Mar 07, 2013 9:33:48 AM com.sun.enterprise.v3.server.ApplicationLifecycle deploy SEVERE: Exception during lifecycle processing org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [InstanceManager] with qualifiers [@Default] at injection point [[UnbackedAnnotatedParameter] Parameter 1 of [UnbackedAnnotatedConstructor] @Inject protected org.jboss.weld.environment.se.WeldContainer(InstanceManager, BeanManager)] at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:247) at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:364) >>>> SampleSingleton.destroy() called at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497) 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:528) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:524) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:357) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:523) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:547) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1424) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1759) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1675) at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133) at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:73) at je7hb.common.weber.embedded.glassfish.EmbeddedRunner.main(EmbeddedRunner.java:19) Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [InstanceManager] with qualifiers [@Default] at injection point [[UnbackedAnnotatedParameter] Parameter 1 of [UnbackedAnnotatedConstructor] @Inject protected org.jboss.weld.environment.se.WeldContainer(InstanceManager, BeanManager)] at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:381) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:309) at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:172) at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:203) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:493) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:69) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:67) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Mar 07, 2013 9:33:48 AM org.glassfish.api.ActionReport failure SEVERE: Exception while loading the app Mar 07, 2013 9:33:48 AM org.glassfish.tyrus.server.TyrusServerContainer stop INFO: Closing down : org.glassfish.tyrus.server.TyrusEndpoint@5e9b0166 Mar 07, 2013 9:33:48 AM org.glassfish.tyrus.server.TyrusServerContainer stop INFO: Closing down : org.glassfish.tyrus.server.TyrusEndpoint@6150e9a2 Mar 07, 2013 9:33:48 AM org.glassfish.tyrus.server.TyrusServerContainer stop INFO: Closing down : org.glassfish.tyrus.server.TyrusEndpoint@39ece0e3 Mar 07, 2013 9:33:48 AM com.sun.web.server.WebContainerListener preDestroy SEVERE: Exception during invocation of InjectionManager.destroyManagedObject on org.glassfish.tyrus.servlet.TyrusServletFilter@24633a36 of web module StandardEngine[glassfish-web].StandardHost[server].StandardContext[/mywebapp] java.lang.IllegalStateException: Unknown JCDI-enabled managed bean org.glassfish.tyrus.servlet.TyrusServletFilter@24633a36 of class class org.glassfish.tyrus.servlet.TyrusServletFilter at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.destroyManagedBean(ManagedBeanManagerImpl.java:628) at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.destroyManagedObject(InjectionManagerImpl.java:439) at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.destroyManagedObject(InjectionManagerImpl.java:414) at com.sun.web.server.WebContainerListener.preDestroy(WebContainerListener.java:186) at com.sun.web.server.WebContainerListener.containerEvent(WebContainerListener.java:151) at org.apache.catalina.core.ContainerBase.fireContainerEvent(ContainerBase.java:1579) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:334) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:5319) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:6082) at com.sun.enterprise.web.WebModule.stop(WebModule.java:725) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1172) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2438) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2393) at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:191) at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:161) at com.sun.enterprise.v3.server.ApplicationLifecycle$2.actOn(ApplicationLifecycle.java:268) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:503) at com.sun.enterprise.v3.servecationLifecycle.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:528) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:524) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:357) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:523) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:547) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1424) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1759) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1675) at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133) at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:73) at je7hb.common.webcontainer.embedded.glassfish.EmbeddedRunner.main(EmbeddedRunner.java:19) Mar 07, 2013 9:33:48 AM org.glassfish.weld.WeldDeployer event WARNING: JCDI shutdown error java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly? at org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52) at org.jboss.weld.Container.instance(Container.java:54) at org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:597) at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:293) at org.glassfish.kernel.event.EventsImpl$1.run(EventsImpl.java:123) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Mar 07, 2013 9:33:48 AM org.glassfish.deployment.admin.DeployCommand execute SEVERE: Exception while loading the app : CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [InstanceManager] with qualifiers [@Default] at injection point [[UnbackedAnnotatedParameter] Parameter 1 of [UnbackedAnnotatedConstructor] @Inject protected org.jboss.weld.environment.se.WeldContainer(InstanceManager, BeanManager)] org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [InstanceManager] with qualifiers [@Default] at injection point [[UnbackedAnnotatedParameter] Parameter 1 of [UnbackedAnnotatedConstructor] @Inject protected org.jboss.weld.environment.se.WeldContainer(InstanceManager, BeanManager)] at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:381) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:309) at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:172) at org.jboss.weld.bootstrap.Validator.validateRIBean(Valjava:203) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:493) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:69) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:67) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) **** Press the ENTER key to stop the server **** > Building > :run Mar 07, 2013 9:33:51 AM org.glassfish.admin.mbeanserver.JMXStartupService shutdown INFO: JMXStartupService and JMXConnectors have been shut down. JdbcRuntimeExtension, getAllSystemRAResourcesAndPools = [GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool] Mar 07, 2013 9:33:51 AM com.sun.enterprise.v3.server.AppServerStartup stop INFO: Shutdown procedure finished BUILD SUCCESSFUL Total time: 14.432 secs peterpilgrim@Peters-MacBook-Pro-3.local [1110] >

    Java.net JIRA | 4 years ago | peter_pilgrim
    java.lang.IllegalStateException: Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Singleton is not set. Is your Thread.currentThread().getContextClassLoader() set correctly?

      at org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get()
    2. Weld SPIs for container integration
      IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get
      1. org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:47)
      1 frame
    3. Weld Implementation
      StaticWeldProvider.getCDI
      1. org.jboss.weld.Container.instance(Container.java:55)
      2. org.jboss.weld.SimpleCDI.<init>(SimpleCDI.java:77)
      3. org.jboss.weld.servlet.StaticWeldProvider$EnhancedCDI.<init>(StaticWeldProvider.java:28)
      4. org.jboss.weld.servlet.StaticWeldProvider$EnhancedCDI.<init>(StaticWeldProvider.java:28)
      5. org.jboss.weld.servlet.StaticWeldProvider.getCDI(StaticWeldProvider.java:45)
      5 frames
    4. JavaEE 7
      CDI.current
      1. javax.enterprise.inject.spi.CDI.current(CDI.java:60)
      1 frame
    5. Weld Implementation
      WeldInitialListener.contextInitialized
      1. org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:86)
      1 frame
    6. Weld SPIs for container integration
      ForwardingServletListener.contextInitialized
      1. org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
      1 frame
    7. org.jboss.weld
      Listener.contextInitialized
      1. org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:64)
      1 frame
    8. Jetty
      WebAppContext.doStart
      1. org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
      2. org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
      3. org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
      4. org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
      5. org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
      6. org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
      7. org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
      7 frames
    9. GWT dev
      JettyLauncher$WebAppContextWithReload.doStart
      1. com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:518)
      1 frame
    10. Jetty
      AbstractLifeCycle.start
      1. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      2. org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
      3. org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162)
      4. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      5. org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
      6. org.eclipse.jetty.server.Server.doStart(Server.java:282)
      7. org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      7 frames
    11. GWT dev
      DevMode.main
      1. com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:717)
      2. com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522)
      3. com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104)
      4. com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844)
      5. com.google.gwt.dev.DevMode.main(DevMode.java:322)
      5 frames