Bugs item #568668, was opened at 2002-06-13 13:13
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=568668&group_id=22866
Category: JBossServer
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Misha Rybalov (mrybalov)
Assigned to: Nobody/Anonymous (nobody)
Summary: Log4J conflict between JBoss and EJBs
Initial Comment:
We have recently decided to port our EJBs from Orion to JBoss and
have run into the following difficulty:
We are using Log4J in our
EJBs and classes for debugging information. When we try to use
the same beans with JBoss, we get the following error message
from JBoss:
--------------------------------------------------------------------------
ERROR: invalid console appender config
detected, console stream is looping
--------------------------------------------------------------------------
We are using
Log4J v1.1.2 and JBoss 3.0 is using v1.2.2. Accoding to Apache,
Log4J 1.2.3 is now available. I tried replacing our log4j.jar (1.1.2)
inside JBoss (C:\jboss-3.0.0\server\default\lib) with the one that
we're using but that didn't help. I tried replacing C:\jboss-
3.0.0\lib\log4j-boot.jar with our log4.jar (renamed it to log4j-
boot.jar) but that didn't work either. I tried to use the log4.properties
files that come with JBoss (C:\jboss-3.0.0\src\jboss-
all\console\src\resources) but that didn't help
either.
Anybody ran into this
before?
System:
Win2K
JDK1.3
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-06-28 15:02
Message:
Logged In: YES
user_id=175228
I mean show the config your trying to install. Your not going to
be able to configure an appender for System.out or
System.err as the JBoss server owns that. The server log file
to configure is under server/default/conf/log4j.xml, not the
log4j.properties file you mention.
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-06-28 12:22
Message:
Logged In: YES
user_id=175228
I mean show the config your trying to install. Your not going to
be able to configure an appender for System.out or
System.err as the JBoss server owns that. The server log file
to configure is under server/default/conf/log4j.xml, not the
log4j.properties file you mention.
----------------------------------------------------------------------
Comment By: Misha Rybalov (mrybalov)
Date: 2002-06-17 14:02
Message:
Logged In: YES
user_id=562787
Here is how we're using Log4J. We have a wrapper class that wraps
Log4J functionality. That class is called "Log" and we instantiate a static
member of this class in our bean:
private static Log sLog = new
Log( DSCResolverBean.class );
private static final boolean log =
sLog.isEnabledFor(Log.DEBUG );
We use this wrapper class
like this:
if(log) sLog.debug("my debugging comment goes
here");
The debug method in the wrapper class is defined
as:
public void debug( String pMessage ) {
category.debug(
pMessage );
}
The category class used inside the debug
method above is an instance of org.apache.log4j.Category.
----------------------------------------------------------------------
Comment By: James Cooley (jcooley)
Date: 2002-06-17 03:28
Message:
Logged In: YES
user_id=338020
I copied the log4j.xml sample from JBoss and included the
root tag around my appenders. Removing the root tag got rid
of problem.
<root> <!-- remove this --!>
<appender-ref ref="CONSOLE_M"/>
<appender-ref ref="FILE_M"/>
</root><!-- remove this --!>
James
----------------------------------------------------------------------
Comment By: James Cooley (jcooley)
Date: 2002-06-14 06:30
Message:
Logged In: YES
user_id=338020
I'm getting this problem with a servlet that loads its own
log4j.xml (that worked with JB 2.4).
I got rid of this initially by removing the CONSOLE appender
from my app (I had both file and console). I tried the
latest log4j release (version 1.2.4, June 12th, 2002) and
it's not fixed. Unfortunately it isn't possible to go back
to the version of log4j that works with JBoss 2.4.
I couldn't find anything on google but the log4j list does
have a lot of unsolved problems for apps with multiple
output streams.
If you have any ideas maybe we can kick them around.
James
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-06-13 19:29
Message:
Logged In: YES
user_id=175228
Attach a sample ejb that illustrates how you are trying to use log4j.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=568668&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development