java.lang.ClassCastException: org.apache.log4j.PatternLayout cannot be cast to org.apache.log4j.Layout

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Oracle Community by 501244, 1 year ago
org.apache.log4j.PatternLayout cannot be cast to org.apache.log4j.Layout
via hivmr.com by Unknown author, 2 years ago
org.apache.log4j.PatternLayout cannot be cast to org.apache.log4j.Layout
via liferay.com by Unknown author, 1 year ago
org.apache.log4j.PatternLayout cannot be cast to org.apache.log4j.Layout
java.lang.ClassCastException: org.apache.log4j.PatternLayout cannot be cast to org.apache.log4j.Layout
at org.apache.log4j.xml.DOMConfigurator.parseLayout(DOMConfigurator.java:446)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:186)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)
at com.collaxa.ServerLoggerManager$DOMConfigurator.parseCategory(ServerLoggerManager.java:464)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:781)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
at com.collaxa.ServerLoggerManager.init(ServerLoggerManager.java:69)
at oracle.bpel.services.common.ServicesLogger.initLoging(ServicesLogger.java:602)
at oracle.bpel.services.common.ServicesLogger.getLogger(ServicesLogger.java:183)
at oracle.bpel.services.common.ServicesLogger.canLog(ServicesLogger.java:373)
at oracle.bpel.services.workflow.util.LogUtil.isLoggingEnabled(LogUtil.java:56)
at oracle.bpel.services.workflow.util.LogUtil.isDebugLoggingEnabled(LogUtil.java:67)
at oracle.bpel.services.workflow.util.LogUtil.verifyAndLogDebugMessage(LogUtil.java:138)
at oracle.bpel.services.workflow.query.impl.TaskQueryService.authenticate(TaskQueryService.java:157)
at com.abc.workflow.task.service.ABCTaskService.getWorkFlowContext(ABCTaskService.java:2011)
at com.abc.workflow.task.service.ABCTaskService.customTaskAction(ABCTaskService.java:1647)
at com.abc.workflow.task.facade.runtime.ABCTaskServiceSOAPPortBinding_Tie.invoke_customTaskAction(ABCTaskServiceSOAPPortBinding_Tie.java:910)
at com.abc.workflow.task.facade.runtime.ABCTaskServiceSOAPPortBinding_Tie.processingHook(ABCTaskServiceSOAPPortBinding_Tie.java:1474)
at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:297)
at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:430)
at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:379)
at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:294)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:151)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:200)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.