aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes  Failure executing javac, but could not parse the error issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark " Failure executing javac, but could not parse the error issues" Watch " Failure executing javac, but could not parse the error issues" New topic
Author

Failure executing javac, but could not parse the error issues

Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Hello Guys
i have been stuck with this issue since a while and need some expert help ihave different jdk version on my computer, installed the jdk under
c:\work\jdk6 but still getting this error. i ma using maven compiler plugin 2.1 and the thing is that all other projects are compling except for this one see stack trace below

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>



Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.1:compile (default-compile) on project listing: Compilation failu
Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.6.0_27). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bug
java.lang.IllegalArgumentException
at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
at com.sun.tools.javac.util.DefaultFileManager$ByteBufferCache.get(DefaultFileManager.java:730)
at com.sun.tools.javac.util.DefaultFileManager.makeByteBuffer(DefaultFileManager.java:706)
at com.sun.tools.javac.util.DefaultFileManager.access$200(DefaultFileManager.java:77)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1368)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1270)
at com.sun.tools.javac.main.JavaCompiler.readSource(JavaCompiler.java:483)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:804)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:279)
at com.sun.tools.javac.main.Main.compile(Main.java:270)
at com.sun.tools.javac.Main.compile(Main.java:87)
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.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:484)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:155)

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5778
    
    7

The javac compiler is choking on one of your Java source files. Try running mvn with the -X option and see if that gives a better clue as to the source file causing the issue. You might also have to run javac by hand to track down the errant source file.


JBoss In Action
Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Still the same issue it says exception occured could not parse the error. Also says to file a bug

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project listing: Compilation failure
Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.6.0_27). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you
java.lang.IllegalArgumentException
at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
at com.sun.tools.javac.util.DefaultFileManager$ByteBufferCache.get(DefaultFileManager.java:730)
at com.sun.tools.javac.util.DefaultFileManager.makeByteBuffer(DefaultFileManager.java:706)
at com.sun.tools.javac.util.DefaultFileManager.access$200(DefaultFileManager.java:77)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1368)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1270)
at com.sun.tools.javac.main.JavaCompiler.readSource(JavaCompiler.java:483)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:804)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:279)
Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 119
Found out the issue
Strangely once of the java file was of size 232 MB
i just dont understand how it becaem so huge, fortunately i had backup of that class file and replace it and it worked

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Failure executing javac, but could not parse the error issues
 
Similar Threads
Incorrect hibernate version or maven ignore and didn't download hibernate jar file.
Richfaces + Spring + Maven Setup help
Continuous integration - Bamboo, Maven
maven cannot access javax.annotation.PostConstruct
maven build error which is strange