Steve:
I've not seen this behaviour, but I'm certainly going to dig into it. The error on the
face of it is trying to say that it doesn't have all the pieces of the primary key -
but why doesn't it is the question.
We have a unit test for this too, so perhaps it's not sufficiently comprehensive to
catch this issue - in which case the right thing would be to expand the unit test
until it fails, then fix the code so it doesn't....
(Thanks for getting it into the bugtracker too)
Mike
On Tue, 11 Nov 2003 10:37:08 -0600
Stephen Davidson <[EMAIL PROTECTED]> wrote:
> Greetings.
>
> I seem to have stumbled on a bug with the default persistent layer, and I am not
> quite familiar enough with it to chase down rapidly.
>
> When I ran the enhanced debugging code (added to both DefaultPersistent and the
> PersistentDynaBean), it appears that the Fieldnames are being rejected, and
> therefore no values are being set. This is causing mucho problems
> down the line. Help?
>
> Note that the Cache Table and the Archive Table have _IDENTICAL_ structures,
> including identical fieldnames/types & KEYS
> Code to trigger (note: try-catches are missing);
>
> final PersistentFactory pf = (PersistentFactory) req.getService(
> PersistentFactory.ROLE,
> req.getDomain());
>
> Persistent pCache = null;
> Persistent pArchive = null;
>
> //Get the persistents
> pCache = pf.create(cacheName);
> pArchive = pf.create(archiveName);
> pCache. setField("keyField", key); //Key Field Description: "8
> Character ID"
> pCache.retrieve();
>
> //Read the data, and do stuff in the system based on it, leave data and persistent
> alone
>
> pArchive.setBean(pCache.getBean());
> //Save Data
> >>>>> pArchive.update(); //THIS LINE FAILS
>
>
> //Exception is;
> org.keel.services.persist.PersistenceException: $keelNullNotAllowed|8 Character ID
> at
> org.keel.services.persist.defaultpersist.DefaultPersistent.haveAllKeys(DefaultPersistent.java:1904)
> at
> org.keel.services.persist.defaultpersist.DefaultPersistent.update(DefaultPersistent.java:3156)
> at com.blueline.mam.ManageClip.archiveClip(ManageClip.java:167)
> at com.blueline.mam.ManageClip.execute(ManageClip.java:76)
> at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:100)
> at $Proxy3.execute(Unknown Source)
> at
> org.keel.services.model.defaultmodel.DefaultModelRequest.execute(DefaultModelRequest.java:151)
> at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.apache.avalon.fortress.impl.factory.PassThroughInvocationHandler.invoke(PassThroughInvocationHandler.java:100)
> at $Proxy4.execute(Unknown Source)
> at
> org.keel.servers.direct.KeelDirectServer.execute(KeelDirectServer.java:251)
> at
> org.keel.servers.direct.KeelDirectServer$MultiThreadedProcessor.run(KeelDirectServer.java:294)
>
> --
> Java/J2EE Developer/Integrator
> Co-Chair, Dallas/FortWorth J2EE Sig
> 214-724-7741
>
>
> http://keelframework.org/documentation
> Keelgroup mailing list
> [EMAIL PROTECTED]
> http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
Michael Nash
JGlobal Ltd
Next-Generation Web Application Development and Open Source Support
http://www.jglobal.com
Bahamas Commerce and Trade
Offshore eCommerce Hosting and Business Services
http://www.bahamascommerce.com
http://keelframework.org/documentation
Keelgroup mailing list
[EMAIL PROTECTED]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com