Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363378

Summary: NPE viewing jaxb project properties when schema has a null namespace
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JAXBAssignee: Karen Butzke <karenfbutzke>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: 3.1Flags: neil.hauge: review+
Target Milestone: 3.0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
stack trace
none
example schema
none
example project
none
proposed patch against 3.0 maintenance none

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