logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-660) RunLogback throws ClassCastException
Date Tue, 08 Jul 2014 07:47:34 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14054583#comment-14054583
] 

Remko Popma edited comment on LOG4J2-660 at 7/8/14 7:45 AM:
------------------------------------------------------------

Sorry, I'm not familiar with IntelliJ...
Can you try running this from the command line? That way you have detailed control over the
classpath.

Something like this:
{code}
set CP=disruptor-3.2.1.jar
set CP=%CP%;log4j-api-2.0-rc2.jar
set CP=%CP%;log4j-core-2.0-rc2.jar
set CP=%CP%;log4j-core-2.0-rc2-tests.jar
set CP=%CP%;log4j-1.2.17.jar
set CP=%CP%;slf4j-api-1.7.7.jar
set CP=%CP%;logback-access-1.0.13.jar
set CP=%CP%;logback-classic-1.0.13.jar
set CP=%CP%;logback-core-1.0.13.jar

echo %CP% 
java -cp %CP% -Dverbose=true org.apache.logging.log4j.core.async.perftest.PerfTestDriver java
5
{code}


was (Author: remkop@yahoo.com):
Sorry, I'm not familiar with IntelliJ...
Can you try running this from the command line? That way you have detailed control over the
classpath.

Something like this:
{code}
set CP=disruptor-3.2.1.jar
set CP=%CP%;log4j-api-2.0-rc2.jar
set CP=%CP%;log4j-core-2.0-rc2.jar
set CP=%CP%;log4j-core-2.0-rc2-tests.jar
set CP=%CP%;log4j-1.2.17.jar
set CP=%CP%;slf4j-api-1.7.7.jar
set CP=%CP%;logback-access-1.0.13.jar
set CP=%CP%;logback-classic-1.0.13.jar
set CP=%CP%;logback-core-1.0.13.jar

echo %CP% 
java -cp %CP% -Dverbose=false org.apache.logging.log4j.core.async.perftest.PerfTestDriver
java 5
{code}

> RunLogback throws  ClassCastException
> -------------------------------------
>
>                 Key: LOG4J2-660
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-660
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-rc1
>         Environment: MackBook ME865 , OS X 10.9.3 
>            Reporter: QiChengWei
>            Assignee: Remko Popma
>            Priority: Minor
>
> execute the main in the PerfTestDriver ,  running the  tests
> tests.add(m("perf-logback.xml", LOGBK, "Sync", i));  cause a ClassCastException
> stacktrace as follows:
> Exception in thread "Thread-1" java.lang.ClassCastException: org.slf4j.helpers.SubstituteLogger
cannot be cast to ch.qos.logback.classic.Logger
> 	at org.apache.logging.log4j.core.async.perftest.RunLogback.runThroughputTest(RunLogback.java:37)
> 	at org.apache.logging.log4j.core.async.perftest.PerfTest.runTest(PerfTest.java:182)
> 	at org.apache.logging.log4j.core.async.perftest.MtPerfTest$1.run(MtPerfTest.java:46)
> 	at java.lang.Thread.run(Thread.java:745)
> SLF4J: The following set of substitute loggers may have been accessed
> SLF4J: during the initialization phase. Logging calls during this
> SLF4J: phase were not honored. However, subsequent logging calls to these
> SLF4J: loggers will work as normally expected.
> SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
> SLF4J: org.apache.logging.log4j.core.async.perftest.RunLogback



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message