DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-905
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Renato Garcia
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Core

ClassUtils.getConstructorWithArguments only recognize constructors with exact type

Created: 25/Aug/12 04:56 AM   Updated: 28/Aug/12 09:56 AM   Resolved: 25/Aug/12 09:55 AM
Component/s: Queries
Affects Version/s: 2.2.4, 3.0.11, 3.1.0.release
Fix Version/s: 3.1.1

File Attachments: 1. Text File NUCCORE-905-test.patch (2 kB)
2. Text File NUCCORE-905.patch (0.8 kB)

Severity: Development

 Description  « Hide
I'm getting the following exception:

org.datanucleus.exceptions.NucleusUserException: Query needs to return objects of type "..." but it was impossible to create a new instance of this type. The result class needs a no-args constructor.
at Method)
at org.datanucleus.api.jdo.JDOQuery.executeWithArray(

ClassUtils.getConstructorWithArguments is only considering constructors with exact same type but it should consider supertypes and interfaces as well.

Sort Order: Ascending order - Click to sort in descending order
Renato Garcia added a comment - 25/Aug/12 05:33 AM
Tests for the patch

Andy Jefferson added a comment - 25/Aug/12 09:55 AM
Now in SVN trunk.