[jboss-user] [JBoss Seam] - Jboss Seam Generates wrong mapping for char(2) type.
bongosdude
do-not-reply at jboss.com
Wed Oct 10 10:08:09 EDT 2007
My table has a column of type char(2), Seam-gen generates a entity with annotation as below:
@Column(name = "sw_type", nullable = false, length = 2)
@NotNull
@Length(max = 2)
public String getSwType() {
return this.swType;
}
But when I deploy my app to jboss, Jboss failed with the following:
09:58:42,765 INFO [EARDeployer] Started J2EE application: file:/C:/tutorial/seamia/opt/jboss-4.2.0.GA/server/default/deploy/my_app.ear
09:58:42,765 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:ear=my_app.ear,unitName=my_app
State: FAILED
Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: sw_type, expected
: varchar(2)
I Depend On:
jboss.jca:service=DataSourceBinding,name=my_appDatasource
What is the Hibernate / JPA annotation for data type char(2)
Please help.
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093504#4093504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093504
More information about the jboss-user
mailing list