12 Replies Latest reply on Oct 16, 2007 1:17 PM by bongos

    Jboss Seam Generates wrong mapping for char(2) type.

    bongos Newbie

      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)
      @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:

      What is the Hibernate / JPA annotation for data type char(2)

      Please help.