Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316886 - [publisher] NullPointerException in ProductPublisherApplication (p2.publisher) when product file path denotes missing or invalid xml document
Summary: [publisher] NullPointerException in ProductPublisherApplication (p2.publisher...
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-15 08:05 EDT by Katya Stoycheva CLA
Modified: 2010-11-02 17:34 EDT (History)
3 users (show)

See Also:


Attachments
Handling missing or invalid product file (3.75 KB, patch)
2010-06-15 08:12 EDT, Katya Stoycheva CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Katya Stoycheva CLA 2010-06-15 08:05:43 EDT
Build Identifier: I20100603-1500

When trying to run product publisher application with parameter product file which doesn't exist or is invalid xml, the application exits with the following message:
Generating metadata for ..
Status ERROR: org.eclipse.equinox.p2.artifact.repository code=0  java.lang.NullPointerException
-metadataRepository
file:///D:/tools
-artifactRepository
file:///D:/tools
-productFile
file:///d:/non.existing
-configs
win32.win32.x86

Reproducible: Always

Steps to Reproduce:
1. Configure parameters: 
-metadataRepository file:///D:/tools (test directory, could be empty)
-artifactRepository file:///D:/tools (test directory, could be empty)
-productFile file:///d:/non.existing file 
-configs win32.win32.x86
2. Run application ProductPublisher with arguments described in point 1.
3. Observe NullPointerException in application output without any meaningful message
Comment 1 Katya Stoycheva CLA 2010-06-15 08:12:18 EDT
Created attachment 171916 [details]
Handling missing or invalid product file

Exception handling could be improved: instead of catching all types of exceptions,  only the feasible checked exceptions (IOException, ParserConfigurationException and SaxParserException) should be processed.
Comment 2 Pascal Rapicault CLA 2010-11-02 17:34:32 EDT
Fixe released in HEAD.