I'm using Spring Tool Suite 3.5.1 to develop a Spring Roo 1.2.5 project. I have generated entities (without Active Record) with EclipseLink (JPA), services (implementations and intefaces) and a simple controller mainly with these commands:
database reverse engineer --schema ssigdl --package ~.domain --repository --testAutomatically
service all --interfacePackage ~.service --classPackage ~.service.impl
web mvc setup
controller class --class ~.web.CustomPageController --preferredMapping /custompage
Then I try to use maven to deploy with this goal:
- tomcat7:deploy
When the process arrives to the part of tests, it happens these errors
Tests in error:
testFindEntries(com.ssigdl.sirc.domain.SsiArticuloIntegrationTest):
(..)
testFindAll(com.ssigdl.sirc.domain.SsiArticuloIntegrationTest):
(..)
testCount(com.ssigdl.sirc.domain.SsiArticuloIntegrationTest):
(..)
testFind(com.ssigdl.sirc.domain.SsiArticuloIntegrationTest):
(..)
testSave(com.ssigdl.sirc.domain.SsiArticuloIntegrationTest):
(..)
testDelete(com.ssigdl.sirc.domain.SsiArticuloIntegrationTest):
And a block of errors appear one per entity created. Finally it appears the error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project sirc: There are test failures.
If I set the checkbox Skip tests in the Run Configurations Window, the compilation process goes successfully. My problem is:
- Why the integration tests are failing?
- Did I have a mistake in the spring roo commands?
- Does this error affect in some way to my application?
Update
This is an image of the error thrown by Spring Tool Suite
I can't click on the dots
Solution
I followed @mvivo instructions and I found that I had this error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ssigdl.sequence' doesn't exist
In this link I found the answer. Basically the entity has this annotation
@GeneratedValue(strategy = GenerationType.AUTO)
Which combined with MySQL is causing errors, so I used the following annotation instead:
@GeneratedValue(strategy = GenerationType.IDENTITY)
Thanks for your help!