[jboss-user] [JBoss Seam] - Problems when generating entities

adriju do-not-reply at jboss.com
Mon Nov 26 08:11:06 EST 2007


Hi!! I am new in all this world and I have problems with the Seam.
First, I am using an Oracle 9.2 DB. There are tables that have simple primary-keys and others that have composite primary-keys. Other tables have foreign-keys and a mix of primary and foreign keys.
I want to generate the entities corresponding to each table of my DB using seam-gen. I create a project in Seam and then I type 'seam generate-entities' from which I receive a successful build. The problem comes when I type 'seam restart', I receive BUILD FAILED.
When I see inside my project I can see several generated files corresponding to the tables in the DB. For example, I have this table:

table GRUPOS_USUARIOS
(
    COD_GRUPOS_USUARIOS                    NUMBER(10)             not null,
    NOMBRE_GRUPOS_USUARIOS                 VARCHAR2(60)           null,
    primary key (COD_GRUPOS_USUARIOS)
)

seam-gen generates 3 files GrupoUsuarios.java, GruposUsuariosHome.java and GruposUsuariosList.java.

And in other table that has a composite primary key:

table auditoria
(
	fecha		date		not null,
	cod_audit	number(10)	not null,
	descripcion	varchar2(256)	not null,
	aplicacion	varchar2(64)	not null,
	equipo		varchar2(16)	not null,
	primary key (fecha, cod_audit, equipo)
)

I get 4 files from generate-entities AuditoriaHome.java, Auditoria.java, AuditoriaList.java and AuditoriaId.java.

When I do seam restart I receive this error among other:

    [javac] c:\DesarrolloJava\Workspace\Teldages\src\action\com\mydomain\Teldages\Auditori
aHome.java:26: isEmpty(java.lang.String) in org.jboss.seam.util.Strings cannot be applied
to (java.util.Date)
    [javac]             if (Strings.isEmpty(getAuditoriaId().getFecha()))

Could anyone help me? Do I have to modify the reveng.xml file? 

Thanks in advance.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107716#4107716

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107716



More information about the jboss-user mailing list