EAP6 ejb client throws NoInitialContextException: Need to specify class name in environment or system property

Solution Verified - Updated -

Issue

  • While invoking EJBs deployed on EAP6 the remote client throws the following exception while creating InitialContext Object.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at client.JBossEJBClientAPIBased.runPerformanceTest(Unknown Source)
    at client.JBossEJBClientAPIBased.main(Unknown Source)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x

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.