log4j included in telnetd-x dependencies : trouble just for me ?

25 views
Skip to first unread message

ricardop

unread,
Jun 23, 2014, 1:39:17 PM6/23/14
to crash...@googlegroups.com
I'm facing some problems setting up a project with crash and probably you have more experience than me on this:

I'm including crash in a war and setting up log4j at server level to have externally defined settings. Although I see that crash ships with common loggings , telnetd-x is including log4j causing me the following errors during my boot process:

log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
log4j:ERROR [java.net.URLClassLoader@4be02ee9] whereas object of type 
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebAppClassLoader=RT Console@70b02e04].
log4j:ERROR Could not instantiate appender named "stdout".
log4j:WARN No appenders could be found for logger (net.wimpi.telnetd.shell.ShellManager).
log4j:WARN Please initialize the log4j system properly.

log4j.properties is set with 

log4j.rootLogger=debug, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%t %-5p %c{2} - %m%n 

and added with -Dlog4j.configuration through jetty-maven-plugin.

I think that if I open up telnetd-x and remove log4j jar the problem goes away but don't like the solution :-(

Any further ideas how I can setup crash+log4j and avoid the problems in my setup ?

Thanks

ricardop

unread,
Jun 23, 2014, 1:57:08 PM6/23/14
to crash...@googlegroups.com
My problem.... only after I noticed that for whatever reason the <scope>provided</scope> had "disappeared" from my parent pom..

Julien Viet

unread,
Jun 23, 2014, 2:25:20 PM6/23/14
to crash...@googlegroups.com, ricardop
Hi Ricardo

are you using the standalone jar ?


--
Julien Viet
www.julienviet.com
> --
> Vous recevez ce message, car vous êtes abonné au groupe Google Groupes CRaSH User Group.
> Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez
> un e-mail à l'adresse crash-users...@googlegroups.com.
> Pour plus d'options, visitez le site https://groups.google.com/d/optout .
>

Reply all
Reply to author
Forward
0 new messages