[jboss-user] [JNDI/Naming/Network] - Failed lookup jndi in Seam + Tomcat

kiekie96 do-not-reply at jboss.com
Tue Jun 12 08:38:05 EDT 2007


Hi, sorry for the basic question, ive tried to googled and read from this forum about my problem but still stucked.

Im using tomcat 5.5 + Seam 1.2.1.GA,
I want to invoke an ejb stateless bean from an ejb stateles bean in same jvm using local interface.
So here is the condition,

in Test1Bean.java i have

InitialContext jndiContext = new InitialContext();
ref = jndiContext.lookup( "Test2Bean/local");

Test2BeanLocal test2Bean = (Test2BeanLocal) ref;

And the result is test2Bean always NULL.. 
Both Test1Bean and Test2Bean only have local interface

In my component.xml, i only have this:

<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
            xmlns:core="http://jboss.com/products/seam/core"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation=
                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd 
                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd">

     <core:init jndi-pattern="#{ejbName}/local" debug="true"/>
    <core:ejb installed="true"/>


i've tried all jndi name possibility:
Test2Bean/local
test2Bean/local
java:/Test2Bean/local
Java:/test2Bean/local
java:comp/env/Test2Bean/local
java:comp/env/test2Bean/local

also, i've tried to add jbossall-client.jar in my web-inf/lib

but always get null.

Please if anybody know how can i get reference to Test2Bean in Test1Bean so i can invoke any method inside Test2Bean from Test1Bean ?
Any helpfull link would be appreciate.

thx
Kie.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053503#4053503

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053503



More information about the jboss-user mailing list