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.
Created dir: C:\Users\garbello\Documents\NetBeansProjects\ForSale_11\build\generated\src Exception in thread "main" java.lang.IllegalArgumentException: PWC6309: Illegal compilerSourceVM: 1.7 at org.apache.jasper.JspC.setCompilerSourceVM(JspC.java:708) at org.netbeans.modules.web.project.ant.JspC.main(JspC.java:80) C:\Users\garbello\Documents\NetBeansProjects\ForSale_11\nbproject\build-impl.xml:585: Java returned: 1 BUILD FAILED (total time: 1 second) Product Version: NetBeans IDE 7.0.1 (Build 201107282000) Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Userdir: C:\Users\garbello\.netbeans\7.0 can attach a project if required . easy to reproduce, create initial java Web application; choose ee6, java7, source version java 7, JSF2; modify project properties to turn off compile on save, and turn on compile JSP pages try to clean, build the default project described above; will get the error posted here.
Similar to bug 135568.
*** Bug 202250 has been marked as a duplicate of this bug. ***
Reproduced (Windows XP). This is quite serious, changing priority to P2.
The root cause of this problem is in GlassFish, I filed the following bug against GF: http://java.net/jira/browse/GLASSFISH-17429. Waiting for evaluation from the GlassFish team, though this bug may need to be waived for NetBeans 7.1. I haven't tried, but I think the workaround for the case when JDK 7 constructs are not used in JSP files could be to duplicate the JSP compilation target from build-impl.xml to build.xml, tweak it so it uses source level 1.6, and run this target instead of the "Compile JSPs" checkbox. It would be great if someone could try this out.
@Petr: I'm not familiar with the Netbeans build xml files, and I couldn't simply copy the compile-jsps target from nbproject/build-impl.xml to nb-build.xml and change the target and source level, I got an error trying to run the build: /path/to/project/nb-build.xml:103: The prefix "webproject2" for element "webproject2:javac" is not bound. This is something to do with the "<webproject2:javac ..." line in the compile-jsps target. However, simply hacking the build-impl.xml file to force 1.6 works fine: <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps"> [cut] <arg value="-compilerSourceVM 1.6"/> <!--${javac.source}"/--> <arg value="-compilerTargetVM 1.6"/> <!--${javac.target}"/--> [cut] </target> "Clean & Build" on my web project now completes successfully. Hope this helps.
Requesting a waiver for NetBeans 7.1. The root cause of this problem is in 3rd party code - GlassFish, so we will need the fix on the GlassFish side to address this. The workaround is described above.
This bug is still in NetBeans 7.1 and affects one of my projects but not all. 3 very similar sevlets have complied OK with 7.1 and jdk7.
*** Bug 208120 has been marked as a duplicate of this bug. ***
Ok, so I updated the jspparser to one from the latest GF 3.1.2b23 which brought few changes due to refreshing cached parsed items and omitted scope of bean which was never used. Anyway it looks that it's working well and tests are passing. Anybody from reporters please feel free to try it out in lastest dev builds (once it will be available there - wait for automatically generated message here). Fixed in web-main #646171d74911.
Integrated into 'main-golden', will be available in build *201204200400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/646171d74911 User: Martin Fousek <marfous@netbeans.org> Log: #201414 - nb701/java 7 -- cannot compile jsp pages
Updated remaining JARs in web-main #21a63a72b543.
Integrated into 'main-golden', will be available in build *201204240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/21a63a72b543 User: Martin Fousek <marfous@netbeans.org> Log: #201414 - nb701/java 7 -- cannot compile jsp pages: updated remaining JARs
This error also occurs in Tomcat 7 with JDK 1.7, not limited to Glassfish. We have recreated the error on both Windows and Linux platforms using NB 7.1.2
(In reply to comment #13) > This error also occurs in Tomcat 7 with JDK 1.7, not limited to Glassfish. We > have recreated the error on both Windows and Linux platforms using NB 7.1.2 Actually it doesn't depent on the application server used to run your projects but on the glassfish binaries which are bundled with the IDE. It wasn't included in 7.1 patches since the change was quite big and would be risky. You can check that it's fixed in the daily builds or in the NetBeans IDE 7.2 Beta: http://dlc.sun.com.edgesuite.net/netbeans/7.2/beta/