Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFound when use log4j1.x #77

Open
ujjboy opened this issue Apr 28, 2022 · 0 comments
Open

ClassNotFound when use log4j1.x #77

ujjboy opened this issue Apr 28, 2022 · 0 comments
Assignees
Labels
question Further information is requested
Milestone

Comments

@ujjboy
Copy link
Member

ujjboy commented Apr 28, 2022

Describe the bug

code in com/alipay/sofa/middleware/config/log/log4j/log-conf.xml

<appender name="JDKSerializeAppender" class="com.alibaba.common.logging.spi.log4j.DailyRollingFileAppender">

com.alibaba.common.logging.spi.log4j.DailyRollingFileAppender is internal class and will throw ClassNotFoundException when use sofa-rpc 5.8.x and log4j 1.x.

java.lang.ClassNotFoundException: com.alibaba.common.logging.spi.log4j.DailyRollingFileAppender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:247)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778)
at com.alipay.sofa.common.log.factory.LoggerSpaceFactory4Log4jBuilder.doBuild(LoggerSpaceFactory4Log4jBuilder.java:69)
at com.alipay.sofa.common.log.factory.AbstractLoggerSpaceFactoryBuilder.build(AbstractLoggerSpaceFactoryBuilder.java:67)
at com.alipay.sofa.common.log.MultiAppLoggerSpaceManager.createILoggerFactory(MultiAppLoggerSpaceManager.java:319)
at com.alipay.sofa.common.log.MultiAppLoggerSpaceManager.doInit(MultiAppLoggerSpaceManager.java:115)
at com.alipay.sofa.common.log.MultiAppLoggerSpaceManager.init(MultiAppLoggerSpaceManager.java:90)
at com.alipay.sofa.common.log.MultiAppLoggerSpaceManager.getILoggerFactoryBySpaceName(MultiAppLoggerSpaceManager.java:191)
at com.alipay.sofa.common.log.MultiAppLoggerSpaceManager.getLoggerBySpace(MultiAppLoggerSpaceManager.java:177)
at com.alipay.sofa.common.log.MultiAppLoggerSpaceManager.getLoggerBySpace(MultiAppLoggerSpaceManager.java:132)
at com.alipay.sofa.common.log.LoggerSpaceManager.getLoggerBySpace(LoggerSpaceManager.java:44)
at com.alipay.hessian.NameBlackListFilter.judgeLogger(NameBlackListFilter.java:68)

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

  • Project Version [e.g. SOFA-RPC 1.0.0] : sofa-rpc 5.8.x sofa-hessian 3.3.13

Additional context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants