You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Julien Kronegg (JIRA)" <ji...@apache.org> on 2009/03/30 15:14:50 UTC
[jira] Created: (OPENJPA-1003) NullPointerException at runtime
enhancement when the entity has no package
NullPointerException at runtime enhancement when the entity has no package
--------------------------------------------------------------------------
Key: OPENJPA-1003
URL: https://issues.apache.org/jira/browse/OPENJPA-1003
Project: OpenJPA
Issue Type: Bug
Affects Versions: 1.2.0
Environment: DB2, openJPA 1.2.0-r422266:683325
Reporter: Julien Kronegg
Priority: Minor
The given entity (referenced as <class>C</class> in the persistence.xml) produce a NullPointerException at runtime enhancement:
// no package
@Entity
@Table(...) // valid table definition
public class C {
private int id;
@Id
@Column(...) // valid column definition
public int getId() {
return this.id;
}
public void setId(int id) {
this.id=id;
}
}
The NPE is :
org.apache.openjpa.enhance.ManagedClassSubclasser.setDetachedState(ManagedClassSubclasser.java:299)
org.apache.openjpa.enhance.ManagedClassSubclasser.configureMetaData(ManagedClassSubclasser.java:217)
org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:139)
org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:310)
org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:228)
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:190)
The class is enhanced like a charm when adding a package name.
I would expect either:
1) allow the enhancement of entities without package name [preferred]
2) receive an error message such as "could not enhance an entity without package name".
I set the priority to "Minor" as this is not very likely that an entity is added without package.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1003) NullPointerException at runtime
enhancement when the entity has no package
Posted by "Julien Kronegg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julien Kronegg updated OPENJPA-1003:
------------------------------------
Remaining Estimate: 4h (was: 0.07h)
Original Estimate: 4h (was: 0.07h)
> NullPointerException at runtime enhancement when the entity has no package
> --------------------------------------------------------------------------
>
> Key: OPENJPA-1003
> URL: https://issues.apache.org/jira/browse/OPENJPA-1003
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0
> Environment: DB2, openJPA 1.2.0-r422266:683325
> Reporter: Julien Kronegg
> Priority: Minor
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The given entity (referenced as <class>C</class> in the persistence.xml) produce a NullPointerException at runtime enhancement:
> // no package
> @Entity
> @Table(...) // valid table definition
> public class C {
> private int id;
> @Id
> @Column(...) // valid column definition
> public int getId() {
> return this.id;
> }
> public void setId(int id) {
> this.id=id;
> }
> }
> The NPE is :
> org.apache.openjpa.enhance.ManagedClassSubclasser.setDetachedState(ManagedClassSubclasser.java:299)
> org.apache.openjpa.enhance.ManagedClassSubclasser.configureMetaData(ManagedClassSubclasser.java:217)
> org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:139)
> org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:310)
> org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:228)
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:190)
> The class is enhanced like a charm when adding a package name.
> I would expect either:
> 1) allow the enhancement of entities without package name [preferred]
> 2) receive an error message such as "could not enhance an entity without package name".
> I set the priority to "Minor" as this is not very likely that an entity is added without package.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1003) NullPointerException at runtime
enhancement when the entity has no package
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis resolved OPENJPA-1003.
----------------------------------
Resolution: Cannot Reproduce
Fix Version/s: 1.2.0
Assignee: Rick Curtis
Unable to recreate the NPE. Tested on:
OpenJPA 1.2.0
version id: openjpa-1.2.0-r422266:683325
Apache svn revision: 422266:683325
Perhaps the problem was with one of your other annotations?
> NullPointerException at runtime enhancement when the entity has no package
> --------------------------------------------------------------------------
>
> Key: OPENJPA-1003
> URL: https://issues.apache.org/jira/browse/OPENJPA-1003
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0
> Environment: DB2, openJPA 1.2.0-r422266:683325
> Reporter: Julien Kronegg
> Assignee: Rick Curtis
> Priority: Minor
> Fix For: 1.2.0
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The given entity (referenced as <class>C</class> in the persistence.xml) produce a NullPointerException at runtime enhancement:
> // no package
> @Entity
> @Table(...) // valid table definition
> public class C {
> private int id;
> @Id
> @Column(...) // valid column definition
> public int getId() {
> return this.id;
> }
> public void setId(int id) {
> this.id=id;
> }
> }
> The NPE is :
> org.apache.openjpa.enhance.ManagedClassSubclasser.setDetachedState(ManagedClassSubclasser.java:299)
> org.apache.openjpa.enhance.ManagedClassSubclasser.configureMetaData(ManagedClassSubclasser.java:217)
> org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:139)
> org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:310)
> org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:228)
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:190)
> The class is enhanced like a charm when adding a package name.
> I would expect either:
> 1) allow the enhancement of entities without package name [preferred]
> 2) receive an error message such as "could not enhance an entity without package name".
> I set the priority to "Minor" as this is not very likely that an entity is added without package.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.