Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 27th, 2005, 02:56 AM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to d_chandra78
Default Local Interface (javax.naming.NameNotFoundExcepti)

Hi All,

I'm trying to use a local interface in session bean. But at run-time it is throwing an exception javax.naming.NameNotFoundException :(

Same program works fine if we use remote interface. Here i'm showing ejb-jar.xml file
----------------------------------------------------------------------


<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
    <display-name>LocalInterfaceJAR</display-name>
    <enterprise-beans>
        <session>
            <display-name>SimpleSessionEJB</display-name>
            <ejb-name>SimpleSessionEJB</ejb-name> <local-home>beans.SimpleSessionHome</local-home> <local>beans.SimpleSession</local>
            <ejb-class>beans.SimpleSessionBean</ejb-class> <session-type>Stateless</session-type>
            <transaction-type>Bean</transaction-type>
            <ejb-local-ref>
                <ejb-ref-name>ejb/beans.SimpleSession</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
                <local-home>beans.SimpleSessionHome</local-home>
                <local>beans.SimpleSession</local>
                <ejb-link>SimpleSessionEJB</ejb-link>
            </ejb-local-ref>
            <security-identity>
                <description></description>
                <use-caller-identity></use-caller-identity>
            </security-identity>
        </session>
    </enterprise-beans>
    <assembly-descriptor>
        <method-permission>
        <unchecked />
        <method>
            <ejb-name>SimpleSessionEJB</ejb-name>
            <method-intf>Local</method-intf>
            <method-name>getEchoString</method-name>
            <method-params>
            <method-param>java.lang.String</method-param>
            </method-params>
        </method>
        <method>
            <ejb-name>SimpleSessionEJB</ejb-name>
            <method-intf>Local</method-intf>
            <method-name>getPrimaryKey</method-name>
            <method-params />
        </method>
        <method>
            <ejb-name>SimpleSessionEJB</ejb-name>
            <method-intf>Local</method-intf> <method-name>getEJBLocalHome</method-name>
            <method-params />
        </method>
        <method>
            <ejb-name>SimpleSessionEJB</ejb-name>
            <method-intf>LocalHome</method-intf>
            <method-name>remove</method-name>
            <method-params>
            <method-param>java.lang.Object</method-param>
            </method-params>
        </method>
        <method>
            <ejb-name>SimpleSessionEJB</ejb-name>
            <method-intf>Local</method-intf>
            <method-name>remove</method-name>
            <method-params />
        </method>
        <method>
            <ejb-name>SimpleSessionEJB</ejb-name>
            <method-intf>Local</method-intf>
            <method-name>isIdentical</method-name>
            <method-params>
                <method-param>javax.ejb.EJBLocalObject</method-param>
            </method-params>
        </method>
        <method>
            <ejb-name>SimpleSessionEJB</ejb-name>
            <method-intf>LocalHome</method-intf>
            <method-name>create</method-name>
            <method-params />
        </method>
        </method-permission>
    </assembly-descriptor>
</ejb-jar>

----------------------------------------------------------------------
Plz send solution
Thanks in advance :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Variables in the four naming conventions FJInfante SQL Server 2000 3 May 1st, 2006 01:06 PM
Naming a new table SKE Classic ASP Databases 2 March 23rd, 2005 03:25 PM
javax.servlet gauravchhabra9111 Servlets 1 January 19th, 2005 03:14 AM
Stored Procedure Naming jmurdock BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 July 2nd, 2004 10:22 AM
Naming conventions jara VS.NET 2002/2003 3 June 22nd, 2003 04:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.