Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 197657 - Unable to build JavaSE project with jdk6u25
Unable to build JavaSE project with jdk6u25
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Project
7.0
PC Linux
: P1 (vote)
: 7.0.1
Assigned To: Tomas Zezula
issues@java
: JDK_SPECIFIC
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-12 11:41 UTC by asenk
Modified: 2011-06-09 18:14 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Second output (197.21 KB, image/png)
2011-04-12 11:41 UTC, asenk
Details
First outpup (113.12 KB, image/png)
2011-04-12 11:42 UTC, asenk
Details
build-impl.xml (53.98 KB, text/xml)
2011-04-12 11:43 UTC, asenk
Details
Hot fix (3.87 KB, patch)
2011-04-12 18:05 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2011-04-12 11:41:48 UTC
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
Comment 1 asenk 2011-04-12 11:42:58 UTC
Created attachment 107679 [details]
First outpup
Comment 2 asenk 2011-04-12 11:43:56 UTC
Created attachment 107680 [details]
build-impl.xml
Comment 3 Petr Cyhelsky 2011-04-12 12:07:05 UTC
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.
Comment 4 Tomas Zezula 2011-04-12 12:19:26 UTC
Caused by fix of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6999460
Comment 5 Jan Lahoda 2011-04-12 15:16:58 UTC
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.
Comment 6 Tomas Zezula 2011-04-12 16:29:36 UTC
Jesse may be also interested in.
Comment 7 Tomas Zezula 2011-04-12 18:05:50 UTC
Created attachment 107693 [details]
Hot fix
Comment 8 Tomas Zezula 2011-04-12 18:06:46 UTC
The hot fix diff attached. I will check its behavior on different JDKs tomorrow.
Comment 9 Jesse Glick 2011-04-12 19:39:18 UTC
(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.)
Comment 10 Tomas Zezula 2011-04-13 12:14:39 UTC
>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
Comment 11 Tomas Zezula 2011-04-13 12:25:18 UTC
The hot fix integrated into jet-main 5fbf680e006b
Comment 12 Quality Engineering 2011-04-14 08:36:16 UTC
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
Comment 13 Marian Mirilovic 2011-04-15 08:57:30 UTC
JDK fixed regression on their side, rollbacked fix from release70


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo