Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

Tushar Kapila <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CAN0SkmkqusdSJq-qUTTpUpQcgLzkdX-REMSuau3CVkrD+ARHQg@mail.gmail.com>
You might need to activate login debug and then should see the stack trace.
Can search the web on ho to.

On Fri, Mar 4, 2022, 21:00 Gary Gregory <[email protected]> wrote:

> Print copy and paste your stack trace in this email thread.
> Then it will be clearer if it is simple for me to reproduce in a unit test
> or if you need to provide one.
>
> Gary
>
> On Fri, Mar 4, 2022 at 4:32 AM Pooja Pandey <[email protected]>
> wrote:
>
> > We are calling
> > Logger.getLogger(<name>, <loggerFactory>)
> >
> > And in AppenderAttachableImpl aai;, this is returning  AppenderWrapper,
> > which we are trying to cast to FileAppender as we were doing when we were
> > using log4j1.x.
> >
> > -----Original Message-----
> > From: Gary Gregory <[email protected]>
> > Sent: Friday, March 4, 2022 2:48 PM
> > To: [email protected]
> > Cc: Log4J Users List <[email protected]>
> > Subject: Re: java.lang.ClassCastException:
> > org.apache.log4j.bridge.AppenderWrapper cannot be cast to
> > org.apache.log4j.FileAppender
> >
> > *** External email: Verify sender before opening attachments or links ***
> >
> >
> > What is the stack trace?
> >
> > Gary
> >
> > On Fri, Mar 4, 2022, 03:36 Pooja Pandey <[email protected]>
> > wrote:
> >
> > > Hi Team,
> > >
> > >
> > >
> > > 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.
> > >
> > >
> > >
> > > java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper
> > > cannot be cast to org.apache.log4j.FileAppender
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Pooja
> > >
> >
>
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.