users@glassfish.java.net

Re: Test EJB app with JUnit and maven-embedded-glassfish-plugin

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Oct 2010 08:29:12 PDT

Hi Greg. Nope, it still does the same thing even after I relocate maven repository (which I assume you suggested to relocate) to C:\m2, as you can see in the following output:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - cz.datavision.testea:server:ejb:0.0.1
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] snapshot org.glassfish:maven-embedded-glassfish-plugin:3.1-SNAPSHOT: checking for updates from central
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1250 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\Rudolf Vlk\workspace_testEA\TestEAEJB\src\main\resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (Cp1250 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\Rudolf Vlk\workspace_testEA\TestEAEJB\src\test\resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [ejb:ejb {execution: default-ejb}]
[INFO] Building ejb TestEA with ejbVersion 3.0
[INFO] Building jar: C:\Users\Rudolf Vlk\workspace_testEA\TestEAEJB\target\TestEA.jar
[INFO] [embedded-glassfish:start {execution: start-glassfish}]
[INFO] snapshot org.glassfish.extras:glassfish-uber:3.1-SNAPSHOT: checking for updates from central
Downloading: http://download.java.net/maven/glassfish/org/glassfish/extras/glassfish-uber/3.1-SNAPSHOT/glassfish-uber-3.1-SNAPSHOT.jar
Created New Bootstrap ClassLoader. ServerId = maven, ClassPaths =
ClassPath Element : file:/c:/m2/org/glassfish/extras/glassfish-uber/3.1-SNAPSHOT/glassfish-uber-3.1-SNAPSHOT.jar
ClassPath Element : file:/c:/m2/org/glassfish/maven-embedded-glassfish-plugin/3.1-SNAPSHOT/maven-embedded-glassfish-plugin-3.1-SNAPSHOT.jar
[FATAL ERROR] org.glassfish.maven.StartMojo#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.glassfish:maven-embedded-glassfish-plugin:3.1-SNAPSHOT]
urls[0] = file:/c:/m2/org/glassfish/maven-embedded-glassfish-plugin/3.1-SNAPSHOT/maven-embedded-glassfish-plugin-3.1-SNAPSHOT.jar
urls[1] = file:/c:/m2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/C:/Install/Maven/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/glassfish/embeddable/GlassFish
org.glassfish.embeddable.GlassFish
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/glassfish/embeddable/GlassFish
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
        at java.lang.Class.getMethod0(Class.java:2670)
        at java.lang.Class.getMethod(Class.java:1603)
        at org.glassfish.maven.StartMojo.startGlassFish(StartMojo.java:69)
        at org.glassfish.maven.StartMojo.execute(StartMojo.java:61)
        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.glassfish.embeddable.GlassFish
        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 java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 25 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Wed Oct 20 17:05:46 CEST 2010
[INFO] Final Memory: 12M/29M
[INFO] ------------------------------------------------------------------------
[Message sent by forum member 'rudolfvlk']

http://forums.java.net/jive/thread.jspa?messageID=485746