Nov 8th, 2012, 03:44 AM
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:
I thus solved the issue by using the attribute --includeNonPortableAttributes
Nov 8th, 2012, 04:00 AM
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.