1 Reply Latest reply on Mar 10, 2013 4:25 PM by Anton Hughes

    Error loading Weld bootstrap

    Anton Hughes Master

      Hi

       

      I have a problem running my Errai project. I have tried A LOT of solutions - which I will list below.

       

       

      Maven Output

      when running maven from the command line, I get the following error:

      [INFO] INFO [OrderedBootstrap] errai bus started.

      [ERROR] Unable to start embedded HTTP server

      [ERROR] java.io.IOException: Unable to establish loopback connection

      [ERROR]         at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:125)

      [ERROR]         at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:69)

      [ERROR]         at java.security.AccessController.doPrivileged(Native Method)

      [ERROR]         at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:141)

      [ERROR]         at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)

      [ERROR]         at java.nio.channels.Pipe.open(Pipe.java:150)

      [ERROR]         at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:126)

      [ERROR]         at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)

      [ERROR]         at java.nio.channels.Selector.open(Selector.java:227)

      [ERROR]         at org.mortbay.io.nio.SelectorManager$SelectSet.<init>(SelectorManager.java:313)

      [ERROR]         at org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:224)

      [ERROR]         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

      [ERROR]         at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:314)

      [ERROR]         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

      [ERROR]         at org.mortbay.jetty.Server.doStart(Server.java:235)

      [ERROR]         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

      [ERROR]         at org.jboss.errai.cdi.server.gwt.JettyLauncher.start(JettyLauncher.java:692)

      [ERROR]         at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)

      [ERROR]         at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)

      [ERROR]         at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)

      [ERROR]         at com.google.gwt.dev.DevMode.main(DevMode.java:311)

      [ERROR] Caused by: java.net.SocketException: Permission denied: connect

      [ERROR]         at sun.nio.ch.Net.connect0(Native Method)

      [ERROR]         at sun.nio.ch.Net.connect(Net.java:364)

      [ERROR]         at sun.nio.ch.Net.connect(Net.java:356)

      [ERROR]         at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:623)

      [ERROR]         at java.nio.channels.SocketChannel.open(SocketChannel.java:184)

      [ERROR]         at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:97)

      [ERROR]         ... 20 more

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD SUCCESS

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 14:18.241s

      [INFO] Finished at: Sun Mar 10 21:05:00 CET 2013

      [INFO] Final Memory: 14M/121M

      [INFO] ------------------------------------------------------------------------

      C:\Users\Anton\git\app.ui\firestorm-app>mvn gwt:run

      [INFO] Scanning for projects...

      [INFO]

      [INFO] ------------------------------------------------------------------------

      [INFO] Building firestorm-app 1.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [INFO]

      [INFO] >>> gwt-maven-plugin:2.4.0:run (default-cli) @ firestorm-app >>>

      [INFO]

      [INFO] --- jacoco-gwt-maven-plugin:0.5.4.201202141554:prepare-agent (jacoco-gwt-prepare-agent) @ firestorm-app ---

      [INFO] argLine set to -javaagent:C:\Users\Anton\.m2\repository\org\jboss\errai\jacoco-gwt-maven-plugin\0.5.4.201202141554\jacoco-gwt-maven-plugin-0.5.4.201202141554.jar=snapshotDirectory=C:\Users\Anto

      n\git\app.ui\firestorm-app\target\snapshot-classes,snapshotClassLoaders=*gwt* -javaagent:C:\Users\Anton\.m2\repository\org\jacoco\org.jacoco.agent\0.5.4.201111111111\org.jacoco.agent-0.5.4.20111111111

      1-runtime.jar=destfile=C:\Users\Anton\git\app.ui\firestorm-app\target\jacoco.exec

      [INFO]

      [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ firestorm-app ---

      [debug] execute contextualize

      [INFO] Using 'UTF-8' encoding to copy filtered resources.

      [INFO] Copying 6 resources

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:resources (gwt-compile) @ firestorm-app ---

      [INFO] auto discovered modules [org.company.firestorm.App]

      [INFO] 13 source files from GWT module org.company.firestorm.App

      [INFO]

      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ firestorm-app ---

      [INFO] Nothing to compile - all classes are up to date

      [INFO]

      [INFO] <<< gwt-maven-plugin:2.4.0:run (default-cli) @ firestorm-app <<<

      [INFO]

      [INFO] --- gwt-maven-plugin:2.4.0:run (default-cli) @ firestorm-app ---

      [INFO] create exploded Jetty webapp in C:\Users\Anton\git\app.ui\firestorm-app\src\main\webapp

      [INFO] auto discovered modules [org.company.firestorm.App]

      [INFO] INFO [Reflections] Reflections took 573 ms to scan 12 urls, producing 388 keys and 1750 values [using 2 cores]

      [INFO] INFO [OrderedBootstrap] starting errai bus ...

      [INFO] INFO [DefaultComponents] authentication adapter configured: org.jboss.errai.bus.server.security.auth.JAASAdapter

      [INFO] INFO [DefaultComponents] using dispatcher implementation: org.jboss.errai.bus.server.SimpleDispatcher

      [INFO] INFO [DefaultComponents] using session provider implementation: org.jboss.errai.bus.server.HttpSessionProvider

      [INFO] INFO [LoadExtensions] searching for errai extensions ...

      [INFO] INFO [LoadExtensions] found extension org.jboss.errai.tools.monitoring.MonitorExtension

      [INFO] INFO [OrderedBootstrap] errai bus started.

      [ERROR] Unable to start embedded HTTP server

      [ERROR] java.io.IOException: Unable to establish loopback connection

      [ERROR]         at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:125)

      [ERROR]         at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:69)

      [ERROR]         at java.security.AccessController.doPrivileged(Native Method)

      [ERROR]         at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:141)

      [ERROR]         at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)

      [ERROR]         at java.nio.channels.Pipe.open(Pipe.java:150)

      [ERROR]         at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:126)

      [ERROR]         at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)

      [ERROR]         at java.nio.channels.Selector.open(Selector.java:227)

      [ERROR]         at org.mortbay.io.nio.SelectorManager$SelectSet.<init>(SelectorManager.java:313)

      [ERROR]         at org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:224)

      [ERROR]         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

      [ERROR]         at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:314)

      [ERROR]         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

      [ERROR]         at org.mortbay.jetty.Server.doStart(Server.java:235)

      [ERROR]         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

      [ERROR]         at org.jboss.errai.cdi.server.gwt.JettyLauncher.start(JettyLauncher.java:692)

      [ERROR]         at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)

      [ERROR]         at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)

      [ERROR]         at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)

      [ERROR]         at com.google.gwt.dev.DevMode.main(DevMode.java:311)

      [ERROR] Caused by: java.net.SocketException: Permission denied: connect

      [ERROR]         at sun.nio.ch.Net.connect0(Native Method)

      [ERROR]         at sun.nio.ch.Net.connect(Net.java:364)

      [ERROR]         at sun.nio.ch.Net.connect(Net.java:356)

      [ERROR]         at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:623)

      [ERROR]         at java.nio.channels.SocketChannel.open(SocketChannel.java:184)

      [ERROR]         at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:97)

      [ERROR]         ... 20 more

       

      Jetty tab output

                      00:00:01.273 [WARN] Could not instantiate listener org.jboss.errai.container.CDIServletStateListener 

      java.lang.IllegalStateException: Error loading Weld bootstrap, check that Weld is on the classpath
           at org.jboss.errai.container.CDIServletStateListener.<init>(CDIServletStateListener.java:62)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
           at java.lang.Class.newInstance0(Class.java:372)
           at java.lang.Class.newInstance(Class.java:325)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.newListenerInstance(WebXmlConfiguration.java:650)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:631)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initWebXmlElement(AbstractConfiguration.java:190)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initialize(AbstractConfiguration.java:133)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(AbstractConfiguration.java:113)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp(AbstractConfiguration.java:96)
           at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Configuration.java:149)
           at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1269)
           at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
           at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)
           at org.jboss.errai.cdi.server.gwt.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:486)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
           at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
           at org.mortbay.jetty.Server.doStart(Server.java:224)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.jboss.errai.cdi.server.gwt.JettyLauncher.start(JettyLauncher.java:692)
           at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
           at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
           at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
           at com.google.gwt.dev.DevMode.main(DevMode.java:311)
      Caused by: java.lang.IllegalArgumentException: Cannot load class for org.jboss.weld.bootstrap.WeldBootstrap
           at org.jboss.weld.environment.servlet.util.Reflections.classForName(Reflections.java:56)
           at org.jboss.weld.environment.servlet.util.Reflections.newInstance(Reflections.java:36)
           at org.jboss.errai.container.CDIServletStateListener.<init>(CDIServletStateListener.java:60)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
           at java.lang.Class.newInstance0(Class.java:372)
           at java.lang.Class.newInstance(Class.java:325)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.newListenerInstance(WebXmlConfiguration.java:650)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:631)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initWebXmlElement(AbstractConfiguration.java:190)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initialize(AbstractConfiguration.java:133)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(AbstractConfiguration.java:113)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp(AbstractConfiguration.java:96)
           at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Configuration.java:149)
           at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1269)
           at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
           at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)
           at org.jboss.errai.cdi.server.gwt.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:486)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
           at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
           at org.mortbay.jetty.Server.doStart(Server.java:224)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.jboss.errai.cdi.server.gwt.JettyLauncher.start(JettyLauncher.java:692)
           at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
           at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
           at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
           at com.google.gwt.dev.DevMode.main(DevMode.java:311)
      Caused by: java.lang.ClassNotFoundException: org.jboss.weld.bootstrap.WeldBootstrap
           at java.lang.ClassLoader.findClass(ClassLoader.java:522)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
           at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:378)
           at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
           at org.jboss.weld.environment.servlet.util.Reflections.classForName(Reflections.java:51)
           at org.jboss.weld.environment.servlet.util.Reflections.newInstance(Reflections.java:36)
           at org.jboss.errai.container.CDIServletStateListener.<init>(CDIServletStateListener.java:60)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
           at java.lang.Class.newInstance0(Class.java:372)
           at java.lang.Class.newInstance(Class.java:325)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.newListenerInstance(WebXmlConfiguration.java:650)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:631)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initWebXmlElement(AbstractConfiguration.java:190)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initialize(AbstractConfiguration.java:133)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(AbstractConfiguration.java:113)
           at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
           at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp(AbstractConfiguration.java:96)
           at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Configuration.java:149)
           at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1269)
           at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
           at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)
           at org.jboss.errai.cdi.server.gwt.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:486)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
           at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
           at org.mortbay.jetty.Server.doStart(Server.java:224)
           at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
           at org.jboss.errai.cdi.server.gwt.JettyLauncher.start(JettyLauncher.java:692)
           at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
           at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
           at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
           at com.google.gwt.dev.DevMode.main(DevMode.java:311)


       

      Development Mode tab output


      00:00:02.494 [ERROR] shell failed in doStartupServer method

       

       

      What I have tried attempted

      SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.

      says to add the jvm argument -Djava.net.preferIPv4Stack=true

      Tried adding the following the pom.xml.

       


      1

      2

      3

       

      <configuration>

       

         <extraJvmArgs>-Djava.net.preferIPv4Stack=true</extraJvmArgs>

      </configuration>