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

Bug 314752

Summary: [misc] NPE when editing an xml file which hoses the xml model
Product: [WebTools] WTP Common Tools Reporter: Carl Anderson <ccc>
Component: wst.commonAssignee: wst.common <wst.common-inbox>
Status: NEW --- QA Contact: Carl Anderson <ccc>
Severity: major    
Priority: P3 CC: ccc, david_williams, karenfbutzke, neil.hauge, nsand.dev
Version: 3.2   
Target Milestone: Future   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 311777    
Bug Blocks:    
Attachments:
Description Flags
patch none

Description Carl Anderson CLA 2010-05-27 14:46:06 EDT
This bug is to delete the EMF2DOMSSEAdapter version of createAdapter() and roll Karen's patch down to EMF2DOMAdapter.createAdapter()

+++ This bug was initially created as a clone of Bug #311777 +++

Created an attachment (id=167193)
NPE stack trace

The attached NPE occurs when I take a valid orm.xml file and edit it as follows.  Notice the '.' after class="model.Person".  Once the NPE has occurred the model is pretty well hosed.  You can tell this because of the Dali validation error: "The entity has no primary key attribute defined", which is not true since the 'id' element is specified. Removing the extraneous period does not solve the problem.  I will attach a JPA project that shows this bug, import the project, switch to the JPA perspective and open the orm.xml file.  Add the '.' and you will get the NPE.


<entity class="model.Person".>
        <table name="person"/>
        <attributes>
        	<id name="id">
        	</id>
        </attributes>
    </entity>
Comment 1 Nitin Dahyabhai CLA 2010-07-02 14:49:42 EDT
Moving to 3.2.2 unless you have a patch, Carl.
Comment 2 Nick Sandonato CLA 2012-11-07 16:51:56 EST
Created attachment 223319 [details]
patch