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.
Summary: | Unable to build JavaSE project with jdk6u25 | ||
---|---|---|---|
Product: | java | Reporter: | asenk |
Component: | Project | Assignee: | Tomas Zezula <tzezula> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | anebuzelsky, cyhelsky, jglick, mmirilovic, musilt2, pjiricka |
Priority: | P1 | Keywords: | JDK_SPECIFIC |
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Second output
First outpup build-impl.xml Hot fix |
Created attachment 107679 [details]
First outpup
Created attachment 107680 [details]
build-impl.xml
This will only happen, when the jdk 1.6_25 is the default jdk platform (the one IDE started with). => So the workaround is to add the same jdk as a new platform - then everything will work. Caused by fix of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6999460 Can be reproduced in a command line (i.e. without the IDE) use the "useJavaUtilZip=true" system property: ----------------- $ /tmp/jdk1.6.0_25/bin/javac -J-DuseJavaUtilZip=true Test.java error: error reading /tmp/jdk1.6.0_25/jre/lib/sunrsasign.jar; error in opening zip file 1 error ----------------- This system property is set by the IDE for "internal" executions to workaround a javac memory leak, see bug #143234. Jesse may be also interested in. Created attachment 107693 [details]
Hot fix
The hot fix diff attached. I will check its behavior on different JDKs tomorrow. (In reply to comment #7) > Created an attachment (id=107693) [details] > Hot fix The cleanUp method should report some exceptions at higher than VERBOSE, I think. ClassNotFoundException would be normal enough; not sure about NoSuchMethodException. The others ought to be logged at WARNING. Also did you need to call setAccessible(true)? Be sure to check behavior on JDK 7, which does not honor useJavaUtilZip since javac has a different cache manager. (Which I hope does not suffer from the same memory leak as useJavaUtilZip is supposed to work around.) >ClassNotFoundException would be normal enough; not sure about NoSuchMethodException These exceptions are specific to javac impl and I think that they should not be visible to users. On JDK 7.0 the class does not exist (as you pointed bellow and even the -DuseJavaUtilZip is not used). >The others ought to be logged at WARNING No problem >Also did you need to call setAccessible(true)? No, the method is public. But I can do it for sure (someone may change the access modifiers). >Be sure to check behavior on JDK 7 Has no effect on JDK 7 as described above The hot fix integrated into jet-main 5fbf680e006b Integrated into 'main-golden', will be available in build *201104140401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5fbf680e006b User: Tomas Zezula <tzezula@netbeans.org> Log: #197657:Unable to build JavaSE project with jdk6u25 JDK fixed regression on their side, rollbacked fix from release70 rollback from releases70: http://hg.netbeans.org/releases/rev/8fe4e5c4869e http://hg.netbeans.org/releases/rev/bb848a6e02ea |
Created attachment 107678 [details] Second output Product Version: NetBeans IDE 7.0 (Build 201104080000) Java: 1.6.0_25; Java HotSpot(TM) Client VM 20.0-b11 System: Linux version 2.6.32-30-generic running on i386; UTF-8; en_US (nb) 1.Start IDE with clean userdir 2. Create new JavaSE project 3. Clean and build it. Result: BUILD FAILED. Output: init: deps-clean: Created dir: /home/tester/NetBeansProjects/JavaApplication116/build Updating property file: /home/tester/NetBeansProjects/JavaApplication116/build/built-clean.properties Deleting directory /home/tester/NetBeansProjects/JavaApplication116/build clean: init: deps-jar: Created dir: /home/tester/NetBeansProjects/JavaApplication116/build Updating property file: /home/tester/NetBeansProjects/JavaApplication116/build/built-jar.properties Created dir: /home/tester/NetBeansProjects/JavaApplication116/build/classes Created dir: /home/tester/NetBeansProjects/JavaApplication116/build/empty Created dir: /home/tester/NetBeansProjects/JavaApplication116/build/generated-sources/ap-source-output Compiling 2 source files to /home/tester/NetBeansProjects/JavaApplication116/build/classes error: error reading /home/tester/NetBeansProjects/JavaApplication116/${endorsed.classpath}; error in opening zip file 1 error /home/tester/NetBeansProjects/JavaApplication116/nbproject/build-impl.xml:603: The following error occurred while executing this line: /home/tester/NetBeansProjects/JavaApplication116/nbproject/build-impl.xml:245: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 0 seconds) 4.Change jdk in project properties from jdk6u25 to jdk6u24. RESULT: It is possible to clean and build project 5. Change back jdk in project properties from jdk6u24 to jdk6u25. 6. Try clean and build project. RESULT: BUILD FAILED. Output: init: deps-clean: Updating property file: /home/tester/NetBeansProjects/JavaApplication116/build/built-clean.properties Deleting directory /home/tester/NetBeansProjects/JavaApplication116/build clean: init: deps-jar: Created dir: /home/tester/NetBeansProjects/JavaApplication116/build Updating property file: /home/tester/NetBeansProjects/JavaApplication116/build/built-jar.properties Created dir: /home/tester/NetBeansProjects/JavaApplication116/build/classes Created dir: /home/tester/NetBeansProjects/JavaApplication116/build/empty Created dir: /home/tester/NetBeansProjects/JavaApplication116/build/generated-sources/ap-source-output Compiling 2 source files to /home/tester/NetBeansProjects/JavaApplication116/build/classes error: error reading /usr/local/jdk1.6.0_25/jre/lib/sunrsasign.jar; error in opening zip file 1 error /home/tester/NetBeansProjects/JavaApplication116/nbproject/build-impl.xml:603: The following error occurred while executing this line: /home/tester/NetBeansProjects/JavaApplication116/nbproject/build-impl.xml:245: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 0 seconds) Screenshots and build-impl.xml in attachment