Re: openjpa.metamodel problem with multiple classloaders

2012-07-20 Thread garpinc
In my application I have to dynamically generate the domain objects at runtime hence the need for multiple classloaders. -- View this message in context: http://openjpa.208410.n2.nabble.com/openjpa-metamodel-problem-with-multiple-classloaders-tp7580606p7580664.html Sent from the OpenJPA Users

Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
I'm having an issue when trying to persist a field where the type is XMLGregorianCalendar. I see a post here http://vard-lokkur.blogspot.com/2011/04/jpa-and-unmodifiable-collections.html which seems to show a similar issue. Can anyone help me figure out what's going on here? Getting the

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread Rick Curtis
How are you annotating the XMLGregorianCalendar field in your Entity to be persistent? Thanks, Rick On Fri, Jul 20, 2012 at 7:52 AM, garpinc garp...@yahoo.com wrote: I'm having an issue when trying to persist a field where the type is XMLGregorianCalendar. I see a post here

Re: openjpa.metamodel problem with multiple classloaders

2012-07-20 Thread Rick Curtis
This might be a stupid question, but can you do all of your work in classloader #2(rather than some in #1 and run in #2)? Thanks, Rick On Fri, Jul 20, 2012 at 7:47 AM, garpinc garp...@yahoo.com wrote: In my application I have to dynamically generate the domain objects at runtime hence the

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
@org.apache.openjpa.persistence.Persistent(fetch = javax.persistence.FetchType.LAZY) @org.apache.openjpa.persistence.jdbc.Strategy(com.cambridgesemantics.anzo.relationalreplicator.openjpaplugin.XGCTimestampValueHandler) public javax.xml.datatype.XMLGregorianCalendar getExpiryDate() throws

Re: openjpa.metamodel problem with multiple classloaders

2012-07-20 Thread garpinc
I'm doing all my work in classloader #2 by setting the ThreadContext classloader but basically this is an OSGI application so there are bundle classloaders as well involved. -- View this message in context:

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
here are the 2 classes involved in the annotation package com.cambridgesemantics.anzo.relationalreplicator.openjpaplugin; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import org.apache.openjpa.jdbc.kernel.JDBCStore; import

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread Rick Curtis
I should have asked this before, but what version of OpenJPA are you running? Thanks, Rick On Fri, Jul 20, 2012 at 12:09 PM, garpinc garp...@yahoo.com wrote: here are the 2 classes involved in the annotation package com.cambridgesemantics.anzo.relationalreplicator.openjpaplugin; import

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
2.2.0 but I just verified I have the same issue on 2.1.2-SNAPSHOT as well -- View this message in context: http://openjpa.208410.n2.nabble.com/Failing-to-persist-a-field-where-the-type-is-XMLGregorianCalendar-tp7580665p7580676.html Sent from the OpenJPA Users mailing list archive at

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
It could be that I didn't implement the AbstractValueHandler correctly. The api changed from 2.1.2 to 2.2.. now when I restest on 2.1.2 it doesn't work where it did before.. Please see if you think they are correct.. In the meantime i'll revert to 2.1.2 and put AbstractValueHandler back to how

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread Rick Curtis
Honestly, I haven't had time to try to run with your customer handlers... I have been looking ProxyManager code and trying to recreate the initial stack you posted. Here is a small test you can run to see where it is blowing up: XMLGregorianCalendar cc = null; // instantiate me!

Re: Handle constraint violation

2012-07-20 Thread Pawel Veselov
On Thu, Jul 19, 2012 at 3:05 PM, José Luis Cetina maxtorz...@gmail.comwrote: And what about if my object has references in 100 tables? do i have to do 100 SELECT'S?? Is no a more flexible way to do it?? I wouldn't call it flexible, and I wouldn't personally recommend doing it in other way

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
Yep I get exception if I do following: ReplicationJob job = ReplicationJob.adaptor(rr); GregorianCalendar gc = new GregorianCalendar(); gc.setTimeInMillis(new Date().getTime()); XMLGregorianCalendar cc = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc);

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
In fact here is a complete testcase without involving my code at all GregorianCalendar gc = new GregorianCalendar(); gc.setTimeInMillis(new Date().getTime()); XMLGregorianCalendar cc = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc); Properties jpaConf =

Re: Handle constraint violation

2012-07-20 Thread José Luis Cetina
Im creating a method for doing this dyanimic, the method read the annotations and looking from relationships and check (with select), i have 80% and is working without problems. 2012/7/20 Pawel Veselov pawel.vese...@gmail.com: On Thu, Jul 19, 2012 at 3:05 PM, José Luis Cetina

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread Rick Curtis
When I run that test, I get null back from this[1] method call. [1] emf.getConfiguration().getProxyManagerInstance().newCustomProxy(cc, true); On Fri, Jul 20, 2012 at 3:15 PM, garpinc garp...@yahoo.com wrote: Tracing it through it seems it's doing a Class.forName with following arguments:

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread garpinc
hmm so are you saying you're not getting an exception? I'm running from within eclipse if that makes a difference. -- View this message in context: http://openjpa.208410.n2.nabble.com/Failing-to-persist-a-field-where-the-type-is-XMLGregorianCalendar-tp7580665p7580686.html Sent from the

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread Rick Curtis
As am I. Which jar is your org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl class coming from? On Fri, Jul 20, 2012 at 3:52 PM, garpinc garp...@yahoo.com wrote: hmm so are you saying you're not getting an exception? I'm running from within eclipse if that makes a difference. --

Re: Failing to persist a field where the type is XMLGregorianCalendar.

2012-07-20 Thread Rick Curtis
I will be on irc://irc.freenode.net/ #openjpa for the next 30 min if you want to try to catch me in there. Thanks, Rick On Fri, Jul 20, 2012 at 3:54 PM, Rick Curtis curti...@gmail.com wrote: As am I. Which jar is your org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl class coming from?