• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

javax.naming NoInitialContextException

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic