Hi.
I do indeed see that the
flex.data.assembler.HibernateAnnotationsAssembler is provided in the
flex.data.jar file distributed with LCDS 2.6b2.
However, I have no idea how to get it working:
I tried modifying the simple Contact demo using Hibernate that comes
as a sample for LCDS 2.6 to use annotations, and then I commented out
the following line in hibernate.cfg.xml:
<mapping resource="flex/samples/contact/Contact.hbm.xml"/>
Then I changed the data-management-config.xml entry for
<destination id="hibernate-contact">
To use
<source>flex.data.assemblers.HibernateAnnotationsAssembler</source>
And I assumed this was all I would have to change to get this working.
However, when I attempt to start up the server, I simply get errors i.e.:
[Flex] [ERROR] MessageBroker failed to start:
flex.data.adapters.AdapterException: No Hibernate mapping was found
for entity name 'flex.samples.contact.Contact' configured in
destination 'hibernate-contact'. Please verify that your destination
configuration specifies a valid <hibernate-entity/>, or that the
destination id references a valid entity.
at flex.data.assemblers.HibernateType.start(HibernateType.java:195)
at
flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:205)
....
I was not able to locate the source code for the
HibernateAnnotationsAssembler anywhere, nor can I find any reference
to this file in any other forum, site, document, etc.
I did look at the decompiled code, and I can see that it simply
extends the Hibernate assebmler, and over-writes the
createHiberanteConfigureation method, but again, I just don't know
what the magic is to get this thing configured and reading in
annotation information.
Any small, simple example would be just lovely.
Thanks!
Greg Gordon
--- In [email protected], "Jeff Vroom" <[EMAIL PROTECTED]> wrote:
>
> The 2.6 beta (on labs.adobe.com) has annotations support built in - you
> have to use the HibernateAnnotationsAssembler instead of the
> HibernateAssembler in your data-management-config.xml. It is not too
> hard to add to 2.5.1 if you need it there too... there are some new jar
> files you need to add and you need to override a method in the
> HibernateAssembler to specify a different class to bootstrap the
> configuration. The source for this is also in the 2.6 beta if you want
> to check it out.
>
>
>
> Jeff
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Mathieu Fernandez
> Sent: Wednesday, April 30, 2008 3:24 AM
> To: [email protected]
> Subject: [flexcoders] Use hibernate annotations with LiveCycle Data
> Services
>
>
>
> Hello,
> I'm trying to use hibernate annotations with LiveCycle Data Services.
> My problem is when I launch my server I have this error :
> "An annotationConfiguration instance is required to use <mapping
> class="...">"
> So I would like to know how enabling annotation configuration?
> Thanks
>