Announcement Announcement Module
Collapse
No announcement yet.
Roo with pagila PostgreSQL database Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo with pagila PostgreSQL database

    Hi,

    I am using:
    - STS 2.8
    - Roo 1.2M1 (also tried with 1.1.5)
    - PostgreSQL 8.4 with pagila database [0]

    I am trying to build an application using pagila PostgreSQL sample database with DBRE.

    I executed the following Roo script:
    Code:
    project --topLevelPackage com.xxx.yyy.spring.examples
    persistence setup --provider HIBERNATE --database POSTGRES
    database introspect --schema public
    database reverse engineer --schema public --package ~.domain
    web mvc setup 
    web mvc all --package ~.web
    quit
    Then finally try to run it within tomcat (mvn tomcat:run). The web app cannot be deployed and I got the following exception:

    Code:
    ...
    Caused by: org.hibernate.MappingException: Could not determine type for: java.sql.Array, at table: film, for columns: [org.hibernate.mapping.Column(special_feat
    ures)]
            at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:306)
            at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)
            at org.hibernate.mapping.Property.isValid(Property.java:217)
            at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
            at org.hibernate.mapping.RootClass.validate(RootClass.java:235)
            at org.hibernate.cfg.Configuration.validate(Configuration.java:1362)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1865)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
            ... 57 more
    The full stacktrace is available here [1]. The database schema export from DBRE is here [2].

    [0] - http://pgfoundry.org/projects/dbsamples/
    [1] - Attachment
    [2] - Attachment


    Can you please help to troubleshoot this issue?

    Thanks,
    Richard.
    Attached Files

  • #2
    It's very possible that Hibernate doesn't support the field type. Try specifying the --includeNonPortableAttributes option on the database reverse engineer command, or use the JPA 2 reference implementatiom, EclipseLink, as the provider.
    Alan

    Comment


    • #3
      Alan,

      I was able to get the initial web application running with ECLIPSELINK provider and specifying --includeNonPortableAttributes.

      Thanks,
      Richard.

      Comment

      Working...
      X