"java.lang.NoSuchFieldError: org/apache/log4j/Level.TRACELorg/apache/log4j/Level" using EAP 6 client library

Solution Verified - Updated -

Issue

We are calling EJBs on JBoss remotely, and get this error although we have log4j in the classpath.

javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.NoSuchFieldError: org/apache/log4j/Level.TRACELorg/apache/log4j/Level;]
 at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)
 at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:152)
 at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
 at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
 at javax.naming.InitialContext.init(InitialContext.java:223)
 at javax.naming.InitialContext.<init>(InitialContext.java:197)
 ...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content