openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1908) JDBCStoreManager.setInverseRelation throw NullPointerException when <property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
Date Fri, 17 Dec 2010 12:35:00 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972465#action_12972465
] 

Rick Curtis commented on OPENJPA-1908:
--------------------------------------

I hate to say this but I the most timely solution to this problem is to not set openjpa.RuntimeUnenhancedClasses
to supported. There are numerous documented issues with unenhanced classes and I don't think
anyone will get to this anytime soon. Please take a read through this[1] blog posting.

Thanks,
Rick

[1] http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html

> JDBCStoreManager.setInverseRelation throw NullPointerException when <property name="openjpa.RuntimeUnenhancedClasses"
value="supported" />
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1908
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1908
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: UnenhancedClasses
>    Affects Versions: 2.0.0
>         Environment: apache-tomcat-7.0.5
>            Reporter: eshock
>            Priority: Minor
>
> When <property name="openjpa.RuntimeUnenhancedClasses" value="supported" /> and
entity has a OneToMany field with FetchType.EAGER
> @OneToMany(cascade = ALL, fetch = EAGER)
> private List<?> list;
> JDBCStoreManager.setInverseRelation try to get meta data from cache, but sub class is
not in the cache when openjpa.RuntimeUnenhancedClasses is supported.
> nested exception is <openjpa-2.0.0-r422266:935683 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
null
> java.lang.NullPointerException
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.setInverseRelation(JDBCStoreManager.java:489)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:449)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:342)
> 	at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112)
> 	at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> 	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1005)
> 	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:963)
> 	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:885)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1050)
> 	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)
> 	at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2344)
> 	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:274)
> 	at org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:59)
> 	at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36)
> 	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1246)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:861)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:792)
> 	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> 	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:288)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302)
> 	at org.springframework.orm.jpa.JpaTemplate$10.doInJpa(JpaTemplate.java:330)
> 	at org.springframework.orm.jpa.JpaTemplate$10.doInJpa(JpaTemplate.java:1)
> 	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183)
> 	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:146)
> 	at org.springframework.orm.jpa.JpaTemplate.findByNamedParams(JpaTemplate.java:321)
> 	...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message