openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From coloradoflyer <open...@parallelsw.com>
Subject Re: null values not updating
Date Mon, 20 Jul 2009 05:22:06 GMT

Hi Daryl,

I tried using value="loaded(AccessUnloaded=false)", it did not allow me to
set the values to null..

I've also found another problem with the initial setting.  I have other
tables in the system, for the most part they work, but I do have a
manyTomany, and I get an IllegalStateException that seems to have come up
since making the fetch-groups addition.
Again, the object **should** be disconnected, I'm not sure why its seems
here to have some sort of state connection.

The exception I'm seeing is:
org.apache.openjpa.persistence.InvalidStateException: The context has been
closed.  The stack trace at which the context was closed is held in the
embedded exception.
FailedObject: java.lang.IllegalStateException
	at org.apache.openjpa.kernel.BrokerImpl.assertOpen(BrokerImpl.java:4370)
	at
org.apache.openjpa.kernel.BrokerImpl.beginOperation(BrokerImpl.java:1766)
	at org.apache.openjpa.kernel.BrokerImpl.isActive(BrokerImpl.java:1736)
	at
org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1567)
	at
org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1515)
	at org.apache.openjpa.util.Proxies.dirty(Proxies.java:66)
	at
org.apache.openjpa.util.ProxyCollections.beforeClear(ProxyCollections.java:151)
	at org.apache.openjpa.util.java$util$ArrayList$proxy.clear(Unknown Source)


Daryl Stultz wrote:
> 
> On Thu, Jul 16, 2009 at 1:30 AM, coloradoflyer
> <openjpa@parallelsw.com>wrote:
> 
>>
>> Hi Kevin,
>>
>> Thanks for this link, I got things working by setting <property
>> name="openjpa.DetachState" value="fetch-groups"/>.  I dont really
>> understand
>> why I need this, The 'loaded' value seemed like it should have had the
>> proper functionality.
>>
> 
> Chris, what happens when you use this instead:
> <property name="openjpa.DetachState"
> value="loaded(AccessUnloaded=false)"/>
> 
> (I could try it myself since you provide the test, but I figure it would
> be
> easier for you.) I ask because I tried fetch-groups to solve my "not
> writing
> null" problem and it didn't work. It's possible your test may fail on
> trying
> to access an unloaded field.
> 
> Thanks.
> 
> -- 
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com
> 
> 

-- 
View this message in context: http://n2.nabble.com/null-values-not-updating-tp3224059p3287105.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message