1 2 Previous Next 18 Replies Latest reply on Sep 8, 2008 3:31 PM by Stan Silvert

    maven - jsfunit exception during build

    Thomas Peeters Newbie

      Hey,

      I pretty much decided to wait for the next release of JSFUnit, however I'm unsure if the next version would clear the following issue I'm having during build time of the project when the cargo-maven2-plugin is enabled in the pom.xml of the JSFUnit war.

      First I had this documented issue:
      http://www.qos.ch/logging/classloader.jsp
      http://lists.jboss.org/pipermail/jsfunit-dev/2008-January/000120.html

      So I decided to try my luck using slf4j, giving me the following exception during maven build.


      [INFO] Generating war C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war
      [INFO] Building war: C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war
      [INFO] [cargo:start {execution: start-container}]
      [INFO] No container defined, using a default [jetty6x, embedded] container
      [INFO] [beddedLocalContainer] Jetty 6.x Embedded starting...
      2008-08-25 10:06:07.140::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
      2008-08-25 10:06:07.171::INFO: jetty-6.1.1rc1
      2008-08-25 10:06:08.484::INFO: Extract jar:file:/C:/projects/trunk/vlafo/olympus/JSFUnitTest/target/JSFUnitTestWar-1.4.2.war!/ to C:\DOCUME~1\DEVELO~
      1\LOCALS~1\Temp\Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7\webapp
      2008-08-25 10:06:12.781::WARN: failed org.mortbay.jetty.webapp.WebAppContext@10bcb28{/JSFUnitTestWar-1.4.2,jar:file:/C:/projects/trunk/vlafo/olympus/
      JSFUnitTest/target/JSFUnitTestWar-1.4.2.war!/}
      java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
       at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
       at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
       at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
       at org.apache.myfaces.webapp.StartupServletContextListener.<clinit>(StartupServletContextListener.java:44)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at java.lang.Class.newInstance0(Class.java:350)
       at java.lang.Class.newInstance(Class.java:303)
       at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:239)


      I might fix this by getting rid of commons-logging but my project is embedded in a whole bunch of other projects all depending on each other. Most of those use implementations of commons-logging so that's out of the question.

      Any insights are greatly appreciated as it might be related to something I just missed ;)

      Cheers,
      Thomas

        • 1. Re: maven - jsfunit exception during build
          Stan Silvert Master

          I don't see how this is related to JSFUnit as I don't see any JSFUnit classes in the stack trace. Is there some difference when the application running with/without JSFUnit?

          Here is another tutorial on debugging some of the oddball ways you can get a NoClassDefFoundError:
          http://wiki.jboss.org/wiki/GetClassNotFoundExceptionOrNoClassDefFoundError

          Since you were compiling with different JDK versions, perhaps you are running into the problem entitled "You compiled the class for the wrong version". That one can be especially hard to figure out.

          Hope that helps,

          Stan

          • 2. Re: maven - jsfunit exception during build
            Thomas Peeters Newbie

            This is related to JSFUnit as I'm trying to get my TestCase to work using Maven. I followed these instructions:

            http://wiki.jboss.org/wiki/JSFUnitWithMaven

            The maven build fails using these instructions. More specifically using this:

            <plugin>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-maven2-plugin</artifactId>
             <configuration>
             <wait>false</wait>
             <configuration>
             <deployables>
             <deployable>
             <location>${project.build.directory}\${artifactId}-${versie.olympus}.war</location>
             <type>war</type>
             </deployable>
             </deployables>
             </configuration>
             </configuration>
             <executions>
             <execution>
             <id>start-container</id>
             <phase>pre-integration-test</phase>
             <goals>
             <goal>start</goal>
             </goals>
             </execution>
             <execution>
             <id>stop-container</id>
             <phase>post-integration-test</phase>
             <goals>
             <goal>stop</goal>
             </goals>
             </execution>
             </executions>
             </plugin>


            The testcase is supposed to be runnable automatically. Now it only works when I point to the ServletTestRunner with testclass and cactus-report.xsl.

            I need to comment the above maven config or I can't even build the project anymore.
            I don't really see where else I should post this as it is related to me trying to get JSFUnit to work.

            • 3. Re: maven - jsfunit exception during build
              Stan Silvert Master

              I'll help any way I can.

              The wiki I posted for NoClassDefFoundError pretty much covers all the possible ways you can get that error. (If you find a new one please let me know). I'd go through each one to find which is causing your problem.

              For instance, I noticed that SLF4JLogFactory extends org.apache.commons.logging.LogFactory. If commons logging or SLF4JLogFactory was compiled with JDK 1.6 and you tried to run under JDK 1.5 then java would report NoClassDefFoundError for SLF4JLogFactory.

              Stan

              • 4. Re: maven - jsfunit exception during build
                Thomas Peeters Newbie

                 

                "stan.silvert@jboss.com" wrote:
                I'll help any way I can.

                The wiki I posted for NoClassDefFoundError pretty much covers all the possible ways you can get that error. (If you find a new one please let me know). I'd go through each one to find which is causing your problem.

                For instance, I noticed that SLF4JLogFactory extends org.apache.commons.logging.LogFactory. If commons logging or SLF4JLogFactory was compiled with JDK 1.6 and you tried to run under JDK 1.5 then java would report NoClassDefFoundError for SLF4JLogFactory.

                Stan


                Hmm.. I realize now that the thread title is somewhat badly chosen. Sorry 'bout that.

                I omitted SLF4J logging and attempted with default logger, which should normally be stderr. Of course with our projects here being polluted with a huge amound of jars it could be related to anything really. I'm pretty much at a loss. Obviously stderr isn't being used with Jetty but some implementation of log4j. I tried setting a new version in my own project but the exception seems to be the same.

                So it can't really be a compilation version problem. I even tried SLF4J 1.1.0 instead of 1.5.2.
                Isn't Java 6 fully backward compatible with Java 5 btw?

                here it is:
                If you can make something out of this it'd be greatly appreciated.
                Thanks for the support so far ;-)


                [INFO] Building war: C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war
                [INFO] [cargo:start {execution: start-container}]
                [INFO] No container defined, using a default [jetty6x, embedded] container
                [INFO] [beddedLocalContainer] Jetty 6.x Embedded starting...
                2008-08-26 15:49:14.375::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
                2008-08-26 15:49:14.421::INFO: jetty-6.1.1rc1
                2008-08-26 15:49:14.609::INFO: Extract jar:file:/C:/projects/trunk/vlafo/olympus/JSFUnitTest/target/JSFUnitTestWar-1.4.2.war!/ to C:\DOCUME~1\DEVELO~
                1\LOCALS~1\Temp\Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7\webapp
                2008-08-26 15:49:19.046::WARN: failed org.mortbay.jetty.webapp.WebAppContext@58dfa6{/JSFUnitTestWar-1.4.2,jar:file:/C:/projects/trunk/vlafo/olympus/J
                SFUnitTest/target/JSFUnitTestWar-1.4.2.war!/}
                java.lang.ExceptionInInitializerError
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                 at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                 at java.lang.Class.newInstance0(Class.java:350)
                 at java.lang.Class.newInstance(Class.java:303)
                 at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:239)
                 at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1188)
                 at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
                 at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
                 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                 at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
                 at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:120)
                 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                 at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
                 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                 at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
                 at org.mortbay.jetty.Server.doStart(Server.java:210)
                 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                 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:585)
                 at org.codehaus.cargo.container.jetty.internal.JettyExecutorThread.run(JettyExecutorThread.java:68)
                Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Lj
                ava.lang.Class;@12305e8 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused
                by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@12305e8 for org.apache.commons.logging.impl.Lo
                g4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
                 at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
                 at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
                 at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
                 at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
                 at org.apache.myfaces.webapp.StartupServletContextListener.<clinit>(StartupServletContextListener.java:44)
                 ... 24 more
                Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@12305e8 for org.apache.commons.logging
                .impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)
                 at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
                 at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
                 ... 28 more
                Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
                 at java.lang.Class.getDeclaredConstructors0(Native Method)
                 at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
                 at java.lang.Class.getConstructor0(Class.java:2671)
                 at java.lang.Class.getConstructor(Class.java:1629)
                 at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)


                • 5. Re: maven - jsfunit exception during build
                  Thomas Peeters Newbie

                  Hmm, on closer examination it does seem to be using stderr as output...

                  • 6. Re: maven - jsfunit exception during build
                    Stan Silvert Master

                     

                    "Fhomasp" wrote:

                    Isn't Java 6 fully backward compatible with Java 5 btw?

                    Yes it is. The problem is that Java 5 is not forward compatible with Java 6. If a class gets compiled with Java 6 and then you try to run it with Java 5 then you will get a NoClassDefFoundError. The difficult part is that when you get such an error, the message might not report the class that actually had the problem. So if a subclass was compiled with Java 5 and its superclass was compiled with Java 6, and you try to run it on Java 5, you will get the NoClassDefFoundError on the subclass. But really the problem is that the superclass was comiled with Java 6.

                    So if I understand correctly, this works when you deploy your application manually, but not when you let Maven deploy with Jetty?

                    I would try to find out what the difference is.
                    Is the JDK different when running manually vs. running with Maven?
                    Have you tried running manually with Jetty?
                    Have you tried running Maven against your real target container? Cargo can deploy and test against many different containers. The latest Cargo snapshot can even run against JBoss 5.

                    "Fhomasp" wrote:

                    here it is:
                    If you can make something out of this it'd be greatly appreciated.
                    Thanks for the support so far ;-)


                    [INFO] Building war: C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war
                    [INFO] [cargo:start {execution: start-container}]
                    [INFO] No container defined, using a default [jetty6x, embedded] container
                    [INFO] [beddedLocalContainer] Jetty 6.x Embedded starting...
                    2008-08-26 15:49:14.375::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
                    2008-08-26 15:49:14.421::INFO: jetty-6.1.1rc1
                    2008-08-26 15:49:14.609::INFO: Extract jar:file:/C:/projects/trunk/vlafo/olympus/JSFUnitTest/target/JSFUnitTestWar-1.4.2.war!/ to C:\DOCUME~1\DEVELO~
                    1\LOCALS~1\Temp\Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7\webapp
                    2008-08-26 15:49:19.046::WARN: failed org.mortbay.jetty.webapp.WebAppContext@58dfa6{/JSFUnitTestWar-1.4.2,jar:file:/C:/projects/trunk/vlafo/olympus/J
                    SFUnitTest/target/JSFUnitTestWar-1.4.2.war!/}
                    java.lang.ExceptionInInitializerError
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                     at java.lang.Class.newInstance0(Class.java:350)
                     at java.lang.Class.newInstance(Class.java:303)
                     at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:239)
                     at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1188)
                     at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
                     at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
                     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                     at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
                     at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:120)
                     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                     at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
                     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                     at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
                     at org.mortbay.jetty.Server.doStart(Server.java:210)
                     at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
                     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:585)
                     at org.codehaus.cargo.container.jetty.internal.JettyExecutorThread.run(JettyExecutorThread.java:68)
                    Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Lj
                    ava.lang.Class;@12305e8 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused
                    by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@12305e8 for org.apache.commons.logging.impl.Lo
                    g4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
                     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
                     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
                     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
                     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
                     at org.apache.myfaces.webapp.StartupServletContextListener.<clinit>(StartupServletContextListener.java:44)
                     ... 24 more
                    Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@12305e8 for org.apache.commons.logging
                    .impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)
                     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
                     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
                     ... 28 more
                    Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
                     at java.lang.Class.getDeclaredConstructors0(Native Method)
                     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
                     at java.lang.Class.getConstructor0(Class.java:2671)
                     at java.lang.Class.getConstructor(Class.java:1629)
                     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)

                    The obvious place to start is to bundle Log4j with your application and see what happens. I'm not sure if Jetty uses Log4j by default or not.

                    Stan

                    • 7. Re: maven - jsfunit exception during build
                      Thomas Peeters Newbie

                       

                      "stan.silvert@jboss.com" wrote:

                      Yes it is. The problem is that Java 5 is not forward compatible with Java 6. If a class gets compiled with Java 6 and then you try to run it with Java 5 then you will get a NoClassDefFoundError. The difficult part is that when you get such an error, the message might not report the class that actually had the problem. So if a subclass was compiled with Java 5 and its superclass was compiled with Java 6, and you try to run it on Java 5, you will get the NoClassDefFoundError on the subclass. But really the problem is that the superclass was comiled with Java 6.


                      I see. I'd still be surprised if that's what causing this problem. Unless of course Jetty itself is compiled using Java 6. The maven config here builds and compiles using Java 5 at any rate.

                      "stan.silvert@jboss.com" wrote:

                      So if I understand correctly, this works when you deploy your application manually, but not when you let Maven deploy with Jetty?

                      I would try to find out what the difference is.
                      Is the JDK different when running manually vs. running with Maven?
                      Have you tried running manually with Jetty?
                      Have you tried running Maven against your real target container? Cargo can deploy and test against many different containers. The latest Cargo snapshot can even run against JBoss 5.


                      When I use maven with Jetty I never get to deploy. It fails at build time. The app server is Weblogic, btw, if that makes any difference.

                      I don't really have the option to try and run without maven. It's configured to build everything written in the trunk path of IntelliJ. The only way to get the app deployed on the weblogic server is by using maven.
                      I can build and deploy if I omit the plugin in the pom of UnitTest war. Then using the cactus xsl with the testservlet in a browser runs the tests just fine.

                      "stan.silvert@jboss.com" wrote:

                      The obvious place to start is to bundle Log4j with your application and see what happens. I'm not sure if Jetty uses Log4j by default or not.

                      Stan


                      I did. With exactly the same results. Jetty uses stderr as default and seems to find alternatives on its own. Which is why I attempted SLF4J in the first place.
                      It must have something to do with apache commons.logging.


                      • 8. Re: maven - jsfunit exception during build
                        Thomas Peeters Newbie

                        Well, after looking around for articles about cargo, jetty and maven with commons-logging I notice that attempting to work that combination is a world of pain.

                        http://www.brokenbuild.com/blog/2007/02/21/maven2-cargo-and-deploying-to-jetty-6-with-commons-logging/

                        I'm unsure how to proceed ..

                        • 9. Re: maven - jsfunit exception during build
                          Stan Silvert Master

                          What version of Cargo are you using? Have you tried the latest snapshot? That's a pretty old article. I know that some of my tests have commons-logging as a dependency but I don't know if it's actually being used.

                          <pluginRepositories>
                           <pluginRepository>
                           <id>codehaus snapshot repository</id>
                           <url>http://snapshots.repository.codehaus.org/</url>
                           <releases>
                           <enabled>true</enabled>
                           </releases>
                           </pluginRepository>
                          </pluginRepositories>
                          
                          <build>
                           <plugins>
                          
                           <plugin>
                           <groupId>org.codehaus.cargo</groupId>
                           <artifactId>cargo-maven2-plugin</artifactId>
                           <version>1.0-SNAPSHOT</version>
                           <!--<version>1.0-alpha-5</version> -->
                           </plugin>
                          
                           </plugins>
                          </build>


                          • 10. Re: maven - jsfunit exception during build
                            Thomas Peeters Newbie

                            I don't really know which version of Cargo is being used. It's our buildmaster who configures that and he's on a two week leave :)
                            Never the less I tried with your suggestion. The maven goal downloaded the newer versions automatically but I do get the exact same results.
                            But I did notice that many modules which have dependencies everywhere in the whole project use different versions of commons-logging (1.0.2 to 1.1). Though I did specify the newest version (1.1.1) in the testwars pom just so it should use that one. No cigar.

                            Thanks for your efforts :)

                            • 11. Re: maven - jsfunit exception during build
                              Thomas Peeters Newbie

                              Hey,

                              I have been making progress with my apache commons-logging problem.
                              It really was related to commons-logging itself and more specifically more than one jar of commons-logging in the classpath.
                              Now the project builds and deploys to Jetty as well, although not correctly.
                              One of the internal architecture classes here does still throw an exception which causes my project war to connect to Jetty unsuccessfully. Perhaps you can already tell me by looking at the excerpt I post if something must be way off on my end.

                              [INFO] [beddedLocalContainer] Jetty 6.x Embedded starting...
                              2008-08-28 15:05:22.807::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
                              2008-08-28 15:05:22.838::INFO: jetty-6.1.1rc1
                              2008-08-28 15:05:23.104::INFO: Extract jar:file:/C:/projects/trunk/vlafo/olympus/JSFUnitTest/target/JSFUnitTestWar-1.4.2.war!/ to C:\DOCUME~1\DEVELO~
                              1\LOCALS~1\Temp\Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7\webapp
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                              ar-1_4_2__aar4a7/webapp/WEB-INF/lib/jboss-jsfunit-core-1.0.0.Beta2.jar!/META-INF/faces-config.xml
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                              ar-1_4_2__aar4a7/webapp/WEB-INF/lib/jboss-jsfunit-core-1.0.0.Beta3.jar!/META-INF/faces-config.xml
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                              ar-1_4_2__aar4a7/webapp/WEB-INF/lib/jsf-facelets-1.1.11.jar!/META-INF/faces-config.xml
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                              ar-1_4_2__aar4a7/webapp/WEB-INF/lib/tomahawk-1.1.6.jar!/META-INF/faces-config.xml
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Reading config /WEB-INF/faces-config.xml
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Starting up MyFaces-package : myfaces-api in version : 1.1.5 from path : file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jet
                              ty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7/webapp/WEB-INF/lib/myfaces-api-1.1.5.jar
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Starting up MyFaces-package : myfaces-impl in version : 1.1.5 from path : file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Je
                              tty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7/webapp/WEB-INF/lib/myfaces-impl-1.1.5.jar
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: MyFaces-package : tomahawk-sandbox not found.
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Starting up MyFaces-package : tomahawk in version : 1.1.6 from path : file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_
                              0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7/webapp/WEB-INF/lib/tomahawk-1.1.6.jar
                              28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
                              28-aug-2008 15:05:30 org.apache.commons.logging.impl.SLF4JLog info
                              INFO: ServletContext 'C:\Documents and Settings\developer\Local Settings\Temp\Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a
                              7\webapp\' initialized.
                              <2008-08-28 15:05:30,510> [INFO ] (WebClient) Connecting client 'Olympuswar': <<local on server>>
                              <2008-08-28 15:05:30,510> [INFO ] (WebClient) I expect server version 1.4.2
                              <2008-08-28 15:05:30,510> [INFO ] (WebClient) Started client Olympuswar v1.4.2
                              2008-08-28 15:05:30.526::INFO: Extract jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/cargo/conf/cargocpc.war!/ to C:\DOCUME
                              ~1\DEVELO~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3\webapp
                              be.vlafo.arch.exception.FactoryException: Can not determine class of object: jndi:ServerProxy
                              [be.vlafo.ejbs.BeanFactory]
                              at be.vlafo.ejbs.HomeDynamicProxy.makeDelegate(HomeDynamicProxy.java:124)
                              --- caused by: javax.naming.NameNotFoundException
                              at org.mortbay.naming.NamingContext.lookup(NamingContext.java:578)
                              at org.mortbay.naming.NamingContext.lookup(NamingContext.java:680)
                              at org.mortbay.naming.local.localContextRoot.lookup(localContextRoot.java:164)
                              at javax.naming.InitialContext.lookup(InitialContext.java:351)
                              at be.vlafo.ejbs.HomeDynamicProxy.makeDelegate(HomeDynamicProxy.java:122)
                              at be.vlafo.ejbs.HomeDynamicProxy.newInstance(HomeDynamicProxy.java:75)
                              at be.vlafo.ejbs.NormalBeanFactory.getHome(NormalBeanFactory.java:150)
                              at be.vlafo.ejbs.BeanFactory.lookup(BeanFactory.java:135)
                              at be.vlafo.client.RemoteServerGateway.lookup(RemoteServerGateway.java:563)
                              at be.vlafo.client.RemoteServerGateway.connect(RemoteServerGateway.java:303)
                              at be.vlafo.client.AbstractClient.connect(AbstractClient.java:433)
                              at be.vlafo.webarch.WebClient.connect(WebClient.java:345)
                              at be.vlafo.webarch.WebClient$1.run(WebClient.java:325)
                              2008-08-28 15:05:30.870::INFO: Started SelectChannelConnector @ 0.0.0.0:8080
                              <2008-08-28 15:05:30,885> [ERROR] (WebClient) Client 'Olympuswar' FAILED to connect to <<local on server>>
                              <2008-08-28 15:05:30,901> [INFO ] (WebClient$1) VLAFO - connect to WebLogic failed due to be.vlafo.client.ClientException #1 (warning): Connectie gefa
                              ald met null:0
                              [INFO] [beddedLocalContainer] Jetty 6.x Embedded started on port [8080]
                              [INFO] [surefire:test {execution: surefire-it}]
                              [INFO] Tests are skipped.
                              [INFO] [cargo:stop {execution: stop-container}]
                              [INFO] [beddedLocalContainer] Jetty 6.x Embedded is stopping...
                              [INFO] [beddedLocalContainer] Jetty 6.x Embedded is stopped
                              [INFO] [install:install]
                              [INFO] Installing C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war to C:\Docume~1\developer\.m2\repository\be\vlafo\olympus
                              \JSFUnitTestWar\1.4.2\JSFUnitTestWar-1.4.2.war


                              • 12. Re: maven - jsfunit exception during build
                                Stan Silvert Master

                                I think something is wrong in your pom. It is trying to connect before the WAR is fully deployed to Jetty.

                                It's probably a problem related to Step 7 of the instructions here:
                                http://wiki.jboss.org/wiki/JSFUnitWithMaven

                                Stan

                                • 13. Re: maven - jsfunit exception during build
                                  Stan Silvert Master

                                  I doubt that this will be the last of your problems, but the output shows that you have the jars of both JSFUnit Beta 2 and JSFUnit Beta 3 in your WAR:

                                  "Fhomasp" wrote:


                                  [INFO] [beddedLocalContainer] Jetty 6.x Embedded starting...
                                  2008-08-28 15:05:22.807::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
                                  2008-08-28 15:05:22.838::INFO: jetty-6.1.1rc1
                                  ar-1_4_2__aar4a7/webapp/WEB-INF/lib/jboss-jsfunit-core-1.0.0.Beta2.jar!/META-INF/faces-config.xml
                                  28-aug-2008 15:05:29 org.apache.commons.logging.impl.SLF4JLog info
                                  INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                                  ar-1_4_2__aar4a7/webapp/WEB-INF/lib/jboss-jsfunit-core-1.0.0.Beta3.jar!/META-INF/faces-config.xml


                                  • 14. Re: maven - jsfunit exception during build
                                    Thomas Peeters Newbie

                                    Hey,

                                    I pretty much neglected this problem because I can't seem to get the beta3 jsfunit class running. But here is the updated error message I get now during the build.

                                    [INFO] Generating war C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war
                                    [INFO] Building war: C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war
                                    [INFO] [cargo:start {execution: start-container}]
                                    [INFO] No container defined, using a default [jetty6x, embedded] container
                                    [INFO] [beddedLocalContainer] Jetty 6.x Embedded starting...
                                    2008-09-02 15:15:43.000::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
                                    2008-09-02 15:15:43.031::INFO: jetty-6.1.1rc1
                                    2008-09-02 15:15:43.187::INFO: Extract jar:file:/C:/projects/trunk/vlafo/olympus/JSFUnitTest/target/JSFUnitTestWar-1.4.2.war!/ to C:\DOCUME~1\DEVELO~
                                    1\LOCALS~1\Temp\Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7\webapp
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                                    ar-1_4_2__aar4a7/webapp/WEB-INF/lib/jboss-jsfunit-core-1.0.0.Beta3.jar!/META-INF/faces-config.xml
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                                    ar-1_4_2__aar4a7/webapp/WEB-INF/lib/jsf-facelets-1.1.11.jar!/META-INF/faces-config.xml
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Reading config jar:file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestW
                                    ar-1_4_2__aar4a7/webapp/WEB-INF/lib/tomahawk-1.1.6.jar!/META-INF/faces-config.xml
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Reading config /WEB-INF/faces-config.xml
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Starting up MyFaces-package : myfaces-api in version : 1.1.5 from path : file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jet
                                    ty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7/webapp/WEB-INF/lib/myfaces-api-1.1.5.jar
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Starting up MyFaces-package : myfaces-impl in version : 1.1.5 from path : file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Je
                                    tty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7/webapp/WEB-INF/lib/myfaces-impl-1.1.5.jar
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: MyFaces-package : tomahawk-sandbox not found.
                                    2-sep-2008 15:15:48 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Starting up MyFaces-package : tomahawk in version : 1.1.6 from path : file:/C:/Documents%20and%20Settings/developer/Local%20Settings/Temp/Jetty_
                                    0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a7/webapp/WEB-INF/lib/tomahawk-1.1.6.jar
                                    2-sep-2008 15:15:49 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
                                    2-sep-2008 15:15:49 org.apache.commons.logging.impl.SLF4JLog info
                                    INFO: ServletContext 'C:\Documents and Settings\developer\Local Settings\Temp\Jetty_0_0_0_0_8080_JSFUnitTestWar-1.4.2.war__JSFUnitTestWar-1_4_2__aar4a
                                    7\webapp\' initialized.
                                    <2008-09-02 15:15:49,578> [INFO ] (WebClient) Connecting client 'Olympuswar': <<local on server>>
                                    <2008-09-02 15:15:49,578> [INFO ] (WebClient) Started client Olympuswar v1.4.2
                                    <2008-09-02 15:15:49,578> [INFO ] (WebClient) I expect server version 1.4.2
                                    2008-09-02 15:15:49.578::INFO: Extract jar:file:/C:/projects/trunk/vlafo/olympus/JSFUnitTest/target/jetty6x/cargocpc.war!/ to C:\DOCUME~1\DEVELO~1\LO
                                    CALS~1\Temp\Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3\webapp
                                    be.vlafo.arch.exception.FactoryException: Can not determine class of object: jndi:ServerProxy
                                     [be.vlafo.ejbs.BeanFactory]
                                     at be.vlafo.ejbs.HomeDynamicProxy.makeDelegate(HomeDynamicProxy.java:124)
                                    --- caused by: javax.naming.NameNotFoundException
                                     at org.mortbay.naming.NamingContext.lookup(NamingContext.java:578)
                                     at org.mortbay.naming.NamingContext.lookup(NamingContext.java:680)
                                     at org.mortbay.naming.local.localContextRoot.lookup(localContextRoot.java:164)
                                     at javax.naming.InitialContext.lookup(InitialContext.java:351)
                                     at be.vlafo.ejbs.HomeDynamicProxy.makeDelegate(HomeDynamicProxy.java:122)
                                     at be.vlafo.ejbs.HomeDynamicProxy.newInstance(HomeDynamicProxy.java:75)
                                     at be.vlafo.ejbs.NormalBeanFactory.getHome(NormalBeanFactory.java:150)
                                     at be.vlafo.ejbs.BeanFactory.lookup(BeanFactory.java:135)
                                     at be.vlafo.client.RemoteServerGateway.lookup(RemoteServerGateway.java:563)
                                     at be.vlafo.client.RemoteServerGateway.connect(RemoteServerGateway.java:303)
                                     at be.vlafo.client.AbstractClient.connect(AbstractClient.java:433)
                                     at be.vlafo.webarch.WebClient.connect(WebClient.java:345)
                                     at be.vlafo.webarch.WebClient$1.run(WebClient.java:325)
                                    <2008-09-02 15:15:49,625> [ERROR] (WebClient) Client 'Olympuswar' FAILED to connect to <<local on server>>
                                    <2008-09-02 15:15:49,625> [INFO ] (WebClient$1) VLAFO - connect to WebLogic failed due to be.vlafo.client.ClientException #1 (warning): Connectie gefa
                                    ald met null:0
                                    2008-09-02 15:15:49.953::INFO: Started SelectChannelConnector @ 0.0.0.0:8080
                                    [INFO] [beddedLocalContainer] Jetty 6.x Embedded started on port [8080]
                                    [INFO] [surefire:test {execution: surefire-it}]
                                    [INFO] Tests are skipped.
                                    [INFO] [cargo:stop {execution: stop-container}]
                                    [INFO] [beddedLocalContainer] Jetty 6.x Embedded is stopping...
                                    [INFO] [beddedLocalContainer] Jetty 6.x Embedded is stopped
                                    [INFO] [install:install]
                                    [INFO] Installing C:\projects\trunk\vlafo\olympus\JSFUnitTest\target\JSFUnitTestWar-1.4.2.war to C:\Docume~1\developer\.m2\repository\be\vlafo\olympus
                                    \JSFUnitTestWar\1.4.2\JSFUnitTestWar-1.4.2.war


                                    1 2 Previous Next