Thank you, it seems to have created all the classes with annotations
correctly!

I tried to create a beaneditform off the User class but I get the error:

Exception instantiating instance of com.james.taphib.entities.Users (for
component 'AddUser:user.editor'): Error invoking constructor
com.james.taphib.entities.Users(Occupation, String, String) (at
Users.java:35) (for service 'BeanModelSource'): No service implements the
interface com.james.taphib.entities.Occupation. [at
classpath:org/apache/tapestry5/corelib/components/BeanEditForm.tml, line 7,
column 85]

It is just a base form:

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
    <head>
        <title>Add User</title>
    </head>
    <body>
    <h1>Adding New User</h1>
<t:beaneditform t:id="user"/>
    </body>
</html>

And class:

public class AddUser {
        @Persist
        private Users user;

        public Users getUser() {
                return user;
        }

        public void setUser(Users user) {
                this.user = user;
        }

}

It seems to have trouble with the foreign key to occupation.  I must be
missing a getter or an inject or something.

Any help would be appreciated.

--James


-----Original Message-----
From: Thiago H. de Paula Figueiredo [mailto:[EMAIL PROTECTED] 
Sent: October-26-08 7:38 PM
To: Tapestry users
Subject: Re: T5: Using with hibernate and Mysql

Em Sun, 26 Oct 2008 16:23:46 -0300, James Sherwood  
<[EMAIL PROTECTED]> escreveu:

> Thank you,

Hi, James!

> You wouldn't have a link to a demo of the JPA generation.
> I use eclipse to generate it and cannot find such a generation type.
> The instructions I used were here:
> http://www.wikihow.com/Generate-Hibernate-Pojo-Classes-from-DB-Tables

Reading it, I'm now sure you have selected the generation of mappings  
using XML.

Take a look at this image:  
http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html/images/plugins/p
lugins_8.png  
 from the Hibernate Tools documentation here:  
http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html/plugins.html#d0e
890.

Check the "Use Java syntax" and "Generate EJB3 annotations" options to  
have your mappings done by JPA annotations. ;)

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__________ Information from ESET Smart Security, version of virus signature
database 3536 (20081019) __________

The message was checked by ESET Smart Security.

http://www.eset.com

 

__________ Information from ESET Smart Security, version of virus signature
database 3536 (20081019) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to