Logger, runtime is asking for Log4J Logger class, but we aren't switching vertx to use Log4J

157 views
Skip to first unread message

bytor99999

unread,
Oct 23, 2012, 6:23:11 PM10/23/12
to ve...@googlegroups.com
Just getting a weird error, because we use the built in vertx Logger

AbstractCallSite.java:190)
at TableWorker.run(TableWorker.groovy:15)
... 21 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at org.vertx.java.deploy.impl.ParentLastURLClassLoader.loadClass(ParentLastURLClassLoader.java:62)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 45 more


Thanks

Mark

Brian Lalor

unread,
Oct 24, 2012, 6:56:17 AM10/24/12
to ve...@googlegroups.com
On Oct 23, 2012, at 6:23 PM, bytor99999 <bytor...@gmail.com> wrote:

Just getting a weird error, because we use the built in vertx Logger

*Something* is trying to use Log4j.  Vert.x 1.2.3final actually does have a transitive dependency on log4j, if you look at the poms.  Include the entire stack trace and specify the version of Vert.x you're using.  Is 1.3.0 officially out the door?

Tim Fox

unread,
Oct 24, 2012, 7:14:35 AM10/24/12
to ve...@googlegroups.com
1.3.0 will be out very shortly.

Vert.x does have a compile time dependency on log4j, but shouldn't have a run-time dependency. I've just run all the examples with 1.3.0 as part of the release process, and all are ok, and there's no log4j on the classpath.

I suspect one of your verticles or modules is referencing log4j. I'd check your imports - you may have an used one which will still pull in log4j.

bytor99999

unread,
Oct 24, 2012, 11:45:11 AM10/24/12
to ve...@googlegroups.com
I had to add the dependency to include the log4j jar.

In our code the only logger we are using is the one the Vert.x container gives us. I mean there isn't a lot of code in our app right now, so I am pretty sure I looked at all the code and only saw …..

Nevermind. Funny how you start typing, then go look again and you see it right away. Another developer introduced Log4J in a class. Not a verticle, but a helper class that our workers call.

Mark
Reply all
Reply to author
Forward
0 new messages