2 Replies Latest reply on Apr 22, 2012 5:04 PM by Galder Zamarreño

    Arquillian failing to start with 7.1.2 snapshot

    Galder Zamarreño Master

      I'm using the following Arquillian configuration to run AS7 but in latest AS 7.1.2 snapshot it doesn't work:

       

      <container qualifier="jboss" default="true">
        <configuration>
          <property name="jbossHome">${surefire.basedir:.}/build/target/jboss-as</property>
          <property name="modulePath">${java.io.tmpdir:.}/test-module:${surefire.basedir:.}/build/target/jboss-as/modules:${surefire.basedir:.}/build/target/jboss-as/downloads</property>
          <property name="allowConnectingToRunningServer">true</property>
        </configuration>
      </container>
      

       

      The exception thrown is:

       

      Exception in thread "main" java.lang.ExceptionInInitializerError

                at org.jboss.as.server.Main.main(Main.java:92)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.modules.Module.run(Module.java:248)

                at org.jboss.modules.Main.main(Main.java:313)

      Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")

                at org.jboss.logmanager.Logger.getLogger(Logger.java:60)

                at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)

                ... 7 more

       

      Seems like Arquillian is forgetting to add a crucial system property?

       

      I've tried adding:

       

      <property name="javaVmArguments">-Djava.util.logging.manager=org.jboss.logmanager.LogManager</property>
      

       

      But then I get:

       

      Could not load Logmanager "org.jboss.logmanager.LogManager"

      java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager

                at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                at java.util.logging.LogManager$1.run(LogManager.java:167)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.util.logging.LogManager.<clinit>(LogManager.java:157)

                at java.util.logging.Logger.getLogger(Logger.java:287)

                at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:37)

                at javax.management.NotificationBroadcasterSupport.<clinit>(NotificationBroadcasterSupport.java:335)

                at javax.management.MBeanServerDelegate.<init>(MBeanServerDelegate.java:58)

                at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.<init>(MBeanServerDelegateImpl.java:82)

                at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanServer.java:1326)

                at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerBuilder.java:49)

                at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:302)

                at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:213)

                at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:174)

                at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302)

                at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504)

                at org.jboss.modules.ModuleLoader$RealMBeanReg$1.run(ModuleLoader.java:835)

                at org.jboss.modules.ModuleLoader$RealMBeanReg$1.run(ModuleLoader.java:833)

                at java.security.AccessController.doPrivileged(Native Method)

                at org.jboss.modules.ModuleLoader$RealMBeanReg.<init>(ModuleLoader.java:833)

                at org.jboss.modules.ModuleLoader$TempMBeanReg.installReal(ModuleLoader.java:817)

                at org.jboss.modules.ModuleLoader.installMBeanServer(ModuleLoader.java:192)

                at org.jboss.modules.Main.main(Main.java:312)

      Exception in thread "main" java.lang.ExceptionInInitializerError

                at org.jboss.as.server.Main.main(Main.java:92)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.modules.Module.run(Module.java:248)

                at org.jboss.modules.Main.main(Main.java:313)

      Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")

                at org.jboss.logmanager.Logger.getLogger(Logger.java:60)

                at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)

                ... 7 more

       

      What is going on?

        • 1. Re: Arquillian failing to start with 7.1.2 snapshot
          Galder Zamarreño Master

          I have a dependency to jboss-as-arquillian-container-managed for AS7 snapshot which brings jboss-logmanager dependency.

           

          The ÅS7 command line start is, with my addition of java.util.logging.manager:

           

          INFO: Starting container with: [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java, -Djava.util.logging.manager=org.jboss.logmanager.LogManager, -ea, -Djboss.home.dir=./build/target/jboss-as, -Dorg.jboss.boot.log.file=./build/target/jboss-as/standalone/log/boot.log, -Dlogging.configuration=file:./build/target/jboss-as/standalone/configuration/logging.properties, -Djboss.modules.dir=/var/folders/vk/g4jts68n6nd37lgvynmtrwxh0000gn/T//test-module:./build/target/jboss-as/modules:./build/target/jboss-as/downloads, -Djboss.bundles.dir=./build/target/jboss-as/bundles, -jar, /Users/g/Go/code/scalabox.git/./build/target/jboss-as/jboss-modules.jar, -mp, /var/folders/vk/g4jts68n6nd37lgvynmtrwxh0000gn/T//test-module:./build/target/jboss-as/modules:./build/target/jboss-as/downloads, -jaxpmodule, javax.xml.jaxp-provider, org.jboss.as.standalone, -server-config, standalone.xml]

          • 2. Re: Arquillian failing to start with 7.1.2 snapshot
            Galder Zamarreño Master

            False alarm, I was running against a previous AS7 version.