You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Matt Sicker <bo...@gmail.com> on 2016/03/01 21:35:43 UTC

Can't build log4j from IntelliJ, any ideas?

If I try to execute any unit tests (or even "make" the project) I get the
following error:

Error:java: Bad service configuration file, or exception thrown while
constructing Processor object: javax.annotation.processing.Processor:
Provider
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
could not be instantiated: java.lang.NoClassDefFoundError:
org/apache/logging/log4j/core/config/plugins/processor/PluginCache

Everything works fine in Maven. I enabled annotation processing, yet I get
this error every time in log4j-core.

-- 
Matt Sicker <bo...@gmail.com>

Re: Can't build log4j from IntelliJ, any ideas?

Posted by Matt Sicker <bo...@gmail.com>.
I figured out the issue. You need to run "mvn clean compile" first, then
IntelliJ picks up the compiled annotation processor properly.

On 2 March 2016 at 09:04, Matt Sicker <bo...@gmail.com> wrote:

> It worked for me after I restarted IntelliJ. Might have been a cache issue
> or something. Hopefully I don't get that error again.
>
> On 2 March 2016 at 03:01, Mikael Ståldal <mi...@magine.com>
> wrote:
>
>> It works fine for me with IntelliJ IDEA 15.0.4 community on Linux, latest
>> from master.
>>
>> On Tue, Mar 1, 2016 at 9:35 PM, Matt Sicker <bo...@gmail.com> wrote:
>>
>>> If I try to execute any unit tests (or even "make" the project) I get
>>> the following error:
>>>
>>> Error:java: Bad service configuration file, or exception thrown while
>>> constructing Processor object: javax.annotation.processing.Processor:
>>> Provider
>>> org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
>>> could not be instantiated: java.lang.NoClassDefFoundError:
>>> org/apache/logging/log4j/core/config/plugins/processor/PluginCache
>>>
>>> Everything works fine in Maven. I enabled annotation processing, yet I
>>> get this error every time in log4j-core.
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Can't build log4j from IntelliJ, any ideas?

Posted by Matt Sicker <bo...@gmail.com>.
It worked for me after I restarted IntelliJ. Might have been a cache issue
or something. Hopefully I don't get that error again.

On 2 March 2016 at 03:01, Mikael Ståldal <mi...@magine.com> wrote:

> It works fine for me with IntelliJ IDEA 15.0.4 community on Linux, latest
> from master.
>
> On Tue, Mar 1, 2016 at 9:35 PM, Matt Sicker <bo...@gmail.com> wrote:
>
>> If I try to execute any unit tests (or even "make" the project) I get the
>> following error:
>>
>> Error:java: Bad service configuration file, or exception thrown while
>> constructing Processor object: javax.annotation.processing.Processor:
>> Provider
>> org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
>> could not be instantiated: java.lang.NoClassDefFoundError:
>> org/apache/logging/log4j/core/config/plugins/processor/PluginCache
>>
>> Everything works fine in Maven. I enabled annotation processing, yet I
>> get this error every time in log4j-core.
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Can't build log4j from IntelliJ, any ideas?

Posted by Mikael Ståldal <mi...@magine.com>.
It works fine for me with IntelliJ IDEA 15.0.4 community on Linux, latest
from master.

On Tue, Mar 1, 2016 at 9:35 PM, Matt Sicker <bo...@gmail.com> wrote:

> If I try to execute any unit tests (or even "make" the project) I get the
> following error:
>
> Error:java: Bad service configuration file, or exception thrown while
> constructing Processor object: javax.annotation.processing.Processor:
> Provider
> org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
> could not be instantiated: java.lang.NoClassDefFoundError:
> org/apache/logging/log4j/core/config/plugins/processor/PluginCache
>
> Everything works fine in Maven. I enabled annotation processing, yet I get
> this error every time in log4j-core.
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.