Setup Hibernate Log4j on Eclipse (Basic Tutorial)

| Posted by watashii | Filed under Java, Programming

Download the Libraries

Hibernate

Download the Hibernate release bundle.  I’m using 3.5.6 Final.  Manually extract the following files from the downloaded zip/tar.gz archive:

  • - hibernate-distribution-3.5.6-Final\lib\required\antlr-2.7.6.jar
  • - hibernate-distribution-3.5.6-Final\lib\required\commons-collections-3.1.jar
  • - hibernate-distribution-3.5.6-Final\lib\required\dom4j-1.6.1.jar
  • - hibernate-distribution-3.5.6-Final\lib\required\javassist-3.9.0.GA.jar
  • - hibernate-distribution-3.5.6-Final\lib\required\jta-1.1.jar
  • - hibernate-distribution-3.5.6-Final\lib\required\slf4j-api-1.5.8.jar

Grabbed the JPA library so I can use annotations with my Hibernate:

  • - hibernate-distribution-3.5.6-Final\lib\jpa\hibernate-jpa-2.0-api-1.0.0.Final.jar

I also grabbed a sample log4j.properties file from the tutorials section:

  • - hibernate-distribution-3.5.6-Final\project\tutorials\web\src\main\resources\log4j.properties

SLF4J

Download SLF4J.  I downloaded slf4j 1.5.8 because Hibernate uses this version for its logging.  In order to use your chosen logging framework, i.e. Log4j,  manually extract the following files from the downloaded zip/tar.gz archive:

  • - slf4j-1.5.8\slf4j-log4j12-1.5.8.jar

Log4J

Download Apache Log4J.  I’m using the latest version, log4j 1.2.16.  Manually extract the following files from the downloaded zip/tar.gz archive:

  • - apache-log4j-1.2.16\log4j-1.2.16.jar

Read the rest of this entry »

Tags: , , , , ,

Subversion – Allow Author Name Logging

| Posted by watashii | Filed under Java, Programming, Software

To log the author name when trying to check-in files using Subversive/Eclipse over SVN, switch to SVN Repository Exploring perspective > right-click on your repository > edit the Location Properties > Advanced tab > and enable Override author name:


Read the rest of this entry »

Tags: , , , ,