Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Failure executing javac, but could not parse the error issues

 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic