Hi Dave,
even if it is a problem related to hibernate using proxies we are
working for our users to resolve this soon. We got aware of this as
some of our users reported problems when marshalling objects loaded by
hibernate. The problem is that Castor calls obj.getClass().getName() to
look up the class in the mapping but this method does not returm the
name of your originalclass (e.g. FooBar) but returns
FooBar$$EnhancedByCGLIB$$ instead which results in not finding the right
mapping. It may be possible to work around this by also providing
mappings for the enhanced name but that's something I can not tell you
for sure. Take a look at the issue I mentioned in my previous mail if we
managed to resolve the problem.
Having said that you won't have similar problems using Castor also for
database access ;-)
Regards
Ralf
dave schrieb:
Ralf,
I looked into those Proxy related issues.
Being relatively new to ORM stuff myself, is there a successful
integration between hibernate(for ORM) and Castor(for Marshal/Unmarshal) ?
-D
*/Ralf Joachim <[EMAIL PROTECTED]>/* wrote:
Dave,
you should be aware that hibernate returns CGLIB proxies of your POJO's.
At the moment this causes problems at marshalling/unmarshalling with
Castor. Having said that we are working at a solution. You may have a
look on the progress at: http://jira.codehaus.org/browse/CASTOR-1342
Ralf
Keith Visco schrieb:
>
> Since you already have the classes, you don't need to use the source
> generator. All you need is the mapping file. Since you generated your
> mapping file with a tool, you may need to tweak it manually to
provide
> the proper XML output.
>
> As you mentioned, it might be a good idea to have an XSD or DTD for
> validation purposes, but it's not required.
>
> --Keith
>
> dave wrote:
>
>>
>> Here's the situation:
>> Hibernate is used as ORM; POJOs and hbm.xml mapping files already
>> exist.
>> You would need Unmarshal capability at the server end to convert
>> POJO xml
>> into POJO java object. Assume Castor is used at both client and
>> server end.
>> My understanding is that you would only need Mapping file to perform
>> marsha/unmarshal in the above situation.
>> Does one need Castor source code generator here?
>>
>> I used POJOs(generated from hbm.xml) as input to generate castor
>> mapping.xml using O2xmapper. Is there a tool that can generate XML
>> payload
>> from this mapping.xml ?(i.e The Client end need to Marshal POJO into
>> this xml payload am talking about).
>> Is it also good to have XSD generated from this mapping file for
>> validation purpose? (This XSD is not used for src code generation).
>>
>>
------------------------------------------------------------------------
>> Brings words and photos together (easily) with
>> PhotoMail
>>
>> - it's free and works with Yahoo! Mail.
>
>
>
> -------------------------------------------------
> If you wish to unsubscribe from this list, please send an empty
message
> to the following address:
>
> [EMAIL PROTECTED]
> -------------------------------------------------
--
Syscon Ingenieurb�ro f�r
Me�- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstra�e 11
D-72127 Kusterdingen
Germany
Tel. +49 7071 3690 52
Mobil: +49 173 9630135
Fax +49 7071 3690 98
Email: [EMAIL PROTECTED]
Web: www.syscon-world.de
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
------------------------------------------------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail
<http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=39174/*http://photomail.mail.yahoo.com>
makes sharing a breeze.
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------