Results 1 to 3 of 3

Thread: Roo with pagila PostgreSQL database

  1. #1

    Question 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] - mvn-tomcat-log.zip
    [2] - pagila-schema.zip


    Can you please help to troubleshoot this issue?

    Thanks,
    Richard.

  2. #2
    Join Date
    Dec 2005
    Posts
    935

    Default

    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
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3

    Default

    Alan,

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

    Thanks,
    Richard.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •