The moose likes JBoss and the fly likes javax.naming NoInitialContextException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply 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
 
IntelliJ Java IDE
 
subject: javax.naming NoInitialContextException
 
Threads others viewed
not bound?
Deployment Error : Class not found
Can�t find Home Interface.
Help me out for CMR deployment in CMP EJB......
Please help !!!!!!!!!!!!
MyEclipse, The Clear Choice