Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314752 - [misc] NPE when editing an xml file which hoses the xml model
Summary: [misc] NPE when editing an xml file which hoses the xml model
Status: NEW
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: Future   Edit
Assignee: wst.common CLA
QA Contact: Carl Anderson CLA
URL:
Whiteboard:
Keywords:
Depends on: 311777
Blocks:
  Show dependency tree
 
Reported: 2010-05-27 14:46 EDT by Carl Anderson CLA
Modified: 2012-11-07 16:52 EST (History)
5 users (show)

See Also:


Attachments
patch (1.52 KB, patch)
2012-11-07 16:51 EST, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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