-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: log4j problem
PostPosted: Sat Jan 31, 2004 4:12 pm 
Newbie

Joined: Sat Jan 31, 2004 3:56 pm
Posts: 8
Hi,

The case:
I am using hibernate 2.1 against informix 9.x on a SunONE 7 application server. When I try to enable the logging I put the log4j.jar and the log4j.properties (from hibernate) in to my classpath. (I do this by putting both of them in the root of my ear and having the log4j.jar in the MANIFEST of my ejb.jar).

the problem:
when i run the application i get following exception:

[31/Jan/2004:20:34:25] FINE ( 2508): EJB5018: Some unmapped exception occurred : [{0}]
javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: org/apache/log4j/Layout
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: org/apache/log4j/Layout
at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:364)
at javax.rmi.CORBA.Util.wrapException(Util.java:277)
at be.vlaanderen.studietoelagen.ejb.services.common._NawService_Stub.getNawRrnr(Unknown Source)
at be.vlaanderen.studietoelagen.ejb.facade.NawFacadeBean.getNawRrnr(NawFacadeBean.java:128)
at be.vlaanderen.studietoelagen.ejb.facade.NawFacadeBean_EJBObjectImpl.getNawRrnr(NawFacadeBean_EJBObjectImpl.java:81)
at be.vlaanderen.studietoelagen.ejb.facade._NawFacadeBean_EJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:569)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:211)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:113)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:83)
at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(ServicableWrapper.java:25)
at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(FastThreadPool.java:283)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.rmi.RemoteException: org/apache/log4j/Layout
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:494)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:564)
at be.vlaanderen.studietoelagen.ejb.services.common.NawServiceBean_EJBObjectImpl.getNawRrnr(NawServiceBean_EJBObjectImpl.java:29)
at be.vlaanderen.studietoelagen.ejb.services.common._NawService_Stub.getNawRrnr(Unknown Source)
... 11 more
javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: org/apache/log4j/Layout
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1898)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1801)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1613)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
at be.vlaanderen.studietoelagen.ejb.facade.NawFacadeBean_EJBObjectImpl.getNawRrnr(NawFacadeBean_EJBObjectImpl.java:85)
at be.vlaanderen.studietoelagen.ejb.facade._NawFacadeBean_EJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:569)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:211)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:113)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:83)
at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(ServicableWrapper.java:25)
at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(FastThreadPool.java:283)
at java.lang.Thread.run(Thread.java:536)


I tried to remove the log4j.jar then i get no exception but hibernate then does not use the log4j.properties file. I also tried some other ways to put them in my classpath, always with the same error.


Does anyone have a clue ! I am looking at this problem for while now and i am not sure if this is a hibernate vs sunONE problem.

_________________
Thank you in advance
Yvan


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 8:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
All these remote exceptions are not very helpful ... try finding the real exception, your server should log it somewhere in the server logs I suppose. Most likely the problem are different conflicting log4j jars I suppose


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 5:22 am 
Newbie

Joined: Sat Jan 31, 2004 3:56 pm
Posts: 8
gloeglm wrote:
All these remote exceptions are not very helpful ... try finding the real exception, your server should log it somewhere in the server logs I suppose. Most likely the problem are different conflicting log4j jars I suppose


Quote:
I have looked in every log file available but there is no more information available. The only exception explanation is the one above. Could the problem be caused because SunONE uses jdk 1.4 logging ?

_________________
Thank you in advance
Yvan


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2004 5:36 am 
Newbie

Joined: Sat Jan 31, 2004 3:56 pm
Posts: 8
The code works fine when I remove log4j.jar from my classpath. Yet, hibernate does not use log4j then for logging purposes. there is only 1 log4j.jar in the classpath, serverpath, ... so with wat can it conflict.

_________________
Thank you in advance
Yvan


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2004 5:48 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Try to play with commons-logging.proeprties to switch between JDK log and log4j log.
Be sure log4j.properties is really read by log4j (If I remember weel, it's logged when failing).

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2004 6:21 am 
Newbie

Joined: Sat Jan 31, 2004 3:56 pm
Posts: 8
emmanuel wrote:
Try to play with commons-logging.proeprties to switch between JDK log and log4j log.
Be sure log4j.properties is really read by log4j (If I remember weel, it's logged when failing).


Quote:
I cannot find a file commons-logging.properties. only the logging.properties under jre/lib from JDK1.4 ???

_________________
Thank you in advance
Yvan


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2004 6:33 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This file must not be in any /lib directory.

It must be in your application classpath. Hibernate use common logging to log. Commons logging delegate the work to either JDK 1.4 or log4j.
you can find more (and better) information in the commons-logging doc http://jakarta.apache.org/commons/logging.html

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2004 9:32 am 
Newbie

Joined: Sat Jan 31, 2004 3:56 pm
Posts: 8
I tried to set the commons-logging.properties diferrent ways in my classpath. When I deploy everything under Websphere and configure hibernate logging as described in the manual -> IT WORKS FINE.

If I do exactly the same on SunONE 7 I still get the exception which is not very good in explaining the real problem -;). So I guess my new questions should be :

Does anyone ever tried to configure log4j logging for hibernate on SunONE 7 ?

_________________
Thank you in advance
Yvan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.