You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wayne Fay <wa...@gmail.com> on 2008/03/03 22:52:30 UTC

Re: exec plugin info needed

The root cause of your error is:
Caused by: java.lang.NoClassDefFoundError: javax/jms/MessageListener

You should probably add a dependency to the javax jms artifact, or to
the Geronimo jms spec artifact (easier).

Wayne

On 1/24/08, Daniele De Francesco <dd...@gmail.com> wrote:
> Hi,
>
> I've got to get working maven-exec-plugin.
>
> I know I have somewhere a classpath problem or a configuration one....but I
> cannot find it yet...
>
> Ok then, my environment is like this: Windows XP 5.1,x86, maven 2.0.8, Java
> version: 1.5.0_10
>
> here's the command I'm issuing:
>
> mvn -e -Dmaven.test.skip=true clean install exec:java
>
> and here's mvn stacktrace:
>
> [....]
>
> [INFO] [exec:java]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] null
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (Defa
> ultLifecycleExecutor.java:564)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:493)
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (Defau
> ltLifecycleExecutor.java:463)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:311)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:278)
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> (DefaultLi
> fecycleExecutor.java:143)
>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>        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:585)
>        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: org.apache.maven.plugin.MojoExecutionException
>        at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java
> :318)
>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
> (DefaultPlugi
> nManager.java:447)
>        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (Defa
> ultLifecycleExecutor.java:539)
>        ... 16 more
> Caused by: java.lang.NoClassDefFoundError: javax/jms/MessageListener
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        at java.security.SecureClassLoader.defineClass(
> SecureClassLoader.java:12
> 4)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:264)
>        at java.lang.Thread.run(Thread.java:595)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 13 seconds
> [INFO] Finished at: Thu Jan 24 12:38:28 CET 2008
> [INFO] Final Memory: 8M/25M
> [INFO]
> ------------------------------------------------------------------------
>
>
> the plugin config is like this (obviously I tried many configs but the
> result is, suspiciously, always the same)
>              [...]
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>exec-maven-plugin</artifactId>
>                <version>1.1-beta-1</version>
>
>                <configuration>
>                    <executable>java</executable>
>                    <mainClass>it.sogei.gwb.ailclient.AILInterface
> </mainClass>
>                    <commandLineArgs>-
> Djava.security.policy=ailinterface.policy -
> Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -
> Djava.naming.provider.url=jnp://localhost:1099 -
> Djava.naming.factory.url.pkgs=org.jboss.naming.client -
> Dj2ee.clientName=ailclient</commandLineArgs>
>                    <argument>-jar</argument>
>                    <argument>-classpath</argument>
>                    <classpath/>
>                    <argument>${project.build.directory}/ailclient-
> 1.1-SNAPSHOT.jar</argument>
>
>                </configuration>
>
>            </plugin>
>           [...]
>
>
> in the pom are enumerated all the dependencies needed.
>
> Anyone can point me in the right direction?
>
> Regards
> Daniele
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org