This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JBoss and the fly likes javax.naming NoInitialContextException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: javax.naming NoInitialContextException
 
Similar Threads
Please help !!!!!!!!!!!!
not bound?
Deployment Error : Class not found
Help me out for CMR deployment in CMP EJB......
Can�t find Home Interface.