Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346498 - NullPointerException with converterClass attribute specified for custom converter
Summary: NullPointerException with converterClass attribute specified for custom conve...
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.0 RC3   Edit
Assignee: Brian Vosburgh CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 12:01 EDT by Nan Li CLA
Modified: 2011-07-06 10:40 EDT (History)
2 users (show)

See Also:


Attachments
Stack Trace (4.70 KB, text/plain)
2011-05-19 12:02 EDT, Nan Li CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Li CLA 2011-05-19 12:01:34 EDT
Build Identifier: I20110512-2000

Define a custom converter for an ID mapping like this:

    @Id
    @Convert("BALABA")  
    @Converter(converterClass = MyConv.class, name = "CONV")
    private int id;

Once saving the java source, the following NPE is thrown and prevents the validation messages from showing up in the Problem view. This problem happens no matter whether the converter class is valid or not.

java.lang.NullPointerException
	at org.eclipse.jpt.common.core.internal.utility.jdt.AbstractJDTType.types(AbstractJDTType.java:171)

Full stack trace is attached.

Reproducible: Always
Comment 1 Nan Li CLA 2011-05-19 12:02:49 EDT
Created attachment 196133 [details]
Stack Trace
Comment 2 Nan Li CLA 2011-05-19 12:15:49 EDT
Same problem exists when defining a custom converter at Java entity level. Custom converters defined in mapping file don't have such problem.
Comment 3 Neil Hauge CLA 2011-05-19 16:08:38 EDT
From my testing, and from discussion with Brian, this bug is a result of a proposed fix for bug 346005.  As such, I don't think it would qualify as a bug since it doesn't exist in any development stream.

Please let me know if this is incorrect.
Comment 4 Neil Hauge CLA 2011-05-19 16:16:42 EDT
(In reply to comment #3)
> From my testing, and from discussion with Brian, this bug is a result of a
> proposed fix for bug 346005.  As such, I don't think it would qualify as a bug
> since it doesn't exist in any development stream.
> 
> Please let me know if this is incorrect.

OK...I finally reproduced this exception.  I must not have had a converter class set previously.
Comment 5 Neil Hauge CLA 2011-05-24 14:45:24 EDT
This is fixed with the patch from bug 346535.
Comment 6 Neil Hauge CLA 2011-05-25 11:32:15 EDT
Fixed by patch from bug 346535.
Comment 7 Jolene Moffitt CLA 2011-07-06 10:40:50 EDT
Verified in Build R-3.3.0-20110607160810

Verified you can add custom converter(s) to id mapping without NPE errors.  See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0_RC3