Hi Ralf

It works!!! :)

I had to make one small change: rather than the proxy interface being 
net.sf.cglib.proxy.Factory, my Hibernate one was 
org.hibernate.proxy.HibernateProxy in castor.properties. So I just added it and 
it seems to work perfectly

org.exolab.castor.xml.proxyInterface=net.sf.cglib.proxy.Factory,org.hibernate.proxy.HibernateProxy

I guess the Castor download could come with this property already set with a 
list of known interfaces, and then people can override the property with their 
own if need be perhaps?

Thanks for your work on this Ralf - really appreciate it.

Richard Gundersen
Java Developer
 
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS

-----Original Message-----
From: Ralf Joachim [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 19, 2007 9:32 AM
To: dev@castor.codehaus.org
Subject: Re: [castor-dev] CASTOR-1342 (Marshalling Proxy Classes)

Hi Richard,

can you please test the new patch I attached to CASTOR-1342. I'm quite 
confident that this one will fix the problem.

Regards
Ralf


Gundersen, Richard schrieb:
> Hi Ralf
> 
> No problemo. For Hibernate there's the isUninitialized() method as described 
> in the links below. This is Hibernate-specific of course, so taking care of 
> all other APIs that use proxied objects could potentially be a bit messy. I 
> think the CGLIB API might be the place to look for a common solution. I don't 
> know anything about CGLIB but I'll try to spend some time today to do a bit 
> of digging. If I find anything useful I will let you know.
> 
> http://www.nabble.com/HibernateProxy-causes-class-type-mismatch-t4031421.html
> https://jaxb.dev.java.net/issues/show_bug.cgi?id=280
> 
> Richard Gundersen
> Java Developer
>  
> Email: [EMAIL PROTECTED]
> Phone: 01618302398
> Fax: 01618342536
> London Scottish Bank plc
> 24 Mount Street
> Manchester
> M2 3LS
> 
> -----Original Message-----
> From: Ralf Joachim [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 17, 2007 5:33 PM
> To: dev@castor.codehaus.org
> Subject: Re: [castor-dev] CASTOR-1342 (Marshalling Proxy Classes)
> 
> Sorry Richard,
> 
> I've also been busy with other things.
> 
> When I updated the patch for you and others to test I also got the 
> feeling that the approach taken to detect proxies is not what we need. 
> I'll try to find some spare time to look at this in more details soon.
> 
> Regards
> Ralf
> 
> 
> Gundersen, Richard schrieb:
>> Hi Ralf
>>
>> Sorry for not getting back to you on this for several weeks on this -
>> very slack of me! 
>>
>> I've been trying to apply your patch with varying degrees of success.
>> With the changes in place, Castor still seems to marshall an object that
>> comes back to me as an 'EnhancerByCGLIB' object. 
>>
>> I don't know too much about this, but I think it's because Hibernate is
>> returning a class of type:
>>
>> com.lsb.uk.mqs.value.GeneralRefLabelValue$$EnhancerByCGLIB$$51aebe8f 
>>
>> I've tried using the isProxyClass() method in both the
>> java.lang.reflect.Proxy and net.sf.cglib.proxy.Proxy classes. Neither
>> recognises my class as a proxy class, so my guess is that Castor will
>> try and parse it. 
>>
>> Does this sound like I could be on the right track? I think we may need
>> another way to detect what kinds of classes should be marshalled. What
>> do you think?
>>
>> If I can be of any help let me know.
>>
>> Richard Gundersen
>>
>>
>> *** Disclaimer *** 
>>
>> This electronic communication is confidential and for the exclusive use of 
>> the addressee. It may contain private and confidential information. The 
>> information, attachments and opinions contained in this E-mail are those of 
>> its author only and do not necessarily represent those of London Scottish 
>> Bank PLC or any other members of the London Scottish Group. 
>>
>> If you are not the intended addressee, you are prohibited from any 
>> disclosure, distribution or further copying or use of this communication or 
>> the information in it or taking any action in reliance on it. If you have 
>> received this communication in error please notify the Information Security 
>> Manager at [EMAIL PROTECTED] as soon as possible and delete the message from 
>> all places in your computer where it is stored. 
>>
>> We utilise virus scanning software but we cannot guarantee the security of 
>> electronic communications and you are advised to check any attachments for 
>> viruses. We do not accept liability for any loss resulting from any 
>> corruption or alteration of data or importation of any virus as a result of 
>> receiving this electronic communication. 
>>
>> Replies to this E-mail may be monitored for operational or business reasons. 
>> London Scottish Bank PLC is regulated by the Financial Services Authority.
>> ______________________________________________________________________
>> This email has been scanned by the MessageLabs Email Security System.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email
> 

-- 

Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Internet: www.syscon.eu
E-Mail: [EMAIL PROTECTED]

Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

*** Disclaimer *** 

This electronic communication is confidential and for the exclusive use of the 
addressee. It may contain private and confidential information. The 
information, attachments and opinions contained in this E-mail are those of its 
author only and do not necessarily represent those of London Scottish Bank PLC 
or any other members of the London Scottish Group. 

If you are not the intended addressee, you are prohibited from any disclosure, 
distribution or further copying or use of this communication or the information 
in it or taking any action in reliance on it. If you have received this 
communication in error please notify the Information Security Manager at [EMAIL 
PROTECTED] as soon as possible and delete the message from all places in your 
computer where it is stored. 

We utilise virus scanning software but we cannot guarantee the security of 
electronic communications and you are advised to check any attachments for 
viruses. We do not accept liability for any loss resulting from any corruption 
or alteration of data or importation of any virus as a result of receiving this 
electronic communication. 

Replies to this E-mail may be monitored for operational or business reasons. 
London Scottish Bank PLC is regulated by the Financial Services Authority.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to