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

Bug 349737

Summary: NPE switching focus area after choosing a generator
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: karenfbutzke, neil.hauge
Version: 2.3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Stack Trace none

Description Nan Li CLA 2011-06-17 17:12:25 EDT
Build Identifier: M20110210-1200


1. Select an Id mapping and go to Primary Key Generation section in the JPA Details view
2. Define a generator and select it from the dropdown list of the "Generator name" combo
3. Try to switch the focus area

The attached NPE as below appears in the error log:

java.lang.NullPointerException
	at org.eclipse.jpt.ui.internal.details.GeneratedValueComposite$3.setValue_(GeneratedValueComposite.java:158)
	at org.eclipse.jpt.ui.internal.details.GeneratedValueComposite$3.setValue(GeneratedValueComposite.java:147)
	at org.eclipse.jpt.ui.internal.details.GeneratedValueComposite$3.setValue(GeneratedValueComposite.java:1)

The same NPE will also be thrown if first setting a value to "Generator name" and then trying to delete it from the UI. The value set to the source will not be removed.

Reproducible: Always
Comment 1 Nan Li CLA 2011-06-17 17:13:57 EDT
Created attachment 198219 [details]
Stack Trace
Comment 2 Neil Hauge CLA 2011-07-01 16:26:17 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 3 Karen Butzke CLA 2011-11-02 10:14:33 EDT
I can't seem to reproduce this, what are you doing when you say to "switch the focus area"?
Comment 4 Nan Li CLA 2011-11-02 10:33:11 EDT
(In reply to comment #3)
> I can't seem to reproduce this, what are you doing when you say to "switch the
> focus area"?

By "switch the focus area" I mean clicking any other place to change the content shown on the JPA Details view, e.g. the focus area is current on the id mapping, then try to click the class name to focus on the entity. 

I tried to reproduce it with 3.1 build, but couldn't reproduce it. Maybe it's working fine now.