bendg25 wrote:
To avoid confusion... The last post shows the contents of a file called log4j.properties (that should live in ${yourappserver_home}/webapps/yourapplication/WEB-INF/classes/log4j.properties
I am still confused !
I am deploying an application to Websphere as an EAR file, this consists of a WAR file for the webstuff and a JAR file which contains the session beans and all references to Hibernate.
So Im assuming the properties file should go in the JAR file, but the JAR file has no WEB-INF directory., so ive put the two files in the root of the JAR file
When I try to do something that involves talking to the database then my Websphere log file shows some Hibernate logging (as it always has done even without a log4j file), here is an extract to prove it.
Code:
[12/05/05 10:20:55:331 BST] 00000051 Environment I Hibernate 2.1.8
[12/05/05 10:20:55:331 BST] 00000051 Environment I hibernate.properties not found
[12/05/05 10:20:55:331 BST] 00000051 Environment I using CGLIB reflection optimizer
[12/05/05 10:20:55:347 BST] 00000051 Environment I using JDK 1.4 java.sql.Timestamp handling
[12/05/05 10:20:55:394 BST] 00000051 Configuration I configuring from resource: /hibernate.cfg.xml
[12/05/05 10:20:55:394 BST] 00000051 Configuration I Configuration resource: /hibernate.cfg.xml
[12/05/05 10:20:55:550 BST] 00000051 Configuration I Mapping resource: com/abnamro/att/server/portfolios/domain/PtfPortfolio.hbm.xml
[12/05/05 10:20:55:675 BST] 00000051 Binder I Mapping class: com.abnamro.att.server.portfolios.domain.PtfPortfolio -> PTF_PORTFOLIO
[12/05/05 10:20:55:847 BST] 00000051 Configuration I Mapping resource: com/abnamro/att/server/portfolios/domain/StlStockline.hbm.xml
[12/05/05 10:20:55:909 BST] 00000051 Binder I Mapping class: com.abnamro.att.server.portfolios.domain.StlStockline -> STL_STOCKLINE
[12/05/05 10:20:55:941 BST] 00000051 Configuration I Mapping resource: com/abnamro/att/server/portfolios/domain/PttPortfolioType.hbm.xml
[12/05/05 10:20:55:956 BST] 00000051 Binder I Mapping class: com.abnamro.att.server.portfolios.domain.PortfolioType -> PTT_PORTFOLIO_TYPE
[12/05/05 10:20:55:956 BST] 00000051 Configuration I Mapping resource: com/abnamro/att/server/portfolios/domain/TrdTrade.hbm.xml
[12/05/05 10:20:55:972 BST] 00000051 Binder I Mapping class: com.abnamro.att.server.portfolios.domain.TrdTrade -> TRD_TRADE
[12/05/05 10:20:56:019 BST] 00000051 Configuration I Mapping resource: com/abnamro/att/server/security/domain/UsrUser.hbm.xml
[12/05/05 10:20:56:034 BST] 00000051 Binder I Mapping class: com.abnamro.att.server.security.domain.User -> USR_USER
[12/05/05 10:20:56:034 BST] 00000051 Configuration I Configured SessionFactory: null
[12/05/05 10:20:56:050 BST] 00000051 Configuration I processing one-to-many association mappings
[12/05/05 10:20:56:050 BST] 00000051 Configuration I processing one-to-one association property references
[12/05/05 10:20:56:066 BST] 00000051 Configuration I processing foreign key constraints
[12/05/05 10:20:56:128 BST] 00000051 Dialect I Using dialect: net.sf.hibernate.dialect.OracleDialect
[12/05/05 10:20:56:159 BST] 00000051 SettingsFacto I Use outer join fetching: true
[12/05/05 10:20:56:175 BST] 00000051 NamingHelper I JNDI InitialContext properties:{}
but I cant get it to log at debug level, data retrievals only show the basic sql output
e.g
Code:
[12/05/05 10:21:49:773 BST] 00000052 SystemOut O Hibernate: select this.PTF_PK as PTF_PK2_, this.LOCK_NUM as LOCK_NUM2_, this.NAME as NAME2_, this.DESCRIPTION as DESCRIPT4_2_, this.VOLUME as VOLUME2_, this.CLASS as CLASS2_, this.CREATION_DT as CREATION7_2_, this.PTT_FK as PTT_FK2_, this.USR_FK as USR_FK2_, portfoliot1_.PTT_PK as PTT_PK0_, portfoliot1_.NAME as NAME0_, user2_.USR_PK as USR_PK1_, user2_.DELETED as DELETED1_, user2_.NAME as NAME1_, user2_.DESCRIPTION as DESCRIPT4_1_, user2_.PASSWORD as PASSWORD1_ from PTF_PORTFOLIO this, PTT_PORTFOLIO_TYPE portfoliot1_, USR_USER user2_ where 1=1 and this.PTT_FK=portfoliot1_.PTT_PK(+) and this.USR_FK=user2_.USR_PK(+)