2016-07-20 59 views
0

运行Maven构建时出现以下错误。似乎无法仪表班。任何人都有一个想法应该是什么原因? 谢谢。 下面是建立输出:Maven构建未能使用仪器类

[ERROR] Failed to execute goal org.javalite:activejdbc-instrumentation:1.4.11:instrument (default) on project xtm2rest: Failed to add output directory to classpath: org.javalite.instrumentation.InstrumentationException: javassist.NotFoundException: modelClass(..) is not found in org.javalite.activejdbc.Model -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.javalite:activejdbc-instrumentation:1.4.11:instrument (default) on project xtm2rest: Failed to add output directory to classpath 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) 
    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.buildProject(LifecycleModuleBuilder.java:116) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) 
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) 
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) 
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) 
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) 
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:497) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to add output directory to classpath 
    at org.javalite.instrumentation.ActiveJdbcInstrumentationPlugin.execute(ActiveJdbcInstrumentationPlugin.java:88) 
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 
    ... 19 more 
Caused by: java.lang.RuntimeException: org.javalite.instrumentation.InstrumentationException: javassist.NotFoundException: modelClass(..) is not found in org.javalite.activejdbc.Model 
    at org.javalite.instrumentation.Instrumentation.instrument(Instrumentation.java:70) 
    at org.javalite.instrumentation.ActiveJdbcInstrumentationPlugin.instrument(ActiveJdbcInstrumentationPlugin.java:124) 
    at org.javalite.instrumentation.ActiveJdbcInstrumentationPlugin.execute(ActiveJdbcInstrumentationPlugin.java:82) 
    ... 21 more 
Caused by: org.javalite.instrumentation.InstrumentationException: javassist.NotFoundException: modelClass(..) is not found in org.javalite.activejdbc.Model 
    at org.javalite.instrumentation.ModelInstrumentation.instrument(ModelInstrumentation.java:43) 
    at org.javalite.instrumentation.Instrumentation.instrument(Instrumentation.java:57) 
    ... 23 more 
Caused by: javassist.NotFoundException: modelClass(..) is not found in org.javalite.activejdbc.Model 
    at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1210) 
    at org.javalite.instrumentation.ModelInstrumentation.doInstrument(ModelInstrumentation.java:51) 
    at org.javalite.instrumentation.ModelInstrumentation.instrument(ModelInstrumentation.java:40) 
    ... 24 more 
+0

我从来没有见过这样的例外。你能整理一个像这样破碎的快速例子,以便我可以重现吗? – ipolevoy

+0

另外,你有这个:error:NotFoundException:modelClass(..)在org.javalite.activejdbc.Model中找不到。有没有一种方法可以在类路径上使用多于​​一个的ActiveJDBC版本,或者不同版本的插装插件和ActiveJDBC库? – ipolevoy

回答

0

既然你不加入任何详细信息,我只能猜测你的activejdbc-instrumentation插件和activejdbc的版本是不同的。检查两者是否在同一版本上。

+0

是的,这是问题所在。他们是不同的版本。谢谢你的帮助。 – csm86