Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363378 - NPE viewing jaxb project properties when schema has a null namespace
Summary: NPE viewing jaxb project properties when schema has a null namespace
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.2   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 15:00 EST by Karen Butzke CLA
Modified: 2011-11-21 14:12 EST (History)
2 users (show)

See Also:
neil.hauge: review+


Attachments
stack trace (5.81 KB, text/plain)
2011-11-09 15:00 EST, Karen Butzke CLA
no flags Details
example schema (729 bytes, application/octet-stream)
2011-11-10 12:28 EST, Karen Butzke CLA
no flags Details
example project (3.94 KB, application/x-zip-compressed)
2011-11-10 12:48 EST, Karen Butzke CLA
no flags Details
proposed patch against 3.0 maintenance (904 bytes, patch)
2011-11-10 14:56 EST, Karen Butzke CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2011-11-09 15:00:50 EST
Created attachment 206735 [details]
stack trace

I deleted some schemas that were associated with my JAXB project after generating classes from them. There are validation errors that the schema cannot be resolved. Opened the Project properties and try to view the 'JAXB'-> 'Schemas' page to remove the old schemas. I get the attached NPE and the page does not draw correctly
Comment 1 Karen Butzke CLA 2011-11-10 07:25:56 EST
This isn't because I deleted the schemas, it's because they have null namespaces
Comment 2 Karen Butzke CLA 2011-11-10 12:28:08 EST
Created attachment 206797 [details]
example schema

Ok, here is a schema that causes the issue. Create a JAXB project and associate it with 2 local schemas in the project properties. Now replace the contents of both of those schemas with this attached schema. Reopen the project properties and the NPE happens
Comment 3 Karen Butzke CLA 2011-11-10 12:48:35 EST
Created attachment 206800 [details]
example project

attaching the offending project
Comment 4 Karen Butzke CLA 2011-11-10 14:55:08 EST
checked in to HEAD for 3.1RC1, seems like a good 3.0.2 candidate bug
Comment 5 Karen Butzke CLA 2011-11-10 14:56:56 EST
Created attachment 206813 [details]
proposed patch against 3.0 maintenance
Comment 6 Karen Butzke CLA 2011-11-15 14:28:59 EST
fix checked in
Comment 7 Jolene Moffitt CLA 2011-11-21 14:12:28 EST
Verified in Build M-3.3.2-20111117045640

Verified no errors appear if you have two schemas and both with null for the namespace.  See the link to view test steps for verification.  http://wiki.eclipse.org/Dali_3.0.2