Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » InvocationTargetException: Missing parameters(InvocationTargetException: Missing parameters)
InvocationTargetException: Missing parameters [message #894216] Sat, 07 July 2012 18:19 Go to next message
MeJ MeJ is currently offline MeJ MeJ
Messages: 9
Registered: July 2012
Junior Member
Hi,
I am trying to execute a project using maven.
My pom file looks like tis :
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>Acceleo-compile</id>
<phase>compile</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.sonatype.mavenbook.simple.AcceleoProject.src.AcceleoProject.files.AcceleoCompiler</mainClass>
<argument>${basedir}/src/main/java</argument>
<argument>${basedir}/target/classes</argument>

</configuration>
</execution>
<execution>
<id>Acceleo-run</id>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.sonatype.mavenbook.simple.AcceleoProject.src.AcceleoProject.files.Generate</mainClass>
<arguments>
<argument>data/modelTrain.uml</argument>
<argument>data/out</argument>
</arguments>
</configuration>
</execution>
</executions>

When i run te goal package i get tis error:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (Acc
eleo-compile) on project simple: An exception occured while executing the Java c
lass. null: InvocationTargetException: Missing parameters -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:exec-maven-plugin:1.2:java (Acceleo-compile) on project simple:
An exception occured while executing the Java class. null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured
while executing the Java class. null
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:346)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
Caused by: java.lang.reflect.InvocationTargetException
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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:291)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Missing parameters
at org.sonatype.mavenbook.simple.AcceleoProject.src.AcceleoProject.files
.AcceleoCompiler.main(AcceleoCompiler.java:35)
... 6 more

Any idea what can cause my problem?
THank you in advance
Re: InvocationTargetException: Missing parameters [message #894449 is a reply to message #894216] Mon, 09 July 2012 09:38 Go to previous message
Stephane Begaudeau is currently offline Stephane Begaudeau
Messages: 413
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

It seems that your Java class is missing some arguments "Missing parameters at org.sonatype.mavenbook.simple.AcceleoProject.src.AcceleoProject.files.AcceleoCompiler.main" but without the code of this class I can't know why.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo



Previous Topic:org.eclipse.acceleo:maven:jar:3.2.1 not found
Next Topic:generate.emtl not found
Goto Forum:
  


Current Time: Mon Oct 20 21:23:24 GMT 2014

Powered by FUDForum. Page generated in 0.01632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software