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 21326 - Jar file content file currupted after switching projects
Summary: Jar file content file currupted after switching projects
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: jarpackager (show other bugs)
Version: 3.x
Hardware: PC Other
: P1 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords: RELNOTE
: 19810 24309 27768 30048 30134 35504 36344 36569 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-03-07 21:55 UTC by bht
Modified: 2004-02-21 02:16 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log file tat contains a transition between project B and project A (25.93 KB, text/plain)
2002-03-31 07:33 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2002-03-07 21:55:42 UTC
Build 200202110100

The jar file was finished and working well.
Then later I deleted a single class from the file system (not from the jar file).
That single class was included in the jar contents file and the jar file before.
The error occurred when I wanted to delete the class from the contents file also
and to recompile the jar file.
I do not have a testcase yet but I think it is quite obvious what happened.
I got a message dialog similar to "Error reading jar content file"
Here is the extract from my log file:

>Log Session: Friday, 8 March 2002 10:12:21 AM NZDT
>System Info: 
  Product Version       = NetBeans IDE Development Version (Build 200202110100)
  IDE Versioning        = IDE/1 spec=2.3 impl=200202110100
  Operating System      = Windows 95 version 4.0 running on x86
  Java; VM; Vendor      = 1.4.0; Java HotSpot(TM) Client VM 1.4.0-b92; Sun
Microsystems Inc.
  Java Home             = C:\PROG\JDK14\JRE
  System Locale; Encod. = en_NZ; Cp1252
  Home Dir; Current Dir = C:\WINDOWS; C:\WINDOWS\DESKTOP
  IDE Install; User Dir = C:\PROG\NETBEANS; c:\bt\netbeans
  CLASSPATH             =
C:\PROG\NETBEANS\lib\patches\openide-compat.jar;C:\PROG\NETBEANS\lib\core.jar;C:\PROG\NETBEANS\lib\openide.jar;C:\PROG\NETBEANS\lib\ext\regexp.jar;C:\PROG\NETBEANS\lib\ext\crimson.jar;C:\PROG\NETBEANS\lib\ext\terminalemulator.jar;C:\PROG\NETBEANS\lib\ext\xerces.jar;C:\PROG\NETBEANS\lib\ext\rmi-ext.jar;C:\prog\jdk14\lib\dt.jar;C:\prog\jdk14\lib\tools.jar
  Boot & ext classpath  =
C:\PROG\JDK14\JRE\lib\rt.jar;C:\PROG\JDK14\JRE\lib\i18n.jar;C:\PROG\JDK14\JRE\lib\sunrsasign.jar;C:\PROG\JDK14\JRE\lib\jsse.jar;C:\PROG\JDK14\JRE\lib\jce.jar;C:\PROG\JDK14\JRE\lib\charsets.jar;C:\PROG\JDK14\JRE\classes;C:\PROG\JDK14\JRE\lib\ext\dnsns.jar;C:\PROG\JDK14\JRE\lib\ext\ldapsec.jar;C:\PROG\JDK14\JRE\lib\ext\localedata.jar;C:\PROG\JDK14\JRE\lib\ext\sunjce_provider.jar
-------------------------------------------------------------------------------
Warning: the extension C:\PROG\NETBEANS\modules\ext\webserver.jar may be
multiply loaded by modules: [C:\PROG\NETBEANS\modules\httpserver.jar,
C:\PROG\NETBEANS\modules\jsp-tomcat.jar]
Existing modules:
    Ant [org.apache.tools.ant.module/2 2.8 200202110100]
    Auto Update [org.netbeans.modules.autoupdate/1 2.2 200202110100]
    Bean Patterns [org.netbeans.modules.beans/1 1.8 200202110100]
    CSS Support [org.netbeans.modules.css/1 0.6 200202110100]
    Editor [org.netbeans.modules.editor/1 1.9 200202110100]
    Form Editor [org.netbeans.modules.form/2 1.8 200202110100]
    General Online Help [org.netbeans.modules.usersguide/1 1.10 200202110100]
    HTML [org.netbeans.modules.html/1 1.9 200202110100]
    IDE Core [org.netbeans.core/1 1.3]
    Image [org.netbeans.modules.image/1 1.8 200202110100]
    Internationalization [org.netbeans.modules.i18n/1 1.10 200202110100]
    JAR Packager [org.netbeans.modules.jarpackager/2 1.10 200202110100]
    JPDA Debugger [org.netbeans.modules.debugger.jpda/1 1.10 200202110100]
    JSP Parser [org.netbeans.modules.web.jspparser/1 1.1 200202110100]
    JSP/Servlet [org.netbeans.modules.web.core/1 1.7 200202110100]
    Java Source Files [org.netbeans.modules.java/1 1.8 200202110100]
    Javadoc [org.netbeans.modules.javadoc/1 1.8 200202110100]
    Projects [org.netbeans.modules.projects/1 1.8 200202110100]
    Resource Bundles [org.netbeans.modules.properties/1 1.8 200202110100]
    Scripting Support [org.netbeans.modules.scripting/1 1.5 200202110100]
    Sourceless Java Classes [org.netbeans.modules.clazz/1 1.9 200202110100]
    Text [org.netbeans.modules.text/1 1.8 200202110100]
    User Utilities [org.netbeans.modules.utilities/1 1.8 200202110100]
    XML Backward Compatibility [org.netbeans.modules.xml/2 0.6 200202110100]
    XML Coloring Backward Compatibility
[org.netbeans.modules.xml.editor.coloring/2 0.6 200202110100]
    XML Core [org.netbeans.modules.xml.core/1 0.6 200202110100]
    XML Entity Catalog [org.netbeans.modules.xml.catalog/1 0.6 200202110100]
    XML Productivity Tools [org.netbeans.modules.xml.tools/1 0.6 200202110100]
    XML Text Editor [org.netbeans.modules.xml.text/1 0.6 200202110100]
    XML Tree Editor [org.netbeans.modules.xml.tree/1 0.6 200202110100]
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/buildAll.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/build.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/actions/nextOutJump.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/execute.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/find.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/frames/globalProperties.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/debugger/resources/start.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/debugger/resources/stepInto.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/debugger/resources/stepOver.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/toggleBreakpoint.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/addBreakpoint.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/addWatch.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/cut.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/copy.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/paste.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/delete.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/undo.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/redo.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/actions/new.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/openfile/openFile.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/save.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/saveAll.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/actions/print.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/form/resources/inspector.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/frames/execution.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/empty.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/project.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/setting-defined.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/setting-ignored.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/setting-inherited.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/session.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/repository.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/projects/resources/projectDesktop.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/environment.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/localFS.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/jarFS.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/defaultFolder.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/defaultFolderOpen.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/javadoc/resources/searchDoc.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/processes.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/debugger.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/noProcesses.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/openide/resources/src/class.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/core/resources/process.gif
*********** Exception occurred ************
Fri Mar 08 10:33:38 NZDT 2002: org.openide.loaders.DataObjectNotFoundException:
DefaultEngine.java
Annotation: There was an error reading the JAR Recipe servlet.
Nested annotation: DefaultEngine.java
org.openide.loaders.DataObjectNotFoundException: DefaultEngine.java
    at org.openide.loaders.DataObject.find(DataObject.java:455)
    at org.openide.loaders.DataObject$Replace.readObject(DataObject.java:899)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1830)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1756)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at java.util.ArrayList.readObject(ArrayList.java:548)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at
org.netbeans.modules.jarpackager.JarContent$Version1Serializator.readData(JarContent.java:793)
    at
org.netbeans.modules.jarpackager.util.VersionSerializator.readVersion(VersionSerializator.java:116)
    at org.netbeans.modules.jarpackager.JarContent.readContent(JarContent.java:355)
[catch] at
org.netbeans.modules.jarpackager.JarContent.readFromFile(JarContent.java:589)
    at
org.netbeans.modules.jarpackager.JarDataObject.getJarContent(JarDataObject.java:378)
    at
org.netbeans.modules.jarpackager.JarDataObject.findArchiveJarFile(JarDataObject.java:477)
    at org.netbeans.modules.jarpackager.JarDataObject.<init>(JarDataObject.java:118)
    at
org.netbeans.modules.jarpackager.JarDataLoader.createMultiObject(JarDataLoader.java:120)
    at
org.openide.loaders.MultiFileLoader.handleFindDataObject(MultiFileLoader.java:73)
    at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:221)
    at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:363)
    at org.openide.loaders.FolderList.createBoth(FolderList.java:588)
    at org.openide.loaders.FolderList.getObjects(FolderList.java:407)
    at org.openide.loaders.FolderList.access$200(FolderList.java:43)
    at org.openide.loaders.FolderList$ListTask.run(FolderList.java:755)
    at org.openide.util.Task.run(Task.java:152)
    at
org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)

Fri Mar 08 10:33:38 NZDT 2002:
org.openide.filesystems.FileStateInvalidException: DefaultEngine.java
Nested annotation: DefaultEngine.java
org.openide.loaders.DataObjectNotFoundException: DefaultEngine.java
    at org.openide.loaders.DataObject.find(DataObject.java:455)
    at org.openide.loaders.DataObject$Replace.readObject(DataObject.java:899)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1830)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1756)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at java.util.ArrayList.readObject(ArrayList.java:548)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at
org.netbeans.modules.jarpackager.JarContent$Version1Serializator.readData(JarContent.java:793)
    at
org.netbeans.modules.jarpackager.util.VersionSerializator.readVersion(VersionSerializator.java:116)
    at org.netbeans.modules.jarpackager.JarContent.readContent(JarContent.java:355)
[catch] at
org.netbeans.modules.jarpackager.JarContent.readFromFile(JarContent.java:589)
    at
org.netbeans.modules.jarpackager.JarDataObject.getJarContent(JarDataObject.java:378)
    at
org.netbeans.modules.jarpackager.JarDataObject.findArchiveJarFile(JarDataObject.java:477)
    at org.netbeans.modules.jarpackager.JarDataObject.<init>(JarDataObject.java:118)
    at
org.netbeans.modules.jarpackager.JarDataLoader.createMultiObject(JarDataLoader.java:120)
    at
org.openide.loaders.MultiFileLoader.handleFindDataObject(MultiFileLoader.java:73)
    at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:221)
    at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:363)
    at org.openide.loaders.FolderList.createBoth(FolderList.java:588)
    at org.openide.loaders.FolderList.getObjects(FolderList.java:407)
    at org.openide.loaders.FolderList.access$200(FolderList.java:43)
    at org.openide.loaders.FolderList$ListTask.run(FolderList.java:755)
    at org.openide.util.Task.run(Task.java:152)
    at
org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)

Fri Mar 08 10:33:38 NZDT 2002:
org.openide.filesystems.FileStateInvalidException: DefaultEngine.java
org.openide.filesystems.FileStateInvalidException: DefaultEngine.java
    at org.openide.loaders.DataObject.find(DataObject.java:438)
    at org.openide.loaders.DataObject$Replace.readObject(DataObject.java:899)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1830)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1756)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at java.util.ArrayList.readObject(ArrayList.java:548)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at
org.netbeans.modules.jarpackager.JarContent$Version1Serializator.readData(JarContent.java:793)
    at
org.netbeans.modules.jarpackager.util.VersionSerializator.readVersion(VersionSerializator.java:116)
    at org.netbeans.modules.jarpackager.JarContent.readContent(JarContent.java:355)
[catch] at
org.netbeans.modules.jarpackager.JarContent.readFromFile(JarContent.java:589)
    at
org.netbeans.modules.jarpackager.JarDataObject.getJarContent(JarDataObject.java:378)
    at
org.netbeans.modules.jarpackager.JarDataObject.findArchiveJarFile(JarDataObject.java:477)
    at org.netbeans.modules.jarpackager.JarDataObject.<init>(JarDataObject.java:118)
    at
org.netbeans.modules.jarpackager.JarDataLoader.createMultiObject(JarDataLoader.java:120)
    at
org.openide.loaders.MultiFileLoader.handleFindDataObject(MultiFileLoader.java:73)
    at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:221)
    at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:363)
    at org.openide.loaders.FolderList.createBoth(FolderList.java:588)
    at org.openide.loaders.FolderList.getObjects(FolderList.java:407)
    at org.openide.loaders.FolderList.access$200(FolderList.java:43)
    at org.openide.loaders.FolderList$ListTask.run(FolderList.java:755)
    at org.openide.util.Task.run(Task.java:152)
    at
org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/clazz/resources/class.gif
Initial slashes in Utilities.loadImage deprecated (cf. #20072):
/org/netbeans/modules/clazz/resources/bean.gif
Comment 1 Richard Malaschitz 2002-03-08 13:15:37 UTC
I am not able reproduce this behaviour (Build 200203080100).
Comment 2 bht 2002-03-08 19:39:46 UTC
I cannot reproduce this myself either.
I restored the deleted class from a backup and repeated all the steps
I remember. I got a double white cross on red icon indicating the jar
file is not valid.

When it crashed I did not get this far. The contents file was empty
and I have definitely seen this icon the first time in my life only
when I tried to reproduce this.

The only perhaps useful information is that the class that I tried to
delete from the jar file was an incomplete extension of an abstract
class that did not compile (good reason to delete it) outside the
projects's directories. But whether that matters I don't know. The
restored class is still incomplete.

Anyway I have re-built the jar file and the data is ok again.
I just recorded this bug because I try to record every exception I
find. You may close this and If I get this error again then I can
still find this record.
Thanks.
Comment 3 brinkley 2002-03-21 23:27:02 UTC
At the suggestion of the orgininal author this bug is closed
Comment 4 bht 2002-03-31 07:30:32 UTC
I get this very often now with the Q-build 200203220100 and JDk1.4.
It only happens when I switch between projects.
Additionally, when I switch from project A with the jar file to
project B without jar file, then the major project file system link
gets broken and the main class in project B is also lost.
I just switched back from Project B to project A and the jar contents
are empty after the new ttached log file extract.
I should add that I sometimes edit and compile files with an external
editor referenced/used by the jar file.
In this case it was a day before when I worked on them while NetBeans
was not running.
However, even without external editing I am sure that something is
badly wrong with the jar packager and I am very scared to use it after
so many errors and data losses.

I hope you will find the information useful and wish you all the best
in fixing this. Otherwise I think the jar packager is a very useful
thing. I need it!
Many thanks!
Comment 5 bht 2002-03-31 07:33:55 UTC
Created attachment 5246 [details]
log file tat contains a transition between project B and project A
Comment 6 David Kaspar 2002-04-02 16:48:49 UTC
I could fully reproduce it following these steps:
1) Create JAR Recipe
2) Mount some additional file system
3) Add one of files from additional file system into JAR Recipe
4) Create new project and switch to it
5) ERROR - Error message is shown. Message: "There was an error
reading the JAR Recipe <NAME>"
6) Mount file system that contains JAR Recipe
7) Expand directory node that contains JAR Recipe
8) See ide.log in userdir - It looks like similar to one in the attachment
Comment 7 Milos Kleint 2002-04-03 09:18:48 UTC
*** Issue 19810 has been marked as a duplicate of this issue. ***
Comment 8 Milos Kleint 2002-04-04 13:46:12 UTC
I've evaluated the behaviour and I think it's not fixable in the
current design constraints:

The recipe is serialized - among other things it serializes the list
of DataObjects and their fileObjects that are contained in the jar..
When switching projects, the enviroment changes (eg. the mounted
filesystems as well) and the deserialization of the JarDataObject
(recipe contained) fails because the DataObjectNotFound exception.
Then the deserialization cannot proceed. and the information in the
recipe is lost.

I think we could manually deserialize the recipe step-by-step  however
once the error appears the recipe won't be consistent anymore anyway.
Comment 9 Milos Kleint 2002-04-24 12:47:10 UTC
marking the bug as FFJ40_WAV since I don't know how to fix the bug,
with the current design. (the serialization of jar recipe which
includes dataobjects and fileobjects that are project related and thus
fail to deserialize when the filesystem set changes with the project
change.)
Comment 10 Milos Kleint 2002-06-03 16:14:39 UTC
*** Issue 24309 has been marked as a duplicate of this issue. ***
Comment 11 Milos Kleint 2002-07-15 13:58:27 UTC
changing target to 4.0
Comment 12 Jaroslav Tulach 2002-07-26 07:58:04 UTC
This bug is reported in version <= 3.4dev and still not fixed. Due to that it
forbids the release candidate for 3.4 to be promoted. Are you aware of that and
are you intensively working on the fix? If not, you should consider some
corrective action.
Comment 13 Patrick Keegan 2002-07-29 21:41:32 UTC
Milos, is this an accurate description for the readme.html file?:

"The JAR recipe file can get corrupted if you switch projects or move 
files or filesystems that the JAR recipe file refers to."
Comment 14 Miloslav Metelka 2002-08-06 17:16:37 UTC
Marking this bug as 3.4 waiver because it can't be fixed with the
current design. The new projects and redesign of the jar packager will
help to get rid of this issue.
Comment 15 Ondrej Rypacek 2002-10-11 17:18:55 UTC
*** Issue 27768 has been marked as a duplicate of this issue. ***
Comment 16 _ mihmax 2002-11-05 18:29:57 UTC
Well, I'm very angry ;-)), but it's surely not for the 3.4.1, though
it's rather annoying.

Good luck in fixing this in Yogjakarta

Sincere,
Maxym Mykhalchuk
Comment 17 Ondrej Rypacek 2003-01-21 16:41:02 UTC
*** Issue 30048 has been marked as a duplicate of this issue. ***
Comment 18 Ondrej Rypacek 2003-01-27 12:39:40 UTC
*** Issue 30134 has been marked as a duplicate of this issue. ***
Comment 19 Ondrej Rypacek 2003-02-18 10:28:21 UTC
This is a long standing architectural issue. JarContent is represented
by a list of DataObjects and persisted by Java serialization.
JarPackager listenes on all changes to the dataobjects and reacts
appropriatelly, but if something changes to the configuration of
filesystems while the recipe is not loaded to memory, the dataobjects
cannot be recovered and JarContent goes out of sync. Even if the
dataobjects later appear/filesystems are remounted , the broken
reference cannot be recovered.
To fix this, something else than DataObjects would have to be used as
entries in JarContent but the current architecture is too tightly
coupled with DataObjects so it is not possible to change without
rewriting the whole module. This is in progress for Netbeans 4.0.
Comment 20 Ondrej Rypacek 2003-10-14 13:50:53 UTC
*** Issue 36569 has been marked as a duplicate of this issue. ***
Comment 21 Ondrej Rypacek 2003-11-28 09:24:03 UTC
*** Issue 36344 has been marked as a duplicate of this issue. ***
Comment 22 Ondrej Rypacek 2003-11-28 09:27:10 UTC
*** Issue 35504 has been marked as a duplicate of this issue. ***
Comment 23 Maros Sandor 2004-01-26 14:42:19 UTC
This fix tries to cure symptoms caused by DataObject serialization. 
Note that this is not an architectural change that would be needed in 
this case, rather a fix for this misbehavior.

/cvs/jarpackager/src/org/netbeans/modules/jarpackager/ContentMember.ja
va,v  <--  ContentMember.java
new revision: 1.29; previous revision: 1.28
/cvs/jarpackager/src/org/netbeans/modules/jarpackager/JarContentChildr
en.java,v  <--  JarContentChildren.java
new revision: 1.24; previous revision: 1.23
Comment 24 Patrick Keegan 2004-01-27 17:35:52 UTC
Suggested update to relnote text for NB 3.6

"The JAR recipe file can get corrupted if you open a project from a
previous version of the IDE when some of the files or directories that
the JAR recipe refers to have not been mounted."

Maros, please review.
Comment 25 Maros Sandor 2004-01-28 08:48:32 UTC
Technically, the JAR recipe will get corrupted if any of the files or 
directories that it refers to are missing (not mounted) in the time 
the recipe loads into IDE. But your note is good and says roughly the 
same thing.
Comment 26 eadams 2004-02-21 00:14:00 UTC
I'm using a Sun Java Studio, Mobile Edition internal release which
is built on NB 3.5.1.  An MIDP application is packaged into a Jar
file for deployment to a device, so Jar Packaging is an integral
part of the build process.

I've setup my application to have sources in one directory and
put the classes in a separate directory, therefore, I have two
mount point.  And I've changed the Internal Compiler to set the
Target Dir to the classes directory.

My package has one component in it, the explorer looks like 

    src                  // Mount Pt
      pkg                // Package
        *.java           // Sources
      Resources          // Where Images live
        *.png            // Images
    classes              // Mount Pt
      pkg                // Package
        *.classes        // Classes

My Jar Contents includes some selected items from the
Images and classes/pkg.

If, in the Explorer, I select src/pkg and do a Build All
it causes the classes/pkg item to be silently removed from
my Jar Contents.  If I then do a Update Jar, I get 

     Missing MIDlet <name> in JarContent

error.  If I examine the Jar Contents, classes/pkg is missing.

I see that this bug is fixed in 3.6.  That's great.
Most of the bugs already reported in this issue involve
changing projects.  My problem occurs during the development
within a given project.  Do you feel the 3.6 fix will also
fix the problem I've described?


Comment 27 bht 2004-02-21 01:13:20 UTC
Evan,
I am only the reporter and I am not authorised to answer your question.
However, I would suggest that you download the latest development
version of NetBeans and with that run a testcase yourself that you
created in Sun Java Studio.
It might be difficult for NetBeans team members to answer your
question without a testcase.
In any case, your testcase will be useful either for re-assuring that
things will work for you with 3.6, or as a basis for a new issue report.
Comment 28 eadams 2004-02-21 02:16:25 UTC
Thanks Bernard.  For other reasons, our modules do not
currently run in NB 3.6 yet so I'm trying to conduct the
thought experiment.

I see in Maros' entry from Jan 26 that he addressed the
serialization issue.  The problem I reported does not 
involve switching projects so I'm guessing that the
serialization may not help it.