Re: Log4j1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup

Gary Gregory <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CACZkXPxAaieNqW5jt2Ve6tyVxZneHVJsTeqnyqsVat=nSv-eSg@mail.gmail.com>
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 <[email protected]>
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 <[email protected]>
> Sent: Tuesday, March 8, 2022 4:18 PM
> To: Log4J Users List <[email protected]>
> 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 <[email protected]>
> 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>(AbstractConfiguration.java:133)
> >               at
> >
> org.apache.log4j.config.Log4j1Configuration.<init>(Log4j1Configuration.java:43)
> >               at
> >
> org.apache.log4j.config.PropertiesConfiguration.<init>(PropertiesConfiguration.java:99)
> >               at
> >
> org.apache.log4j.config.PropertiesConfiguration.<init>(PropertiesConfiguration.java:110)
> >               at
> >
> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:300)
> >               at
> >
> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:276)
> >               at
> >
> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:388)
> >               at
> >
> org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:183)
> >               at
> > com.Custom.tools.logging.CustomLogger.resetURL(CustomLogger.java:408)
> >               at
> >
> com.Custom..impl.JavaLogPropertyHelper.updateJavaLogPropertiesFromList(JavaLogPropertyHelper.java:226)
> >               at
> >
> com.Custom..impl.CustomServiceConfigurationImpl.SetHostProperties(CustomServiceConfigurationImpl.java:293)
> >               at
> >
> com.Custom.Comm.CommToICustomServiceConfiguration.setHostProperties(CommToICustomServiceConfiguration.java:642)
> >               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >               at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >               at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(DelegatingMethodAccessorImpl.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.java:220)
> >               at
> > com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:119)
> >               at
> >
> com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.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(HttpAdapter.java:838)
> >               at
> > com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:392)
> >               at
> >
> com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:195)
> >               at
> >
> com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:131)
> >               at
> >
> com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.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(ApplicationFilterChain.java:227)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
> >               at
> > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
> >               at
> >
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
> >               at
> >
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
> >               at
> >
> org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
> >               at
> >
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
> >               at
> >
> org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:126)
> >               at
> >
> org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64)
> >               at
> >
> org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101)
> >               at
> >
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
> >               at
> >
> org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
> >               at
> >
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
> >               at
> >
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
> >               at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
> >               at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
> >               at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
> >               at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
> >               at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
> >               at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
> >               at
> >
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
> >               at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
> >               at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
> >               at
> >
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
> >               at
> >
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
> >               at
> >
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.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(ThreadPoolExecutor.java:1191)
> >               at
> >
> org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
> >               at
> >
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> >               at java.lang.Thread.run(Thread.java:748)
> >
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.