openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OPENJPA-2112) NPE during eager-fetching of simple m:n (ManyToMany) relation
Date Wed, 18 Jan 2012 15:48:39 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-2112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick Curtis closed OPENJPA-2112.
--------------------------------

    Resolution: Fixed

I hate to say this but I the most timely solution to this problem is to not set openjpa.RuntimeUnenhancedClasses=supported.
RuntimeUnenhancedClasses is a half baked feature that has numerous documented issues and no
one is going to get to this anytime soon.  Please take a look at these links [1][2] which
detail other enhancement strategies.

I'm closing this issue because we don't intend on making subclassing usable in the near future.
We will reopen if/when we decide to tackle that work. 

Thanks,
Rick

[1] http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html
[2] http://openjpa.apache.org/entity-enhancement.html
                
> NPE during eager-fetching of simple m:n (ManyToMany) relation
> -------------------------------------------------------------
>
>                 Key: OPENJPA-2112
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2112
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.1.1
>            Reporter: Reiner Lott
>            Assignee: Rick Curtis
>              Labels: UnenhancedClasses, collection, eager, fetching, nullpointer, project,
sample
>         Attachments: Eager_Bug.zip
>
>
> Hi,
> in case of ManyToMany eager join unidirectional join, a nullpointer exception is thrown:
> Exception in thread "main" <openjpa-2.1.1-r422266:1148538 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: null
> FailedObject: select t from Itemlist t [java.lang.String]
> 	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1008)
> 	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:907)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1041)
> 	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)
> 	at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2381)
> 	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:1251)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
> 	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> 	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:315)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331)
> 	at de.meyerwerft.test.ItemTester.getItemlist_Items(ItemTester.java:102)
> 	at de.meyerwerft.test.ItemTester.main(ItemTester.java:19)
> Caused by: java.lang.NullPointerException
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.setInverseRelation(JDBCStoreManager.java:480)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:440)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:333)
> 	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:1027)
> 	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:985)
> 	... 16 more
> Given relations:
> - Itemlist 
> - Item 
> - Itemlist_Item
> Properties set:
> 			<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
> 			<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message