wood burning stoves*
The moose likes JBoss/WildFly and the fly likes javax.naming NoInitialContextException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "javax.naming NoInitialContextException" Watch "javax.naming NoInitialContextException" New topic
Author

javax.naming NoInitialContextException

prakash ayyardevar
Greenhorn

Joined: Dec 24, 2004
Posts: 1
Hello,

My Environment:
OS = HP-UX
App. Server = JBoss 4.0

Problem:
I have created an Entity EJB bean and succesfully deployed in JBoss. But while trying to access the EJB through an client program there is an exception javax.naming.NoInitialContextException.

Files in the Deployed JAR file:
Cabin.class - Remote Interface
CabinBean.class - Bean Implementation
CabinHome.class - Home Interface
CabinPK.class - primary key files
ejb-jar.xml - Deployment Descriptor

Content of Deployment Descriptor:

<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">


<ejb-jar>
<enterprise-beans>
<entity>
<description>
This is the first bean, Cabin bean.
</description>
<ejb-name>CabinBean</ejb-name>
<jndi-name>MyBeain</jndi-name>
<local-jndi-name>MyLocalBean</local-jndi-name>
<home>com.titan.cabin.CabinHome</home>
<remote>com.titan.cabin.Cabin</remote>
<ejb-class>com.titan.cabin.CabinBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>com.titan.cabin.CabinPK</prim-key-class>
<reentrant>false</reentrant>

<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>deckLevel</field-name></cmp-field>
<cmp-field><field-name>bedCount</field-name></cmp-field>
<cmp-field><field-name>ship</field-name></cmp-field>
</entity>
</enterprise-beans>
<assembly-descriptor>
<security-role>
<description>
roles are described.
</description>
<role-name>everyone</role-name>
</security-role>

<method-permission>
<role-name>everyone</role-name>
<method>
<ejb-name>CabinBean</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>

<container-transaction>
<method>
<ejb-name>CabinBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>


Thanks in Advance
Prakash.A
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.naming NoInitialContextException