Bug 36777 - refreshing a library results in jzentry==0 failure message
Summary: refreshing a library results in jzentry==0 failure message
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-22 18:46 EDT by Kevin Klinemeier CLA
Modified: 2003-06-11 16:57 EDT (History)
0 users

See Also:


Attachments
Stack trace from ant task failure (8.07 KB, text/plain)
2003-04-22 18:47 EDT, Kevin Klinemeier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Klinemeier CLA 2003-04-22 18:46:41 EDT
I re-created a jar file (using an ant script).  Then I copied that jar over the
one I wanted to replace.  Then I refreshed the jar file from the resource view.
 At that point, I get a dialog box titled "Refresh Problems" with the message

jzentry == 0

Attempting to refresh again results in the same message.  Restarting Eclipse
fixes the problem.

Additionally, trying to regenerate the jar (running the ant script again)
*after* refreshing also results in the same message with the attached stack trace.

Multiple regenerations *without* refreshing does not result in an error.

Note:  The jar generated by the ant script is not attempting to overwrite the
file that is refreshed, nor is it overwriting a jar on any buildpath.

Also, I did not experience this problem with RC2.
Comment 1 Kevin Klinemeier CLA 2003-04-22 18:47:34 EDT
Created attachment 4674 [details]
Stack trace from ant task failure

This is the output from the ant task, when run after the refresh attempt.
Comment 2 Philipe Mulet CLA 2003-04-23 10:06:28 EDT
Are you sure you JAR isn't corrupted ?
Comment 3 Kevin Klinemeier CLA 2003-04-23 16:09:58 EDT
I'm pretty sure its not corrupt, I can open it with WinZip and restarting
Eclipse allows me to build just fine.

And, this whole thing is completely reproduceable, I can make it happen at will.
 I haven't yet tried it with jars I'm not making myself, being short on
alternate versions for the ones in my current project.
Comment 4 Philipe Mulet CLA 2003-04-24 02:29:00 EDT
Can you also reproduce it using another JRE to run Eclipse on ? I remember some 
JRE bug in the same area.
Comment 5 Olivier Thomann CLA 2003-04-28 09:27:08 EDT
Could you please give exact steps to reproduce from an empty workspace? Thanks.
Comment 6 Olivier Thomann CLA 2003-05-08 14:37:51 EDT
Could you please try it with logging access to zip file in the java model?
Open the .options file of the org.eclipse.jdt.core plugin and change the last
line to:
# Reports access to zip and jar files through the Java model
org.eclipse.jdt.core/debug/zipaccess=true

Then restart Eclipse with -debug -consolelog on the command line before the
-vmargs option if you have one.
Then send us the .log file contents.

Thanks.
Comment 7 Olivier Thomann CLA 2003-06-11 14:17:25 EDT
Please provide the requested information.
Comment 8 Kevin Klinemeier CLA 2003-06-11 16:14:45 EDT
Request:
Can you also reproduce it using another JRE to run Eclipse on ? I remember some 
JRE bug in the same area.

How do I change the jre Eclipse runs on?

Request:
Could you please give exact steps to reproduce from an empty workspace? Thanks.

The primary thing you'll need is an ant script that generates jarfiles.  I only
have the one, I've attached it.  It uses Castor to make some source files, then
uses the compiled version of those files to create the jar in question.

Set up your project to include the jar in its required libraries.

Use your ant script to re-generate the jar in some temporary folder.

Copy the jar over the one eclipse expects.

Instruct Eclipse to refresh the now-replaced jar.

Receive the message.

Request:
Open the .options file of the org.eclipse.jdt.core plugin and change the last
line to:

Er, which?  Where is this file located?  I'm not familiar with the file structure.
Comment 9 Olivier Thomann CLA 2003-06-11 16:31:03 EDT
Go to your eclipse installation dir and go to the folder 
plugins/org.eclipse.jdt.core.
In this folder you will find a .option file that you need to modify as 
specified in comment 6. Don't forget to start eclipse in debug mode and open a 
console to be sure you get the error message.
Thanks. Once we understand why you get this error, we might be able to fix it.
Comment 10 Kevin Klinemeier CLA 2003-06-11 16:51:48 EDT
I've picked up a new version since logging this bug, and now I can't duplicate
it.    Whether I fixed some configuration quirkiness, or some other fix fixed
this, I don't know.  
Comment 11 Olivier Thomann CLA 2003-06-11 16:57:34 EDT
Don't hesitate to reopen it if you see it again. Thanks for your feedback.
Comment 12 Olivier Thomann CLA 2003-06-11 16:57:52 EDT
Changed milestone