logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Coleman <scott.cole...@soltima.com>
Subject RE: Question about the properties file. Please Help.
Date Thu, 15 Nov 2001 07:49:37 GMT
I would have thought that point 2, below is the problem. 
You can TEST this by putting log4j.jar in the classpath of weblogic, by
modifying the start script. Then every ejb will be able to load log4j
classes.  is that you do not have log4j.jar in the classpath of weblogic. If
this works then you need to decide whether you wish to have hot deploy
functionality of log4j, is you do you must package it (i think) with your


-----Original Message-----
From: Ceki Gulcu [mailto:ceki@qos.ch]
Sent: Wednesday, November 14, 2001 11:51 PM
To: Log4J Developers List
Subject: Re: Question about the properties file. Please Help.


LoggingEvent is serializable. It has been seralizable and serialized for a
long time. 
There are two possible reasons for your problem:

1) You are not using the same log4j version on sender side and the MDB side.

2) log4j.jar and consequently org.apache.log4j.spi.LoggingEvent is not
accessible by your MDB.

Hope this helps, Ceki 

At 16:14 14.11.2001 -0600, you wrote:
>Hi, Ceki:
>I wrap the  log4j  into an EJB and config it  to use JMSAppender to publish
>logging message to the JMS server on Weblogic 6.1.  And I wrote a
>MessageDrivenBean (MDB) to consume the message by writing the msg to our
>When the JMS server receives Message with ObjectMessage in it, it delivers
>the Message to my MDB by calling the MDB's onMessage method. When I tried
>to retrieve the the LoggingEvent from the ObjectMessage, I receive an error
>message stating "Error: deserializing object".
>This is what I try to do:
>try {
>  ObjectMessage om = (ObjectMessage)message;       ------------ successful
>  LoggingEvent msg = (LoggingEvent) om.getObject();  ------------ failed
>  String strTokens = (String) msg.getMessage();              -------------
>never get in here
>catch(JMSException jmse)
>  jmse.printStackTrace();
>I checked the MDB spec, that ObjectMessage's getObject() returns
>java.io.Serializable. LogggingEvent is Serializable class.  I don't know
>why it can't be casted to LoggingEvent.
>I wonder is it because LoggingEvent constructor carries a param message
>which is the type of Object.  Object itself is not Serializable. Also, an
>instance variable of LoggingEvent is transient Object message. So, this
>message cannot be serialized due to the key word trancient.  getMessage()
>method returns Object message instead of Serializable.  Do you think these
>may cause the deserialization problem I have experienced?  If yes, how can
>I work around this?  If I change Object to Serializable, then I have to
>change not only LoggingEvent class but Category class as well?  Please
>advise. Thank you very much.
>To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

View raw message