Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340197 - [Fatal Error] :1:1: Premature end of file while writing artifacts repository
Summary: [Fatal Error] :1:1: Premature end of file while writing artifacts repository
Status: CLOSED DUPLICATE of bug 339862
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 13:36 EDT by Alin Dreghiciu CLA
Modified: 2011-03-16 13:38 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alin Dreghiciu CLA 2011-03-16 13:36:45 EDT
Build Identifier: CVS HEAD

While writing artifacts (actually when artifacts repository is used) P2 SimpleArtifactRepository is logging the following:
[Fatal Error] :1:1: Premature end of file.

Attached is an print screen of a trace showing how that happens.
The problem is that if the "cache" artifacts repository does not exist it will be created while creating the artifacts repository that results in creating the "cache" repository that will trigger SimpleArtifactRepositoryIO.write which when calling repository.getRules will try to load them from disk. But the repository is just an empty file by this moment so XML parser will give the above mentioned error.

This was introduced with the changes from revision 1.103 about locking.

Reproducible: Always
Comment 1 Thomas Hallgren CLA 2011-03-16 13:38:23 EDT

*** This bug has been marked as a duplicate of bug 339862 ***