You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "sbiradar75@gmail.com" <sb...@gmail.com> on 2016/12/15 16:59:17 UTC
Generating Extended Loggers command fails with NoClassDefFoundError
Hi,
I tried to create an extended logger with the command provided at the below page, but it failed with - Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/Strings
URL - http://logging.apache.org/log4j/2.0/manual/customloglevels.html#CustomLoggers
Am I missing something?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Generating Extended Loggers command fails with NoClassDefFoundError
Posted by Remko Popma <re...@gmail.com>.
Ah, sorry, I overlooked your email.
Glad you got it working.
We'll revert the change that introduced the dependency on log4j-api, that should not be necessary.
Sent from my iPhone
> On 16 Dec 2016, at 18:02, "sbiradar75@gmail.com"<sb...@gmail.com> wrote:
>
> It was missing the api jar, and I got it working now. Thanks!
>
>> On 2016-12-16 03:43 (-0500), "sbiradar75@gmail.com"<sb...@gmail.com> wrote:
>> Its on the path, and btw am running from the -bin folder, and the command is same as whats gien an example on the webpage, v2.7, and I'm running on mac:
>> java -cp log4j-core-2.7.jar 'org.apache.logging.log4j.core.tools.Generate$ExtendedLogger' \
>> com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
>>
>> Thanks.
>>
>>> On 2016-12-15 17:36 (-0500), Remko Popma <re...@gmail.com> wrote:
>>> Hi,
>>>
>>> The tool didn't use to require the log4j-api on the classpath. Not sure what happened there, apologies.
>>>
>>> For now please try to generate again with both the api and the core jars in the classpath.
>>>
>>> Remko
>>>
>>> Sent from my iPhone
>>>
>>>> On 16 Dec 2016, at 3:16, Gary Gregory <ga...@gmail.com> wrote:
>>>>
>>>> The api or core jar on the classpath?
>>>>
>>>> Gary
>>>>
>>>> On Dec 15, 2016 8:59 AM, "sbiradar75@gmail.com" <sb...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I tried to create an extended logger with the command provided at the
>>>>> below page, but it failed with - Exception in thread "main" java.lang.NoClassDefFoundError:
>>>>> org/apache/logging/log4j/util/Strings
>>>>> URL - http://logging.apache.org/log4j/2.0/manual/customloglevels.html#
>>>>> CustomLoggers
>>>>>
>>>>> Am I missing something?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Generating Extended Loggers command fails with NoClassDefFoundError
Posted by "sbiradar75@gmail.com" <sb...@gmail.com>.
It was missing the api jar, and I got it working now. Thanks!
On 2016-12-16 03:43 (-0500), "sbiradar75@gmail.com"<sb...@gmail.com> wrote:
> Its on the path, and btw am running from the -bin folder, and the command is same as whats gien an example on the webpage, v2.7, and I'm running on mac:
> java -cp log4j-core-2.7.jar 'org.apache.logging.log4j.core.tools.Generate$ExtendedLogger' \
> com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
>
> Thanks.
>
> On 2016-12-15 17:36 (-0500), Remko Popma <re...@gmail.com> wrote:
> > Hi,
> >
> > The tool didn't use to require the log4j-api on the classpath. Not sure what happened there, apologies.
> >
> > For now please try to generate again with both the api and the core jars in the classpath.
> >
> > Remko
> >
> > Sent from my iPhone
> >
> > > On 16 Dec 2016, at 3:16, Gary Gregory <ga...@gmail.com> wrote:
> > >
> > > The api or core jar on the classpath?
> > >
> > > Gary
> > >
> > > On Dec 15, 2016 8:59 AM, "sbiradar75@gmail.com" <sb...@gmail.com>
> > > wrote:
> > >
> > >> Hi,
> > >>
> > >> I tried to create an extended logger with the command provided at the
> > >> below page, but it failed with - Exception in thread "main" java.lang.NoClassDefFoundError:
> > >> org/apache/logging/log4j/util/Strings
> > >> URL - http://logging.apache.org/log4j/2.0/manual/customloglevels.html#
> > >> CustomLoggers
> > >>
> > >> Am I missing something?
> > >>
> > >> Thanks.
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >>
> > >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Generating Extended Loggers command fails with NoClassDefFoundError
Posted by Remko Popma <re...@gmail.com>.
> On 16 Dec 2016, at 17:43, "sbiradar75@gmail.com"<sb...@gmail.com> wrote:
>
> Its on the path, and btw am running from the -bin folder, and the command is same as whats gien an example on the webpage, v2.7, and I'm running on mac:
> java -cp log4j-core-2.7.jar 'org.apache.logging.log4j.core.tools.Generate$ExtendedLogger' \
> com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
And was that successful?
If not, can you try adding log4j-api-2.7.jar to the classpath?
>
> Thanks.
>
>> On 2016-12-15 17:36 (-0500), Remko Popma <re...@gmail.com> wrote:
>> Hi,
>>
>> The tool didn't use to require the log4j-api on the classpath. Not sure what happened there, apologies.
>>
>> For now please try to generate again with both the api and the core jars in the classpath.
>>
>> Remko
>>
>> Sent from my iPhone
>>
>>> On 16 Dec 2016, at 3:16, Gary Gregory <ga...@gmail.com> wrote:
>>>
>>> The api or core jar on the classpath?
>>>
>>> Gary
>>>
>>> On Dec 15, 2016 8:59 AM, "sbiradar75@gmail.com" <sb...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I tried to create an extended logger with the command provided at the
>>>> below page, but it failed with - Exception in thread "main" java.lang.NoClassDefFoundError:
>>>> org/apache/logging/log4j/util/Strings
>>>> URL - http://logging.apache.org/log4j/2.0/manual/customloglevels.html#
>>>> CustomLoggers
>>>>
>>>> Am I missing something?
>>>>
>>>> Thanks.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Generating Extended Loggers command fails with NoClassDefFoundError
Posted by "sbiradar75@gmail.com" <sb...@gmail.com>.
Its on the path, and btw am running from the -bin folder, and the command is same as whats gien an example on the webpage, v2.7, and I'm running on mac:
java -cp log4j-core-2.7.jar 'org.apache.logging.log4j.core.tools.Generate$ExtendedLogger' \
com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
Thanks.
On 2016-12-15 17:36 (-0500), Remko Popma <re...@gmail.com> wrote:
> Hi,
>
> The tool didn't use to require the log4j-api on the classpath. Not sure what happened there, apologies.
>
> For now please try to generate again with both the api and the core jars in the classpath.
>
> Remko
>
> Sent from my iPhone
>
> > On 16 Dec 2016, at 3:16, Gary Gregory <ga...@gmail.com> wrote:
> >
> > The api or core jar on the classpath?
> >
> > Gary
> >
> > On Dec 15, 2016 8:59 AM, "sbiradar75@gmail.com" <sb...@gmail.com>
> > wrote:
> >
> >> Hi,
> >>
> >> I tried to create an extended logger with the command provided at the
> >> below page, but it failed with - Exception in thread "main" java.lang.NoClassDefFoundError:
> >> org/apache/logging/log4j/util/Strings
> >> URL - http://logging.apache.org/log4j/2.0/manual/customloglevels.html#
> >> CustomLoggers
> >>
> >> Am I missing something?
> >>
> >> Thanks.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Generating Extended Loggers command fails with NoClassDefFoundError
Posted by Remko Popma <re...@gmail.com>.
Hi,
The tool didn't use to require the log4j-api on the classpath. Not sure what happened there, apologies.
For now please try to generate again with both the api and the core jars in the classpath.
Remko
Sent from my iPhone
> On 16 Dec 2016, at 3:16, Gary Gregory <ga...@gmail.com> wrote:
>
> The api or core jar on the classpath?
>
> Gary
>
> On Dec 15, 2016 8:59 AM, "sbiradar75@gmail.com" <sb...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I tried to create an extended logger with the command provided at the
>> below page, but it failed with - Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/logging/log4j/util/Strings
>> URL - http://logging.apache.org/log4j/2.0/manual/customloglevels.html#
>> CustomLoggers
>>
>> Am I missing something?
>>
>> Thanks.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Generating Extended Loggers command fails with NoClassDefFoundError
Posted by Gary Gregory <ga...@gmail.com>.
The api or core jar on the classpath?
Gary
On Dec 15, 2016 8:59 AM, "sbiradar75@gmail.com" <sb...@gmail.com>
wrote:
> Hi,
>
> I tried to create an extended logger with the command provided at the
> below page, but it failed with - Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/logging/log4j/util/Strings
> URL - http://logging.apache.org/log4j/2.0/manual/customloglevels.html#
> CustomLoggers
>
> Am I missing something?
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>