|
Output from the failing test
Received the following output when removing all instances of h2 from the repository, and running mvn again:
Downloading: http://repo1.maven.org/maven2/com/h2database/h2/1.0.20061217/h2-1.0.20061217.pom 661b downloaded Downloading: http://repo1.maven.org/maven2/com/h2database/h2/1.0.20061217/h2-1.0.20061217.jar 952K downloaded 1.0.79 is the latest, so I'll upgrade to that.
It looks like neither 1.0.62 nor 1.0.79 will work. Running "mvn clean install -Ph2 -Djdbc.version=1.0.62" from the root appfuse directory results a test failure in the struts module.
testSaveConflictingUser(org.appfuse.webapp.action.UserActionTest) Time elapsed: 1.064 sec <<< ERROR! org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select password from app_user where username=?]; SQL state [HYT00]; error code [50200]; Timeout trying to lock table APP_USER [HYT00-62]; nested exception is org.h2.jdbc.JdbcSQLException: Timeout trying to lock table APP_USER [HYT00-62] at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:721) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:732) The h2 version now is 1.2.121
Found a potential solution in the Hibernate forums: https://forum.hibernate.org/viewtopic.php?f=1&t=993374&view=next You can try appending MVCC=TRUE to the end of your database url, for example: <jdbc.url>jdbc:h2:/tmp/${db.name};MVCC=TRUE</jdbc.url> |
||||||||||||||||||||||||||||||||
http://markmail.org/message/u7apkayubu3zyh5b#query:HYT00%20h2%20database+page:1+mid:rgkxvpguhoyduhxd+state:results
The error message indicates what version of H2 is used.
When running:
mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
mvn appfuse:full-source
mvn -Ph2
On debian linux (java 1.6), this will result in an error in UserActionTest with the error message:
Timeout trying to lock table APP_USER [HYT00-34]
This would then indicate that an older version of H2 is still used in the archetype.