-> Use the Log4j 2 API instead of Log4j 1. That is the plan but due to time constraints for a while we want to upgrade using bridge.
-----Original Message----- From: Gary Gregory <garydgreg...@gmail.com> Sent: Tuesday, March 8, 2022 6:57 PM To: Log4J Users List <log4j-user@logging.apache.org> Subject: Re: Log4j1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup *** External email: Verify sender before opening attachments or links *** Use the Log4j 2 API instead of Log4j 1. Gary On Tue, Mar 8, 2022, 08:20 Pooja Pandey <pooja.pan...@asg.com.invalid> wrote: > -> Please consider the simpler long term path of updating your call > -> sites > to the Log4j 2 API. > > I am sorry but I could not under what do you mean by above. An example > might help. > > -----Original Message----- > From: Gary Gregory <garydgreg...@gmail.com> > Sent: Tuesday, March 8, 2022 6:21 PM > To: Log4J Users List <log4j-user@logging.apache.org> > Subject: Re: Log4j1.x bridge error: Unable to create Lookup for bundle > java.lang.ClassCastException: class > org.apache.logging.log4j.core.lookup.ResourceBundleLookup > > *** External email: Verify sender before opening attachments or links > *** > > > Well done then ;-) > > Please consider the simpler long term path of updating your call sites > to the Log4j 2 API. > > Gary > > Gary > > On Tue, Mar 8, 2022, 07:20 Pooja Pandey <pooja.pan...@asg.com.invalid> > wrote: > > > -> What does your Log4j configuration file look like? > > > > I have figured adding log4j-web.jar into my libs fixes below issue. > > I have added following 2 jars as well log4j-jcl.jar, log4j-jul.jar. > > > > -----Original Message----- > > From: Gary Gregory <garydgreg...@gmail.com> > > Sent: Tuesday, March 8, 2022 4:18 PM > > To: Log4J Users List <log4j-user@logging.apache.org> > > Subject: Re: Log4j1.x bridge error: Unable to create Lookup for > > bundle > > java.lang.ClassCastException: class > > org.apache.logging.log4j.core.lookup.ResourceBundleLookup > > > > *** External email: Verify sender before opening attachments or > > links > > *** > > > > > > Hi Pooja, > > > > What does your Log4j configuration file look like? > > > > Gary > > > > On Tue, Mar 8, 2022, 01:48 Pooja Pandey > > <pooja.pan...@asg.com.invalid> > > wrote: > > > > > Hi, > > > > > > > > > I am trying to migrate from log4j1.x to log4j2.17.2 using log4j1.x > > > bridge approach. I am getting below ClassCastException error message. > > > Please let me know if you have any idea how to fix this. > > > > > > 2022-03-08 01:41:17,023 http-nio-8088-exec-9 ERROR Unable to > > > create Lookup for bundle java.lang.ClassCastException: class > > > org.apache.logging.log4j.core.lookup.ResourceBundleLookup > > > at java.lang.Class.asSubclass(Class.java:3404) > > > at > > > > > org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator. > > java:79) > > > at > > > > > org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator. > > java:100) > > > at > > > > > org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(Ab > > st > > ractConfiguration.java:133) > > > at > > > > > org.apache.log4j.config.Log4j1Configuration.<init>(Log4j1Configurati > > on > > .java:43) > > > at > > > > > org.apache.log4j.config.PropertiesConfiguration.<init>(PropertiesCon > > fi > > guration.java:99) > > > at > > > > > org.apache.log4j.config.PropertiesConfiguration.<init>(PropertiesCon > > fi > > guration.java:110) > > > at > > > > > org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurat > > or > > .java:300) > > > at > > > > > org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurat > > or > > .java:276) > > > at > > > > > org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurat > > or > > .java:388) > > > at > > > > > org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator > > .j > > ava:183) > > > at > > > com.Custom.tools.logging.CustomLogger.resetURL(CustomLogger.java:408) > > > at > > > > > com.Custom..impl.JavaLogPropertyHelper.updateJavaLogPropertiesFromLi > > st > > (JavaLogPropertyHelper.java:226) > > > at > > > > > com.Custom..impl.CustomServiceConfigurationImpl.SetHostProperties(Cu > > st > > omServiceConfigurationImpl.java:293) > > > at > > > > > com.Custom.Comm.CommToICustomServiceConfiguration.setHostProperties( > > Co > > mmToICustomServiceConfiguration.java:642) > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > > Method) > > > at > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl > > .j > > ava:62) > > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce > > ss > > orImpl.java:43) > > > at java.lang.reflect.Method.invoke(Method.java:498) > > > at > > com.sun.xml.ws.util.Trampoline.invoke(MethodUtil.java:52) > > > at > > > sun.reflect.GeneratedMethodAccessor142.invoke(Unknown > > > Source) > > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce > > ss > > orImpl.java:43) > > > at java.lang.reflect.Method.invoke(Method.java:498) > > > at > > com.sun.xml.ws.util.MethodUtil.invoke(MethodUtil.java:77) > > > at > > > com.sun.xml.ws.api.server.MethodUtil.invoke(MethodUtil.java:34) > > > at > > > > > com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver > > .j > > ava:220) > > > at > > > com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:119) > > > at > > > > > com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTu > > be > > .java:58) > > > at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1106) > > > at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1020) > > > at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:989) > > > at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:847) > > > at > > > com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:389) > > > at > > > > > com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAda > > pt > > er.java:838) > > > at > > > com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:392) > > > at > > > > > com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(Ser > > vl > > etAdapter.java:195) > > > at > > > > > com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServ > > le > > tDelegate.java:131) > > > at > > > > > com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSSer > > vl > > etDelegate.java:167) > > > at > > > > com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java: > 51) > > > at > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:681) > > > at > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:764) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App > > li > > cationFilterChain.java:227) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Application > > Fi > > lterChain.java:162) > > > at > > > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App > > li > > cationFilterChain.java:189) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Application > > Fi > > lterChain.java:162) > > > at > > > > > org.springframework.web.filter.RequestContextFilter.doFilterInternal > > (R > > equestContextFilter.java:100) > > > at > > > > > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePer > > Re > > questFilter.java:117) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App > > li > > cationFilterChain.java:189) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Application > > Fi > > lterChain.java:162) > > > at > > > > > org.springframework.web.filter.FormContentFilter.doFilterInternal(Fo > > rm > > ContentFilter.java:93) > > > at > > > > > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePer > > Re > > questFilter.java:117) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App > > li > > cationFilterChain.java:189) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Application > > Fi > > lterChain.java:162) > > > at > > > > > org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilte > > r( > > ErrorPageFilter.java:126) > > > at > > > > > org.springframework.boot.web.servlet.support.ErrorPageFilter.access$ > > 00 > > 0(ErrorPageFilter.java:64) > > > at > > > > > org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFil > > te > > rInternal(ErrorPageFilter.java:101) > > > at > > > > > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePer > > Re > > questFilter.java:117) > > > at > > > > > org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilte > > r( > > ErrorPageFilter.java:119) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App > > li > > cationFilterChain.java:189) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Application > > Fi > > lterChain.java:162) > > > at > > > > > org.springframework.web.filter.CharacterEncodingFilter.doFilterInter > > na > > l(CharacterEncodingFilter.java:201) > > > at > > > > > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePer > > Re > > questFilter.java:117) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App > > li > > cationFilterChain.java:189) > > > at > > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Application > > Fi > > lterChain.java:162) > > > at > > > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper > > Va > > lve.java:197) > > > at > > > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContext > > Va > > lve.java:97) > > > at > > > > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentic > > at > > orBase.java:540) > > > at > > > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve. > > ja > > va:135) > > > at > > > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve. > > ja > > va:92) > > > at > > > > > org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAcc > > es > > sLogValve.java:687) > > > at > > > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa > > lv > > e.java:78) > > > at > > > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.ja > > va > > :359) > > > at > > > > > org.apache.coyote.http11.Http11Processor.service(Http11Processor.java: > > 399) > > > at > > > > > org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLi > > gh > > t.java:65) > > > at > > > > > org.apache.coyote.AbstractProtocol$ConnectionHandler.process(Abstrac > > tP > > rotocol.java:889) > > > at org.apache.tomcat.util.net > > > .NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735) > > > at org.apache.tomcat.util.net > > > .SocketProcessorBase.run(SocketProcessorBase.java:49) > > > at > > > > > org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPo > > ol > > Executor.java:1191) > > > at > > > > > org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadP > > oo > > lExecutor.java:659) > > > at > > > > > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskT > > hr > > ead.java:61) > > > at java.lang.Thread.run(Thread.java:748) > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org >