maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: Log4J - "cannot find symbol - method trace(String)"
Date Wed, 30 Apr 2014 11:55:34 GMT
Also check your java imports, just in case you’ve imported a different Logger by mistake
(such as java.util.logging.Logger) 

On 30 Apr 2014, at 12:48, Nick Stolwijk <nick.stolwijk@gmail.com> wrote:

> You can use the dependency:tree[1] goal to view a tree of your
> dependencies to see if the correct version of Log4J is being included
> in the compiler classpath.
> 
> [1] https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html
> 
> Hth,
> 
> Nick Stolwijk
> 
> ~~~ Try to leave this world a little better than you found it and,
> when your turn comes to die, you can die happy in feeling that at any
> rate you have not wasted your time but have done your best ~~~
> 
> Lord Baden-Powell
> 
> 
> On Wed, Apr 30, 2014 at 1:41 PM, Dušan Rychnovský
> <geraltzrivie@gmail.com> wrote:
>> Hi everyone,
>> 
>> I have the following dependency in my project's POM:
>> 
>> ...
>> <dependency>
>>    <groupId>log4j</groupId>
>>    <artifactId>log4j</artifactId>
>>    <version>1.2.17</version>
>> </dependency>
>> ...
>> 
>> The artifact is downloaded to my local repository, but, during the compile
>> phase, the following error is emitted and the build process is aborted:
>> 
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
>> (default-compile) on project dbtoixattrdt: Compilation failure: Compilation
>> failure:
>> [ERROR]
>> d:\prace\dbtoixattrdt\DBToIXATTRDT-TRUNK\src\main\java\dbtoixattrdt\TraceLogAspect.java:[19,8]
>> error: cannot find symbol
>> [ERROR] symbol:   method trace(String)
>> [ERROR] location: variable logger of type Logger
>> 
>> This error message does not make much sense, as the trace method should be
>> available on the Logger class in Log4J version 1.2.17.
>> 
>> What can be wrong?
>> 
>> Thanks in advance,
>> Dušan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message