-
Apr 14th, 2012, 02:54 AM
#21
So I posted on the Hibernate Forum, this time using the HSQLDB file type instead of mem as it shows more in the log.
https://forum.hibernate.org/viewtopic.php?f=1&t=1015149
I still wonder if the Spring Roo setup of
<property name="hibernate.hbm2ddl.auto" value="create"/>
in the persistence.xml file is really being used as the HSQLDB log shows all these drop if exists statements.
Last edited by stephaneeybert; Apr 14th, 2012 at 03:08 AM.
Stephane
-
Apr 14th, 2012, 04:07 AM
#22
I wonder why wanting to try running the integration test in HSQLDB instead of MySql.
Would that give more information on the cause of the original unique attribute not being seen by Roo ?
Stephane
-
Apr 19th, 2012, 05:20 AM
#23
This time the process of performing the test is very slow.
The log of hsqldb shows the following output:
/*C167*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
It adds one such output entry every few minutes.
It feels like the perform test command could take the whole day (it is now running for at least half an hour).
Stephane
-
Apr 19th, 2012, 05:46 AM
#24
I went back to trying with MySql again as my attempt at using hsqldb did not go very far.
When I run the tests from the shell with the command: mvn clean install
I get a lot of these in the console output:
[WARNING] this affected type is not exposed to the weaver: com.learnintouch.lms.data.domain.Sms [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: com.learnintouch.lms.data.domain.Sms [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: com.learnintouch.lms.data.domain.Sms [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: com.learnintouch.lms.data.domain.Sms [Xlint:typeNotExposedToWeaver]
In fact I get one for each each domain class.
And some 87 tests out of 1026 fail due to the fact that they have a unique constraint on a field that is not their primary id.
Here is again the exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityCons traintViolationException: Duplicate entry '2297' for key 'user_id_2'
Stephane
-
Apr 21st, 2012, 11:40 PM
#25
So I tried the H2 database and all tests passed fine.
Tests run: 1026, Failures: 0, Errors: 0, Skipped: 0
No wonder, the unique constraint that exists in the MySql table structure does not exist in the Spring Roo generated java source code and therefore H2 is not botered by any of it.
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
-
Forum Rules