Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enunciate 2: The Java compiler has crashed! #146

Closed
anton-johansson opened this issue Sep 17, 2015 · 4 comments
Closed

Enunciate 2: The Java compiler has crashed! #146

anton-johansson opened this issue Sep 17, 2015 · 4 comments

Comments

@anton-johansson
Copy link
Contributor

I ran mvn -e enunciate:docs to get extra error details. I get the same problem in Eclipse as in command line.

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building <project-name> <version>
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- enunciate-maven-plugin:2.0.0-M.5:docs (default-cli) @ <artifactId>---
[INFO] [ENUNCIATE] Using enunciate configuration at C:\Users\<username>\Projects\<project-path>\enunciate.xml
[INFO] Reflections took 1056 ms to scan 27 urls, producing 346 keys and 346 values 
[ERROR] [ENUNCIATE] 
[ERROR] [ENUNCIATE] The Java compiler has crashed! This is likely due to some anomalies in your classpath or your source path (e.g. duplicate source files for the same class). The fact that there isn't more information available is a bug in the Java compiler.
[ERROR] [ENUNCIATE] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.060 s
[INFO] Finished at: 2015-09-17T08:12:57+01:00
[INFO] Final Memory: 21M/449M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.webcohesion.enunciate:enunciate-maven-plugin:2.0.0-M.5:docs (default-cli) on project <artifactId>: Execution default-cli of goal com.webcohesion.enunciate:enunciate-maven-plugin:2.0.0-M.5:docs failed: Enunciate compile failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.webcohesion.enunciate:enunciate-maven-plugin:2.0.0-M.5:docs (default-cli) on project <artifactId>: Execution default-cli of goal com.webcohesion.enunciate:enunciate-maven-plugin:2.0.0-M.5:docs failed: Enunciate compile failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
    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:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    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:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    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.PluginExecutionException: Execution default-cli of goal com.webcohesion.enunciate:enunciate-maven-plugin:2.0.0-M.5:docs failed: Enunciate compile failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: com.webcohesion.enunciate.EnunciateException: Enunciate compile failed.
    at com.webcohesion.enunciate.Enunciate.run(Enunciate.java:678)
    at com.webcohesion.enunciate.mojo.ConfigMojo.execute(ConfigMojo.java:356)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    ... 20 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
@stoicflame stoicflame changed the title 2.0.0.M-5: The Java compiler has crashed! The Java compiler has crashed! Sep 17, 2015
@stoicflame
Copy link
Owner

See #117 for another instance where the compiler has crashed. It's uncertain whether this has the same root cause, though.

@stoicflame stoicflame changed the title The Java compiler has crashed! Enunciate 2: The Java compiler has crashed! Sep 17, 2015
@stoicflame
Copy link
Owner

Okay, after quite awhile of effort that amounts to banging my head against the wall, the only thing left for me to do was to provide a document that describes the problem and gives some tips about how to deal with it:

https://github.com/stoicflame/enunciate/wiki/Java-Compiler-Crash

If any of those tips work, please report your solution on this thread so we can all benefit from seeing what's working most often.

This issue will stay open until we can figure out a way to write code in Enunciate that avoids the problem entirely. It might be awhile...

@stoicflame
Copy link
Owner

Okay, I've spent some more time looking at this. It was suggested that one cause of the crash might be caused by depending on artifacts of type "bundle" and not "jar". In an effort to test that theory, I've initialized a sample project here:

https://github.com/stoicflame/enunciate-example-cxf-osgi

Unfortunately, the error doesn't manifest itself yet. However, the project might be a good starting point for others who want to figure out a way to consistently reproduce the issue. Please send any pull requests that might be needed to get the problem to manifest itself consistently.

@anton-johansson
Copy link
Contributor Author

I put this on the shelf for some time. Now I got back into it and I tried using the latest version, 2.1.1, and the problems seems to be gone. I'm not sure what could have fixed it, but I'm not sure it's worth spending time on. :)

Close?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants