Issue Details (XML | Word | Printable)

Key: APF-1121
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Matt Raible
Reporter: Daniel Henriksson
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
AppFuse

Upgrade to H2 1.0.79

Created: 16/Dec/08 01:57 AM   Updated: 11/Jan/10 08:43 AM
Component/s: Installation, Persistence Layer
Affects Version/s: 2.0.1
Fix Version/s: 2.1.0-M2

File Attachments: 1. Text File com.mycompany.app.webapp.action.UserActionTest.txt (7 kB)
2. Text File console-output.txt (39 kB)



Sort Order: Ascending order - Click to sort in descending order
Daniel Henriksson added a comment - 16/Dec/08 01:59 AM
According to:

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.

Daniel Henriksson added a comment - 16/Dec/08 02:00 AM
Console output

Daniel Henriksson added a comment - 16/Dec/08 02:00 AM
Output from the failing test

Daniel Henriksson added a comment - 16/Dec/08 02:03 AM
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


Matt Raible added a comment - 16/Dec/08 09:49 AM
1.0.79 is the latest, so I'll upgrade to that.

Matt Raible added a comment - 16/Dec/08 02:36 PM
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)

Adrian Wong added a comment - 11/Jan/10 01:46 AM
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>