This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 196712 - IllegalStateException: endPosTable already set
Summary: IllegalStateException: endPosTable already set
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 197410 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-15 08:30 UTC by farouka
Modified: 2011-04-05 08:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 177581


Attachments
stacktrace (3.41 KB, text/plain)
2011-03-15 08:30 UTC, farouka
Details
Attached is my IDE log if that is useful (161.86 KB, application/octet-stream)
2011-03-17 08:33 UTC, farouka
Details
Logfile 2 (286.88 KB, application/octet-stream)
2011-03-17 08:35 UTC, farouka
Details
Another log file (378.70 KB, application/octet-stream)
2011-03-17 08:35 UTC, farouka
Details
This is the parent pom (876 bytes, text/xml)
2011-03-21 17:01 UTC, farouka
Details
The web application pom (5.39 KB, text/xml)
2011-03-21 17:03 UTC, farouka
Details
The EJB module pom (7.56 KB, text/xml)
2011-03-21 17:04 UTC, farouka
Details
the EAR pom (1.98 KB, text/xml)
2011-03-21 17:05 UTC, farouka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description farouka 2011-03-15 08:30:21 UTC
This bug was originally marked as duplicate of bug 196104, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201103140400)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Windows XP

User Comments:
GUEST: Opened a new project. Exception happened repeatedly.

farouka: Opening the IDE first time

GUEST: scanning newly opened project




Stacktrace: 
java.lang.IllegalStateException: endPosTable already set
   at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable(DiagnosticSource.java:137)
   at com.sun.tools.javac.util.Log.setEndPosTable(Log.java:255)
   at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:668)
   at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:936)
   at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1153)
   at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1167)
Comment 1 farouka 2011-03-15 08:30:25 UTC
Created attachment 107008 [details]
stacktrace
Comment 2 Dusan Balek 2011-03-16 14:02:02 UTC
Do you have a reproducible test case? Could you please attach your pom.xml file? Thanks.
Comment 3 farouka 2011-03-17 08:32:12 UTC
I am working on a Java EE 6 Stack application with EJBs and JSF 2.0.

I dont remember exactly what I was working on but this error does happen very often
Comment 4 farouka 2011-03-17 08:33:53 UTC
Created attachment 107068 [details]
Attached is my IDE log if that is useful
Comment 5 farouka 2011-03-17 08:35:00 UTC
Created attachment 107069 [details]
Logfile 2
Comment 6 farouka 2011-03-17 08:35:42 UTC
Created attachment 107070 [details]
Another log file

Hope you find them useful
Comment 7 Dusan Balek 2011-03-17 09:22:30 UTC
Unfortunately, the log files are not so useful because they are already accessible as a part of the Exception reports. I would appreciate if you could attach the pom.xml file of your application. Thanks.
Comment 8 farouka 2011-03-21 17:01:46 UTC
Created attachment 107160 [details]
This is the parent pom

The top level pom
Comment 9 farouka 2011-03-21 17:03:10 UTC
Created attachment 107161 [details]
The web application pom

JSF 2.0 web application pom
Comment 10 farouka 2011-03-21 17:04:12 UTC
Created attachment 107162 [details]
The EJB module pom

The EJB module pom for ejb 3.1 module
Comment 11 farouka 2011-03-21 17:05:13 UTC
Created attachment 107163 [details]
the EAR pom
Comment 12 Dusan Balek 2011-03-22 14:17:29 UTC
Reproduced - thanks for the POM.xml files.
Comment 13 Dusan Balek 2011-03-22 15:43:34 UTC
The problem seems to be in MavenAnnotationProcessingQueryImpl.getAnnotationProcessingOptions that allows for annotation processing while indexing given project even though                   <compilerArgument>-proc:none</compilerArgument> is explicitly declared in the corresponding pom.xml file.
Comment 14 Jesse Glick 2011-03-22 16:02:39 UTC
Bug #187648 covers Maven project configuration. But the Java parser should not be throwing low-level errors like this regardless of how the project is set up.

For this particular exception, bug #194664 is another example which was perhaps improperly marked as a duplicate of bug #196104; bug #196391 would offer a workaround but the parser should be made more robust to begin with, perhaps using tzezula's AptOutputFileManager.java.
Comment 15 Tomas Zezula 2011-03-22 16:47:41 UTC
We will try with Dusan to remove the apt generated sources from source path if possible.
Comment 16 Dusan Balek 2011-03-29 12:23:40 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/8b96c4651370

changeset 3ca96d2291e3 in main/nb-javac
details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=3ca96d2291e3
Comment 17 Quality Engineering 2011-03-30 08:42:57 UTC
Integrated into 'main-golden', will be available in build *201103300400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8b96c4651370
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #196712: IllegalStateException: endPosTable already set - fixed.
Comment 18 Dusan Balek 2011-04-05 08:15:15 UTC
*** Bug 197410 has been marked as a duplicate of this bug. ***