JPADemo update pom dependencies hibernate-em 3.4.0GA and slf4j
Opening an issue at Indrajit's request to update JPADemo/spa/pom.xml to use a newer version of hibernate-entitymanager 3.4.0.GA and resolve slf4j-1.4.2 impl dependencies.
The hibernate-entitymanager 3.4.0.GA version update causes an update to hibernate-core to 3.3.0.SP1 which **fixes auto-increment column problem with MySQL and H2 databases**, which was present in the older hibernate 3.2.4 (which dated back to before they called it hibernate-core) upon which hibernate-entitymanager 3.3.1 was depending.
Below is the configuration that worked for me.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.4.0.GA</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.4.2</version>
</dependency>
Had to manually install slf4j-simple/1.4.2 into to my local maven repo to avoid runtime exception for missing org.slf4j.impl.StaticLoggerBinder. By putting the slf4j-simple dependency in the spa/pom.xml this allows users to swap out different impl providers (for example slf4j-log4j12) as they see fit, in fact it might not hurt to have an example of switching this over to slf4j-log4j12 or some other provider, perhaps even commented out just below the other one right in the pom.xml such as:
<!--
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.4.2</version>
</dependency>
-->
Thanks! Troy
The hibernate-entitymanager 3.4.0.GA version update causes an update to hibernate-core to 3.3.0.SP1 which **fixes auto-increment column problem with MySQL and H2 databases**, which was present in the older hibernate 3.2.4 (which dated back to before they called it hibernate-core) upon which hibernate-entitymanager 3.3.1 was depending.
Below is the configuration that worked for me.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.4.0.GA</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.4.2</version>
</dependency>
Had to manually install slf4j-simple/1.4.2 into to my local maven repo to avoid runtime exception for missing org.slf4j.impl.StaticLoggerBinder. By putting the slf4j-simple dependency in the spa/pom.xml this allows users to swap out different impl providers (for example slf4j-log4j12) as they see fit, in fact it might not hurt to have an example of switching this over to slf4j-log4j12 or some other provider, perhaps even commented out just below the other one right in the pom.xml such as:
<!--
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.4.2</version>
</dependency>
-->
Thanks! Troy
Leave a comment
on 2010-02-06 19:49 *
By github.importer
Imported from GitHub: http://github.com/dpp/liftweb/issues/156/find