[jboss-user] [JBoss Seam] - Re: Intergration with Maven2? And Seam Generating Test Cas

2007-11-30 Thread vcordaro12
1),  yes entities are gnerated from a datasource, however I want to be able to 
execute generate-entities from my pom.  So that in my nightly build process I 
can generate my entities. 


2) so in our nightly build process my entities are created from our automated 
build process, continuum.

3). There are several tools, revgen, salto-db which will create test cases to 
test the entities and DAO's.



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4109418#4109418

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109418
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Intergration with Maven2? And Seam Generating Test Cases?

2007-11-28 Thread vcordaro12
First off I am trying to get seam intergrated into my maven pom so that I can 
generate-entites directly from my pom.  I saw in the documentation that it 
provided all the dependency information but nothing on how to tie seam into 
your build process.

Also will Seam generate my test cases?   Or do I have to write them all by hand 
and just use TestNG to execute them?   I see that generate-entites created the 
location for the test files, just no test files.


Thanks
Vince

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4108663#4108663

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108663
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Char vs. VarChar

2007-11-27 Thread vcordaro12
For some reason when a column in my postgres database is defined as CHAR(*), it 
will not resolve properly when validating the generated bean against the 
database.  I ended up having to change my datatypes to VARCHARS.   Anyone know 
anything about this?  

11:56:48,412 INFO  [TableMetadata] table found: adlib.profile_changelog
11:56:48,412 INFO  [TableMetadata] columns: [pcl_text, pcl_id, pcl_flags, 
pcl_prof_id, pcl_datetime]
11:56:48,414 WARN  [ServiceController] Problem starting service 
persistence.units:ear=adlib_persistence_generator.ear,unitName=adlib_persistence_generator
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong 
column type: pcl_flags, expected: varchar(10)
at 
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
at 
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
at 
org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4108189#4108189

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108189
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Error Compiling generated entities from Postgre

2007-11-26 Thread vcordaro12
I have followed the instructions to setup seam by using ./seam setup, inputing 
all the proper values to connect to my local postgres database.  Then I run 
./seam create-project and then ./seam generate-entities.  All these seem to go 
through fine.  

My entities get created and it seems to introspect the database with ease, 
however when I go to run ./seam restart it fails when it tries to compile the 
generated entities.  I get messages about isEmpty in about 5 of my classes.  

All seem to refer to the fact that you cannot have a isEmptry on something that 
is not a string.

If I remove these if statements all together then it complains about my 
database connection.  Not sure what is going on here since it connected to the 
database fine when it generated my entities.  

Do I need to setup a connection pool in JBoss or is that automatically done?

Thanks in advance..

Vince

restart:
 [echo] Restarting project 'adlib_persistence_serivce_generator'

init:
[mkdir] Created dir: 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.jar
[mkdir] Created dir: 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.ear
[mkdir] Created dir: 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.war
[mkdir] Created dir: 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/dist

compile:
[javac] Compiling 108 source files to 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.jar
[javac] 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/src/action/com/echostorm/adlib/advis/persistence/beans/crud/AnnotationVwHome.java:26:
 isEmpty(java.lang.String) in org.jboss.seam.util.Strings cannot be applied to 
(java.lang.Integer)
[javac] if 
(Strings.isEmpty(getAnnotationVwId().getAnnotationId()))
[javac]^
[javac] 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/src/action/com/echostorm/adlib/advis/persistence/beans/crud/AnnotationVwHome.java:28:
 isEmpty(java.lang.String) in org.jboss.seam.util.Strings cannot be applied to 
(java.lang.Integer)
[javac] if (Strings.isEmpty(getAnnotationVwId().getCaptureId()))
[javac]^
[javac] 
/Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/src/action/com/echostorm/adlib/advis/persistence/beans/crud/AnnotationVwHome.java:34:
 isEmpty(java.lang.String) in org.jboss.seam.util.Strings cannot be applied to 
(java.io.Serializable)
[javac] if 
(Strings.isEmpty(getAnnotationVwId().getAnnotationTextIndex()))


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107794#4107794

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107794
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Error Compiling generated entities from Postgre

2007-11-26 Thread vcordaro12
The fullTextIndex is a tsvector in the database

 ALTER TABLE adlib.annotation_tsearch DROP COLUMN full_text_index;

ALTER TABLE adlib.annotation_tsearch ADD COLUMN full_text_index tsvector;
ALTER TABLE adlib.annotation_tsearch ALTER COLUMN full_text_index SET STORAGE 
EXTENDED;

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107845#4107845

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107845
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Error Compiling generated entities from Postgre

2007-11-26 Thread vcordaro12
I seemed to have resolved the database connection problem by fixing my jdbc url 
in seam-gen/build.properties   it seems that somehow I got extra backslashes in 
it.  

However my new error has to do with the definition of a column type.

12:47:44,370 INFO  [SchemaValidator] Running schema validator
12:47:44,370 INFO  [SchemaValidator] fetching database metadata
12:47:44,410 INFO  [TableMetadata] table found: adlib.annotation
12:47:44,411 INFO  [TableMetadata] columns: [capture_id, end_time, at_name, 
description, content, updated_on, updated_by, start_time, name, a_id]
12:47:44,424 INFO  [TableMetadata] table found: adlib.annotation_tsearch
12:47:44,424 INFO  [TableMetadata] columns: [full_text_index, a_id]
12:47:44,426 WARN  [ServiceController] Problem starting service 
persistence.units:ear=adlib_persistence_serivce_generator.ear,unitName=adlib_persistence_serivce_generator
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong 
column type: full_text_index, expected: bytea
at 
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
at 
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
at 
org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
  



Here is the AnnotationTSearch Entity:

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.validator.NotNull;

/**
 * AnnotationTsearch generated by hbm2java
 */
@Entity
@Table(name = annotation_tsearch)
public class AnnotationTsearch implements java.io.Serializable {

private int AId;
private Annotation annotation;
private Serializable fullTextIndex;

public AnnotationTsearch() {
}

public AnnotationTsearch(int AId, Annotation annotation) {
this.AId = AId;
this.annotation = annotation;
}
public AnnotationTsearch(int AId, Annotation annotation,
Serializable fullTextIndex) {
this.AId = AId;
this.annotation = annotation;
this.fullTextIndex = fullTextIndex;
}

@Id
@Column(name = a_id, unique = true, nullable = false)
@NotNull
public int getAId() {
return this.AId;
}

public void setAId(int AId) {
this.AId = AId;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = a_id, unique = true, nullable = false, insertable 
= false, updatable = false)
@NotNull
public Annotation getAnnotation() {
return this.annotation;
}

public void setAnnotation(Annotation annotation) {
this.annotation = annotation;
}

@Column(name = full_text_index)
public Serializable getFullTextIndex() {
return this.fullTextIndex;
}

public void setFullTextIndex(Serializable fullTextIndex) {
this.fullTextIndex = fullTextIndex;
}

}


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107841#4107841

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107841
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Error Compiling generated entities from Postgre

2007-11-26 Thread vcordaro12
Turns out that tsvector is a custom defined postgres datatype.  How does seam 
handle unknown datatypes, like a postgres Geometry Datatype?  Can I write a 
custom handler for these types or do I need to?

Vince

Thanks again for the prompt responses...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107848#4107848

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107848
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Defining Specific Tables to generate entities from

2007-11-26 Thread vcordaro12
I don't want seam-gen generate entities to do the entire schema I want it only 
to introspect specific tables.  Is this possible?  If so where do I configure 
it?

Thanks

Vince

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107873#4107873

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107873
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Error Compiling generated entities from Postgre

2007-11-26 Thread vcordaro12
I think I found my own answer.  It seems like I maybe able to use 
seam-gen.reveng.xml file to define that unknown datatype.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107875#4107875

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107875
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user