When running EAP we see javax.naming.NamingException: JBAS011843 at oracle.net.jndi.JndiAttrs.<init>

Solution Verified - Updated -

Issue

  • While trying to get a datasource we get an error:
Caused by: oracle.net.ns.NetException: JNDI Package failure javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory com.sun.jndi.ldap.LdapCtxFactory from classloader ModuleClassLoader for Module "org.jboss.as.pojo:main"from local module loader @451c0d60 (roots: E:\projects\jboss\installation\EAP-6.0.0\modules,E:\projects\jboss\installation\EAP-6.0.0\myModules,E:\projects\jboss\domains\1234\servers\1234-EAP6_UNIV_univ_DBIZ\modules) 
        at oracle.net.jndi.JndiAttrs.<init>(JndiAttrs.java:159)
...
...

It seems that "oracle.net.jndi.JndiAttrs" can't find "com.sun.jndi.ldap.LdapCtxFactory", what sounds like a class path issue.

We already added "sun.jdk" as dependency to the oracle driver module.
We also added "sun.jdk" as global module.

Both didn't solved the problem. We also tried to add the dependency to "org.jboss.as.controller", as seen in https://community.jboss.org/thread/167524 without success.

Environment

  • JBoss Enterprise Application Platform
    • 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.