Local datasource JNDI lookup from JBoss custom module fails

Solution Unverified - Updated -

Issue

  • While looking up for the local DataSource from Custom Module of EAP6.0.1 it throws the following exception.
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
      javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:650)
      javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
      javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:287)
      javax.naming.InitialContext.lookup(InitialContext.java:354)
      ds.DataSourceLookup.getDataSource(DataSourceLookup.java:15)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:64)

Environment

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

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