2 Replies Latest reply on Feb 27, 2011 9:20 PM by Keith Babo

    The mystery of quickstarts

    Magesh Bojan Master

      Okay, I tried fresh with a Windows machine to build the quickstarts. A clean switchyard repo locally. Here is the build error I get

       

      [INFO] [compiler:compile {execution: default-compile}]
      [INFO] Compiling 10 source files to C:\ESB\quickstarts\m1app\target\classes
      [INFO] [switchyard:configurator {execution: default}]
      [FATAL ERROR] org.switchyard.tools.maven.plugins.switchyard.ConfiguratorMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms:
      [FATAL ERROR] Plugin realm = app0.child-container[org.switchyard:switchyard-plugin:1.0-SNAPSHOT]
      urls[0] = file:/C:/ESB/.m2/repository/org/switchyard/switchyard-plugin/1.0-SNAPSHOT/switchyard-plugin-1.0-SNAPSHOT.jar
      urls[1] = file:/C:/ESB/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar
      urls[2] = file:/C:/ESB/.m2/repository/xmlunit/xmlunit/1.1/xmlunit-1.1.jar
      urls[3] = file:/C:/ESB/.m2/repository/org/switchyard/switchyard-config/1.0-SNAPSHOT/switchyard-config-1.0-SNAPSHOT.jar
      urls[4] = file:/C:/ESB/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar
      urls[5] = file:/C:/ESB/.m2/repository/org/switchyard/switchyard-build/1.0-SNAPSHOT/switchyard-build-1.0-SNAPSHOT.jar
      urls[6] = file:/C:/ESB/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar
      urls[7] = file:/C:/ESB/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
      [FATAL ERROR] Container realm = plexus.core
      urls[0] = file:/C:/ESB/installs/maven-2.2.1/lib/maven-2.2.1-uber.jar
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] org/apache/tools/ant/types/selectors/SelectorScanner
      org.apache.tools.ant.types.selectors.SelectorScanner
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NoClassDefFoundError: org/apache/tools/ant/types/selectors/SelectorScanner
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
              at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
              at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
              at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
              at org.switchyard.tools.maven.plugins.switchyard.ConfiguratorMojo.execute(ConfiguratorMojo.java:139)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
              at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
              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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.types.selectors.SelectorScanner
              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:307)
              at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
              at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
              at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
              at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
              ... 34 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1 minute 48 seconds
      [INFO] Finished at: Sat Feb 26 17:46:48 IST 2011
      [INFO] Final Memory: 31M/74M
      [INFO] ------------------------------------------------------------------------
      

       

      So I go an apply this pull request locally and build the core, as there seem to be removal of apache's DirectoryScanner , QS works

       

      Running org.switchyard.quickstarts.m1app.OrderServiceTest
      31 [main] INFO org.jboss.weld.Version - WELD-000900 1.1.0 (2011-02-26 00:02)
      94 [main] INFO org.jboss.weld.Bootstrap - WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transact
      531 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled
      531 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1 sec
      Running org.switchyard.quickstarts.m1app.WebServiceTest
      18:00:40,906 INFO  [httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
      18:00:40,906 INFO  [httpclient.HttpMethodDirector] Retrying request
      18:00:41,890 INFO  [httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
      18:00:41,890 INFO  [httpclient.HttpMethodDirector] Retrying request
      18:00:42,890 INFO  [httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
      18:00:42,890 INFO  [httpclient.HttpMethodDirector] Retrying request
      

       

      Now as a final test I apply Keith's pull locally and test

       

      Running org.switchyard.quickstarts.m1app.OrderServiceTest
      31 [main] INFO org.jboss.weld.Version - WELD-000900 1.1.0 (2011-02-26 00:02)
      78 [main] INFO org.jboss.weld.Bootstrap - WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
      500 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled
      500 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled
      18:03:22,687 INFO  [soap.InboundHandler] WebService published at http://localhost:18001/OrderService
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.531 sec
      Running org.switchyard.quickstarts.m1app.WebServiceTest
      18:03:22,921 WARN  [httpclient.HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.344 sec
      

       

      That works great!

       

      PS: Just in case if anyone is interested, the versions of the tools in Windows system were

       

      C:\ESB\quickstarts>mvn -version
      Apache Maven 2.2.1 (r801777; 2009-08-07 00:46:01+0530)
      Java version: 1.6.0_21
      Java home: C:\ESB\installs\java\jdk1.6.0\jre
      Default locale: en_US, platform encoding: Cp1252
      OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
      
      C:\ESB\quickstarts>ant -version
      Apache Ant version 1.8.1 compiled on April 30 2010