Hi, Can you check what you have in this jar? It's on the classpath from the information you provided.
urls[1] = file:/C:/Documents and Settings/slaws/.m2/repository/org/apache/tuscan y/sca/tuscany-maven-eclipse-compiler/2.0-SNAPSHOT/tuscany-maven-eclipse-compiler -2.0-SNAPSHOT.jar The other thing you can do is to run "mvnDebug ...", then attach the Eclipse debugger to it to capture the NoClassDefinitionFoundError to see what is going on. Thanks, Raymond From: Simon Laws Sent: Tuesday, February 10, 2009 9:17 AM To: [email protected] Subject: Re: [2.x] samples/calculator-rmi-reference top level build error On Thu, Feb 5, 2009 at 4:53 PM, Simon Laws <[email protected]> wrote: On Thu, Feb 5, 2009 at 4:46 PM, Raymond Feng <[email protected]> wrote: Let me try to see what happened. Can you also try to build tools/maven/maven-eclipse-compiler first to see if it makes a difference? Thanks, Raymond From: Simon Laws Sent: Thursday, February 05, 2009 2:01 AM To: tuscany-dev Subject: [2.x] samples/calculator-rmi-reference top level build error Just got the following with a top level build of latest code. Don't get it when building in the module itself. [INFO] ------------------------------------------------------------------------ [INFO] Building Apache Tuscany SCA Calculator RMI Reference Sample [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [FATAL ERROR] org.apache.maven.plugin.TestCompilerMojo#execute() caused a linkag e error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realm s: [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven -compiler-plugin] urls[0] = file:/C:/Documents and Settings/slaws/.m2/repository/org/apache/maven/ plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar urls[1] = file:/C:/Documents and Settings/slaws/.m2/repository/org/apache/tuscan y/sca/tuscany-maven-eclipse-compiler/2.0-SNAPSHOT/tuscany-maven-eclipse-compiler -2.0-SNAPSHOT.jar urls[2] = file:/C:/Documents and Settings/slaws/.m2/repository/org/codehaus/plex us/plexus-utils/1.0.4/plexus-utils-1.0.4.jar urls[3] = file:/C:/Documents and Settings/slaws/.m2/repository/org/codehaus/plex us/plexus-compiler-api/1.5.3/plexus-compiler-api-1.5.3.jar urls[4] = file:/C:/Documents and Settings/slaws/.m2/repository/org/eclipse/jdt/c ore/3.3.0-v_771/core-3.3.0-v_771.jar urls[5] = file:/C:/Documents and Settings/slaws/.m2/repository/org/eclipse/osgi/ 3.3.0-v20070530/osgi-3.3.0-v20070530.jar urls[6] = file:/C:/Documents and Settings/slaws/.m2/repository/org/codehaus/plex us/plexus-compiler-manager/1.5.3/plexus-compiler-manager-1.5.3.jar urls[7] = file:/C:/Documents and Settings/slaws/.m2/repository/org/codehaus/plex us/plexus-compiler-javac/1.5.3/plexus-compiler-javac-1.5.3.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/c:/simon/apps/maven-2.0.9/bin/../lib/maven-2.0.9-uber.jar [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] org/apache/tuscany/sca/tools/maven/compiler/osgi/BundleResolver org.apache.tuscany.sca.tools.maven.compiler.osgi.BundleResolver [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoClassDefFoundError: org/apache/tuscany/sca/tools/maven/compiler/osgi /BundleResolver at org.apache.tuscany.sca.tools.maven.compiler.JavaCompiler.compile(Java Compiler.java:74) at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler Mojo.java:493) at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.jav a:102) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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.tuscany.sca.tools.maven. compiler.osgi.BundleResolver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL oader.java:195) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal m.java:255) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal m.java:274) at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader. java:214) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 21 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 minutes 10 seconds [INFO] Finished at: Thu Feb 05 09:52:43 GMT 2009 [INFO] Final Memory: 43M/1016M [INFO] ------------------------------------------------------------------------ Simon Hi Raymond I did try recompiling the compiler plugin. Didn't seem to affect it immediately. I.e. still say this during top down compiles. It did stop doing it for a while but it's back again now but I haven't tracked down what makes it go away yet. Simon Have been watching this problem for the last couple of days. It still happens but the solution for me seems to be to close the dos prompt I'm using to do the compile, start a new dos prompt and repeat the compile. Still don't know precisely what changes. Simon
