Arrow_left   Arrow_right
 
  #156

JPADemo update pom dependencies hibernate-em 3.4.0GA and slf4j

    • Status: Fixed
    • Priority: Normal (3)
    • Component: -
    • Type: -
    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
  • Followers
     
    Ico-users Indrajit Raychaudhuri (Assigned To) , github.importer 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on Feb 06, 2010 @ 07:49PM UTC * By github.importer

    User picture

          on Feb 08, 2010 @ 07:21AM UTC * By Indrajit Raychaudhuri

    Milestone set to Lift 1.1-M8
    Time Expenditure
    Loading