Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Maven build hangs on simple Roo script

  1. #11
    Join Date
    Mar 2008
    Posts
    253

    Default

    I removed as many tables as I could to narrow down the issue, until I was left with only one table: admin

    And the issue still showed up.

    Only this time, the Maven hang was so brief it didn't really hang.

    And running Maven with the -e option showed the exception as being:

    Caused by: org.hibernate.HibernateException: Wrong column type in freeze.admin for column profile. Found: text, expected: varchar(255)
    at org.hibernate.mapping.Table.validateColumns(Table. java:283)
    at org.hibernate.cfg.Configuration.validateSchema(Con figuration.java:1343)
    at org.hibernate.tool.hbm2ddl.SchemaValidator.validat e(SchemaValidator.java:139)
    at org.hibernate.impl.SessionFactoryImpl.<init>(Sessi onFactoryImpl.java:378)
    at org.hibernate.cfg.Configuration.buildSessionFactor y(Configuration.java:1872)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityMan agerFactory(Ejb3Configuration.java:906)

    I then did a search on the subject:
    Found: text, expected: varchar(255)

    And ended up on a previous forum thread of mine at:
    http://forum.springsource.org/showth...ith-text-field

    Stuuuuuupid :-)

    I thus solved the issue by using the attribute --includeNonPortableAttributes
    Stephane

  2. #12
    Join Date
    Mar 2008
    Posts
    253

    Default

    Well, I thought I had solved the issue. But no, it's not the case.

    When running the show this time on all 117 tables, instead of just the one admin table, Maven still hangs.

    This time it is for another exception:

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityCons traintViolationException: Column 'elearning_question_id' cannot be null

    Which is another issue I had stumbled upon in the past, namely that Roo generated tests do not handle foreign key constraints in their data on demand helpers, see http://forum.springsource.org/showth...-tables-schema and http://forum.springsource.org/showth...ts-(Cascading)

    The thing that made it not so obvious was the time Maven spent hanging.

    To sum it up, we cannot run the integration tests on a reversed engineered real world database schema if we don't hand code the integration tests to take care of the foreign key constraints in the data on demand.
    Stephane

Posting Permissions

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