Are you using Eclipse? What does the editor say about the error? Quick fix?

If you can download Eclipse/STS which includes Maven support and load up your project, you will find the error pretty quickly.

Ron

On 30/04/2014 8:00 AM, Dušan Rychnovský wrote:
Thank you both for your help. Unfortunatelly, neither seems to be the case.

  * dependency:tree confirmed that version 1.2.17 is beeing used indeed
(log4j:log4j:jar:1.2.17:compile),
  * I have verified that the import statement is correct (import
org.apache.log4j.Logger;).

Dušan



2014-04-30 13:55 GMT+02:00 Stuart McCulloch <[email protected]>:

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 <[email protected]> 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ý
<[email protected]> 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


--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to