Local interfaces and WLS 7

Hi *,
does anybody know if localinterfaces work in WLS7 SP1?
thanx,
Yauheni

Yes. my classes were inclueded in system CLASSPATH. but Sun spec says nothing about
that local interfaces could work only in the application context. it says that restriction
is that it could work only on the same JVM. so it looks very strange, isn't it? i
will try to pack everything in ear and try it again.
Thanx,
Yauheni
"Dimitri I. Rakitine" <[email protected]> wrote:
Yes, it looks like this is a problem. Your application used to work on 6
because you
added all your classes to the system classpath, right? And it sounds like
in 7, local
calls also depend on the application environment being set.
Yauheni Prykhodzka <[email protected]> wrote:
actually, may be that is the problem, we have no ear. we have a set ofjars with
ejbs and a set of web applications, whci are not packed in war. couldit be a problem,
when i use local interfaces?
but spec says that local interface could be used inside a JVM. i thinkit should
not play a role, if classloadres of ejb and component that use ejb aredifferent.
is it true?
Yauheni
"Dimitri I. Rakitine" <[email protected]> wrote:
Do you mean that servlet, which is a part of a .war which is deployed
in
the
same .ear with the EJB components fails to invoke EJB's using local interfaces?
Yauheni Prykhodzka <[email protected]> wrote:
"Dimitri I. Rakitine" <[email protected]> wrote:
Interesting. I guess that the problem will go away if you stop using
startup
classes
(for example, use load-on-startup servlet instead to perform initialization
steps).
No. I get the same problem after weblogic started. If i try to use localinterfaces
from another bean o servlet i get the same exception.
Yauheni
Yauheni Prykhodzka <[email protected]> wrote:
Here is the exception, which i'm getting:
<10.07.2002 11:43:55 CEST> <Emergency> <WebLogicServer> <000342> <Unableto init
ialize the server: Fatal initialization exception
Throwable: weblogic.t3.srvr.FatalStartupException: Can't start serverdue to sta
rtup class failure IdGeneratorStartUp - with nested exception:
[javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundExcept
ion: remaining name: /app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-home];
Link Remaining Name: 'java:app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-ho
me']
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundExcept
ion: remaining name: /app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-home
<<no stack trace available>>
--------------- nested within: ------------------
weblogic.t3.srvr.FatalStartupException: Can't start server due to
startup
class
failure IdGeneratorStartUp - with nested exception:
[javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundExcept
ion: remaining name: /app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-home];
Link Remaining Name: 'java:app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-ho
me']
at weblogic.t3.srvr.StartupClassRunner$1.run(StartupClassRunner.java:95)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:721)
at weblogic.t3.srvr.StartupClassRunner.run(StartupClassRunner.java:71)
at java.lang.Thread.run(Thread.java:484)
>
The WebLogic Server did not start up properly.
the JNDI name for local interface is IdGeneratorLocalHome. i use thisname for lookup.
Thanx,
Yauheni--
Dimitri--
Dimitri
Dimitri

Similar Messages

  • Accessing the local interface of an EJB

    Hello.
    I am using Jdeveloper 11G and it's integrated application server. Using the Jdeveloper wizards, i created a simple stateless session EJB which has both a local and a remote interface (code listed below). I then used the "Create test client" option to create a simple test client.
    The way these classes and interfaces are set up by the wizards, i am using the remote interface. However, i would like to lookup the local interface and use that instead. But i just can't figure out how to lookup the local interface of the EJB. I have tried pretty much every variation i can think of but still no success. Is there anyone out there who can give me a hand? Is there a way to see the lookup name in the integrated WLS server?
    My remote interface looks like this:
    @Remote
    public interface SessionEJB {
    and the remote one:
    @Local
    public interface SessionEJBLocal {
    And my EJB class:
    @Stateless(name = "SessionEJB", mappedName = "NewTestApplication-SessionEJB")
    public class SessionEJBBean implements SessionEJBLocal, SessionEJB {
    My test client does this lookup that works fine:
    public class SessionEJBClient1 {
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    SessionEJB sessionEJB = (SessionEJB)context.lookup("NewTestApplication-SessionEJB#model.SessionEJB");
    }

    Hi,
    Your lookup in your client would look something like
    SessionEJBLocal sessionEJB = (SessionEJBLocal)context.lookup("NewTestApplication-SessionEJB#SessionEJBLocal ");
    The part before the # in the lookup is your mapped name from your session facade, and after the # you have your package, like com.oracle. and ending it with your local interface name.
    Just remember that if your client is not actually running inside the application server container (which with the generated test client it wouldn't be, its a java standalone app with a main method), you will not be able to use the local interface, and you would have to look up remote interface. This can be done in exactly the same way as the above line of code, just replacing the local interface parts with the remote interface's. Hope this helps.
    Drikus
    Edited by: Drikus Britz on Jun 3, 2009 8:46 PM
    Edited by: Drikus Britz on Jun 3, 2009 8:50 PM

  • Local Interface in weblogic-ejb-jar.xml file

    I used Local Interface in WLS 7.0, and specifies the jndi-name as
    <weblogic-enterprise-bean>
    <ejb-name>MailboxService</ejb-name>
    <jndi-name>ejb/MailboxServiceHome</jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>MailboxServiceLocal</ejb-name>
    <jndi-name>ejb/MailboxServiceLocalHome</jndi-name>
    </weblogic-enterprise-bean>
    When I migrate to WLS 8.1, I keep receiving warning messages like:
    "[java] WARNING: Warning from ejbc: <jndi-name> must be defined for a bean
    with remo
    te interface. 'RecognitionServiceLocal(Jar: C:\ebdev\dev\make\eb-ejb\..\..\dist\eb-ejb.j
    ar)' does not have a remote interface."
    What is wrong here?
    Thanks in advance.

    jndi-name is specified for a remote interface.
    local-jndi-name is specified for a local interface.
    thanks,
    Deepak Vohra
    "Andy yang" <[email protected]> wrote:
    >
    I used Local Interface in WLS 7.0, and specifies the jndi-name as
    <weblogic-enterprise-bean>
    <ejb-name>MailboxService</ejb-name>
    <jndi-name>ejb/MailboxServiceHome</jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>MailboxServiceLocal</ejb-name>
    <jndi-name>ejb/MailboxServiceLocalHome</jndi-name>
    </weblogic-enterprise-bean>
    When I migrate to WLS 8.1, I keep receiving warning messages like:
    "[java] WARNING: Warning from ejbc: <jndi-name> must be defined
    for a bean
    with remo
    te interface. 'RecognitionServiceLocal(Jar: C:\ebdev\dev\make\eb-ejb\..\..\dist\eb-ejb.j
    ar)' does not have a remote interface."
    What is wrong here?
    Thanks in advance.

  • Problem with Local Interfaces (WSAD 5)

    I built an Entity Bean with Local Interface and a Remote Interface (apperently they both have the same JNDI name in WSAD)
    and when I look up for the name from other Session Bean (same EJB group) and I try to cast it to the local interface there is a classCastException.............
    HELP ME

    Nidhi
    I had the same problems as you that went away. If you have both remote and local interfaces defined, and your remote inerface can be accessed via JNDI lookup using (say) "ejb/sessionbean/stateless/HelloHome", then you can access the local intercafe using "local:ejb/ejb/sessionbean/stateless/HelloHome".
    The URL http://localhost:9080/UTC/initialize?port=2809 is very useful to browse the JNDI tree. Just expand "Local EJB beans" and position your mouse over the item of interest. The JNDI lookup name will echo in the bottom (solid) frame of the browser. The only problem is that the jndilookup name will appear (mistakenly) as local:/ejb/ejb/stateless......, just get rid of the first forward-slash to make it look like local:ejb/ejb/stateless....
    Hope this helps
    Somnath

  • Local Data Address Does not belong to any of this hosts local interfaces

    I cannot get through this exception while running
    sessionManager.initSession(
    localAddress,
    new SourceDescription[] {  },
    0.05,
    0.25);
    I get this debug output:
    Initalizing session (localAddress)
    DataAddress: 10.8.0.6/10.8.0.6
    ControlAddress: 10.8.0.6/10.8.0.6
    DataPort: 2838
    ControlPort: 2839
    10.8.0.6 is on my tun0 interface, I also tried with 192.168.1.100 which is on my eth2 interface but always get the message in the subject. The only address I can init session on is loopback address.
    I use code that looks at local interfaces and grabs ip address from one of them so I'm sure the assigned address belongs to one of my interfaces.
    Anybody knows how I can solve this problem?

    I solved this one. The problem is JMF seems to use InetAddress.getAllByName() which returns (at least in my case) only single IP address no matter how many addresses I have defined on my interfaces. The problem was solved by placing my IP address that I wanted to use by session manager into /etc/hosts. It must be the first line in /etc/hosts otherwise the other row that matches is used.

  • Use remote or local interface in my CMP EB?

    I found it's suggested to writer your CMP EB with Local interface.and a Session Bean with Remote interface.and bundle them into a same EJB JAR file.my end-user client (WAR file) call SB in another JVM.
    I wrote two methods in my SB named [CreateAuser & DeleteAuser] which call enity bean by local interface.
    and I found it wokrs good anywhere while doing Create or Remove an enity object in my jsp files;
    But I have no way to directly call enity bean in jsp files to do database query.
    Do I have to write a method like findbyuserid which calls entity bean's home method findByPrimaryKey()? if so I should rewriter many methods in my SB to meet my jsp files need.
    What shall I do ,what is the common way to do sth like that?

    Hi,
    You SessionBean (Session Facade pattern) should provide service such as Business Service (Create User, Remote User, GetUser ...) that's the role of SessionBean as Session Facade.
    All the method you expect to call from Presentation Tier.
    Regards
    Sebastien Degardin.

  • EJB Local Interfaces / javax.naming.NamingException

    Hi!
    I have tried to deploy a very simple (Hello World like)EJB-Application. It contains a simple stateless SessionBean (with local interfaces) and a JSP which is using the EJB.
    Opening the JSP i get the following error message:
    javax.naming.NamingException: Error instantiating web-app JNDI-context: No location specified and no suitable instance found for the ejb-local-ref 'ejb/TesterEJB', an EJB matching it's ejb-link 'ejb-jar-ic.jar#TesterEJB' was found, but it contained an Entity, not a Session
    Here's my ejb-jar.xml:
    <?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>oc4jJAR</display-name>
         <enterprise-beans>
              <session>
                   <display-name>TesterEJB</display-name>
                   <ejb-name>TesterEJB</ejb-name>
                   <local-home>oc4jtest.TesterHome</local-home>
                   <local>oc4jtest.Tester</local>
                   <ejb-class>oc4jtest.TesterBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <security-identity>
                        <description/>
                        <use-caller-identity/>
                   </security-identity>
              </session>
         </enterprise-beans>
         <assembly-descriptor>
              <method-permission>
                   <unchecked/>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getPrimaryKey</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getEJBLocalHome</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</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>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>remove</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</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>TesterEJB</ejb-name>
                        <method-intf>LocalHome</method-intf>
                        <method-name>create</method-name>
                        <method-params/>
                   </method>
              </method-permission>
              <container-transaction>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    And here's my web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
         <display-name>oc4jWAR</display-name>
         <filter>
              <filter-name>TestFilter</filter-name>
              <display-name>TestFilter</display-name>
              <description/>
              <filter-class>oc4jtest.TestFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>TestFilter</filter-name>
              <url-pattern>*.jsp</url-pattern>
         </filter-mapping>
         <servlet>
              <servlet-name>test</servlet-name>
              <display-name>test</display-name>
              <jsp-file>/test.jsp</jsp-file>
         </servlet>
         <session-config>
              <session-timeout>30</session-timeout>
         </session-config>
         <welcome-file-list>
              <welcome-file>/test.jsp</welcome-file>
         </welcome-file-list>
         <ejb-local-ref>
              <ejb-ref-name>ejb/TesterEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <local-home>oc4jtest.TesterHome</local-home>
              <local>oc4jtest.Tester</local>
              <ejb-link>ejb-jar-ic.jar#TesterEJB</ejb-link>
         </ejb-local-ref>
    </web-app>
    What's wrong?
    Comments would be appreciated!
    Thanks!
    Peter
    PS: The application runs fine on Sun's Reference Implementation!

    Hi!
    I have tried to deploy a very simple (Hello World like)EJB-Application. It contains a simple stateless SessionBean (with local interfaces) and a JSP which is using the EJB.
    Opening the JSP i get the following error message:
    javax.naming.NamingException: Error instantiating web-app JNDI-context: No location specified and no suitable instance found for the ejb-local-ref 'ejb/TesterEJB', an EJB matching it's ejb-link 'ejb-jar-ic.jar#TesterEJB' was found, but it contained an Entity, not a Session
    Here's my ejb-jar.xml:
    <?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>oc4jJAR</display-name>
         <enterprise-beans>
              <session>
                   <display-name>TesterEJB</display-name>
                   <ejb-name>TesterEJB</ejb-name>
                   <local-home>oc4jtest.TesterHome</local-home>
                   <local>oc4jtest.Tester</local>
                   <ejb-class>oc4jtest.TesterBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <security-identity>
                        <description/>
                        <use-caller-identity/>
                   </security-identity>
              </session>
         </enterprise-beans>
         <assembly-descriptor>
              <method-permission>
                   <unchecked/>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getPrimaryKey</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getEJBLocalHome</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</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>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>remove</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</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>TesterEJB</ejb-name>
                        <method-intf>LocalHome</method-intf>
                        <method-name>create</method-name>
                        <method-params/>
                   </method>
              </method-permission>
              <container-transaction>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    And here's my web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
         <display-name>oc4jWAR</display-name>
         <filter>
              <filter-name>TestFilter</filter-name>
              <display-name>TestFilter</display-name>
              <description/>
              <filter-class>oc4jtest.TestFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>TestFilter</filter-name>
              <url-pattern>*.jsp</url-pattern>
         </filter-mapping>
         <servlet>
              <servlet-name>test</servlet-name>
              <display-name>test</display-name>
              <jsp-file>/test.jsp</jsp-file>
         </servlet>
         <session-config>
              <session-timeout>30</session-timeout>
         </session-config>
         <welcome-file-list>
              <welcome-file>/test.jsp</welcome-file>
         </welcome-file-list>
         <ejb-local-ref>
              <ejb-ref-name>ejb/TesterEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <local-home>oc4jtest.TesterHome</local-home>
              <local>oc4jtest.Tester</local>
              <ejb-link>ejb-jar-ic.jar#TesterEJB</ejb-link>
         </ejb-local-ref>
    </web-app>
    What's wrong?
    Comments would be appreciated!
    Thanks!
    Peter
    PS: The application runs fine on Sun's Reference Implementation!

  • Cmp2.0 /local interface

    Hi! I'm trying to deploy the wrox ch16 sample on cmp2.0 and local interfaces and got the following error:
    java.lang.InstantiationException: local/local-home tag not supported in this version
    Does OC4J ver 9.0.2 supports the new cmp2/cmr and local interfaces?
    Thanks.

    Pedro -- Local interfaces were not available in v902 but they are available in the OC4J v903 Developer Preview. You can download this from OTN. Please start at http://otn.oracle.com/tech/java/oc4j/content_preview.html to find the download as well as updated documentation and more data about the J2EE compliant version of OC4J.
    Thanks -- Jeff

  • Lookup for local interfaces.

    Isn't lookup for local interfaces allowed from web client. I have defined a
    ejb-reference for the bean in my web.xml. When I do a lookup as
    TestBeanLocalHome home = (TestBeanLocalHome)
    ic.lookup("java:comp/env/ejb/TestBeanLocal");
    This statement result in an error
    javax.naming.NameNotFoundException: Unable to resolve
    comp/env/ejb/TestSLSBeanLocal/ Resolved: 'comp/env/ejb'
    Unresolved:'TestBeanLocal' ; remaining name ''
    at
    weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingN
    ode.java:887)
    at
    weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:219)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:183)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:339)
    at
    weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWr
    apper.java:36)
    at
    weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124
    at javax.naming.InitialContext.lookup(InitialContext.java:345)
    at jsp_servlet.__client._jspService(__client.java:108)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    The same thing works when lookup is done for remote interface.
    Regards,
    Rupesh.

    You need to use "ejb-local-ref" to refer to local interfaces. I meant
    "ejb-local-ref" element was not available in web.xml in Servlet 2.2. They
    were added in Servlet 2.3 specification. So unless your app server is
    Servlet 2.3 compliant it does not need to support references to local
    interfaces in web components (servlets or jsps). Weblogic 6.1 did not seem
    to support them last time I tried.
    -- Anand
    "Rupesh" <[email protected]> wrote in message
    news:[email protected]...
    what do u mean by local interface in web component? its ejb's local
    interfaces and lookups are any way being
    done using ejb-ref and ref mapping are given in weblogic.xml.
    Where does Servlet spec come into the picture?
    Do you mean to say that you can not lookup for local home from a jsp in
    WL6.1?
    Regards,
    Rupesh.
    Anand Byrappagari <[email protected]> wrote in message
    news:[email protected]...
    Are you using Weblogic 6.1? Then local interfaces in web components arenot
    supported. Local interfaces were added only in Servlet 2.3 I think.Weblogic
    6.1 is not completely compliant with Servlet 2.3.
    -- Anand
    "Rupesh" <[email protected]> wrote in message
    news:[email protected]...
    Isn't lookup for local interfaces allowed from web client. I have
    defined
    a
    ejb-reference for the bean in my web.xml. When I do a lookup as
    TestBeanLocalHome home = (TestBeanLocalHome)
    ic.lookup("java:comp/env/ejb/TestBeanLocal");
    This statement result in an error
    javax.naming.NameNotFoundException: Unable to resolve
    comp/env/ejb/TestSLSBeanLocal/ Resolved: 'comp/env/ejb'
    Unresolved:'TestBeanLocal' ; remaining name ''
    at
    weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingN
    ode.java:887)
    at
    weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:219)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:183)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:339)
    at
    weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWr
    apper.java:36)
    at
    weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124
    at javax.naming.InitialContext.lookup(InitialContext.java:345)
    at jsp_servlet.__client._jspService(__client.java:108)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    The same thing works when lookup is done for remote interface.
    Regards,
    Rupesh.

  • Performance: T3 vs. Local Interfaces ?

    Hi there!
    What gain in performance can be expected from Local Interfaces?
    T3 and Local Interfaces are ment to tackle the same problem, if I'm not mistaken:
    enabling a local call to a Bean
    without serializing the parameters (enabling call by reference).
    I have implemented a test scenario using:
    - T3 with <enable-call-by-reference> false
    - T3 with <enable-call-by-reference> true
    - Local Interfaces and <enable-call-by-reference> false
    The testcase with T3 and <enable-call-by-reference> false is the slowest obviously.
    The testcase with T3 and <enable-call-by-reference> true works 15% faster.
    The testcase with local interfaces shows NO improvement compared to
    T3 and <enable-call-by-reference> false.
    Is there anything else I have to think about when using local Interfaces - any
    switch forgotten?
    Or do local interfaces do not improve performance?
    Thanks for any help...
    Manfred Schneider

    Hi there!
    What gain in performance can be expected from Local Interfaces?
    T3 and Local Interfaces are ment to tackle the same problem, if I'm not mistaken:
    enabling a local call to a Bean
    without serializing the parameters (enabling call by reference).
    I have implemented a test scenario using:
    - T3 with <enable-call-by-reference> false
    - T3 with <enable-call-by-reference> true
    - Local Interfaces and <enable-call-by-reference> false
    The testcase with T3 and <enable-call-by-reference> false is the slowest obviously.
    The testcase with T3 and <enable-call-by-reference> true works 15% faster.
    The testcase with local interfaces shows NO improvement compared to
    T3 and <enable-call-by-reference> false.
    Is there anything else I have to think about when using local Interfaces - any
    switch forgotten?
    Or do local interfaces do not improve performance?
    Thanks for any help...
    Manfred Schneider

  • Using EJB Local Interface problem

    Hi to all
    I have got a problem in using Local EJB Interface in Weblogic , please attention to my description
    I use JDeveloper as IDE
    At first I create an Application in JDeveloper that has two projects that their names are Model and ViewContorller that first one contains my EJB and another contains my JSP page respectively
    The EJB code is :
    @Stateless(name="AliEJB001Bean")
    @Remote
    @Local
    public class AliEJB001Bean implements AliEJB001, AliEJB001Local {
    public AliEJB001Bean() {
    public String Hi(){
    return "Hi000";
    And its Local Interface code is :
    @Local
    public interface AliEJB001Local {
    String Hi();
    I deploy Model project to an EJB Jar file that its name is AliEE1ejb1.jar
    and I deploy the ViewContorller project to a WAR file that its name is AliEE1WebApp.war
    Now I add this tags to web.xml
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    </ejb-local-ref>
    Then I deploy the Application to an EAR file by name AliEE1
    After those I run my JSP page witch calls the EJB in JDeveloper (through Local EJB Interface) , JDeveloper deploy my Application to the ItegratedWeblogicServer
    Ultimately the JSP can calls the EJB through Local Interface and use the Hi method and shows me the result but JDeveloper while compiles the application give me these Warnings :
    Warning: <May 15, 2011 9:02:52 AM PDT> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
    Warning: There are 1 nested errors:
    Warning: weblogic.servlet.internal.dd.compliance.ComplianceException: Element "<ejb-local-ref>" with ejb-ref-name "ali/testejb" must either specify a valid ejb-link element or have a corresponding ejb-reference-descriptor element in weblogic.xml with a valid jndi-name.
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:74)
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:80)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.validate(EJBRefsComplianceChecker.java:97)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.checkEJBLocalRef(EJBRefsComplianceChecker.java:47)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.check(EJBRefsComplianceChecker.java:39)
    Warning:      at weblogic.servlet.internal.dd.compliance.ComplianceUtils.checkCompliance(ComplianceUtils.java:48)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.checkCompliance(JspcInvoker.java:145)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:198)
    Warning:      at weblogic.application.compiler.AppcUtils.compileWAR(AppcUtils.java:376)
    Warning:      at weblogic.application.compiler.WARModule.compile(WARModule.java:245)
    Warning:      at weblogic.application.compiler.flow.SingleModuleCompileFlow.proecessModule(SingleModuleCompileFlow.java:18)
    Warning:      at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    Warning:      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    Warning:      at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
    Warning:      at weblogic.application.compiler.WARCompiler.compile(WARCompiler.java:29)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:112)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:37)
    Warning:      at weblogic.application.compiler.Appc.runBody(Appc.java:198)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:158)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:115)
    Warning:      at weblogic.application.compiler.Appc.main(Appc.java:257)
    Warning:      at weblogic.appc.main(appc.java:14)
    According to the warning messages I wanna add <ejb-link> tag to the web.xml for resolving warnings I add the <ejb-link> like this:
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    <ejb-link>AliEE1ejb1.jar#AliEJB001Bean </ejb-link>
    </ejb-local-ref>
    But when JDeveloper want deploy my application again it shows me this Error
    [09:29:59 AM] Redeploying Application...
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1305476999381' for task '7'. Error is: 'weblogic.application.ModuleException: Could not setup environment'
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    [09:30:00 AM] #### Deployment incomplete. ####
    [09:30:00 AM] Remote deployment failed
    Do you know how I can solve this issue ?
    thanks

    Thank you so much
    I find out the solution
    I have to define my EJB in ejb-jar.xml like this
    <enterprise-beans>
         <session>
         <ejb-name>ReplicableSFSB2</ejb-name>
         <business-local>model2.AliEJB001Local</business-local>
         <business-remote>model2.AliEJB001</business-remote>
         <ejb-class>model2.AliEJB001Bean</ejb-class>
         <session-type>Stateless</session-type>
         </session>
    </enterprise-beans>
    And then I use the EJB name witch I defined in <ejb-name> tag in <ejb-link> tag of web.xml
    like this
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb2</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model2.AliEJB001Local</local>
    <ejb-link>Model2EJB.jar#ReplicableSFSB2</ejb-link>
    </ejb-local-ref>

  • RPC web service session beans and local interfaces

    I am wondering if it is possible to use EJB 2.0's local
    interface (vs remote interface) with 6.1's RPC web service
    session beans. Since WLS generates the SOAP servlet that
    invokes the RPC session bean and I do not find
    a way to some how tell SOAP servlet to use local interface to
    get the session bean's local home interface, I am not sure
    this can be done.
    Any comments would be appreciated.
    Thanks.
    Peter

    Ta. Thanks for the info.
    Any idea when Local I/F support is due?
    -Nick
    "Neal Yin" <[email protected]> wrote:
    >
    "Nick Minutello" <[email protected]>
    wrote
    in message news:3d4413a4$[email protected]..
    I was just about to post the very same question - but for WLS 7.0.0.1.
    There are essentially two questions:
    1) (from a functional perspective)
    Can I expose Local Interfaces as SOAP using the auto-generation(servicegen ant
    tasks)?Local Interfaces support is coming.
    2) (from a performance perspective)
    Does the generated SOAP implementation go via the (expensive) RemoteInterface
    (ie marshalling) - or is the RMI marshalling optimised out (by setting<enable-call-by-reference>true</>)?
    You can set this option by yourself on your EJB. Web service runtime
    doesn't
    do any magic in this area.
    Regards,
    Nick
    "Peter" <[email protected]> wrote:
    I am wondering if it is possible to use EJB 2.0's local
    interface (vs remote interface) with 6.1's RPC web service
    session beans. Since WLS generates the SOAP servlet that
    invokes the RPC session bean and I do not find
    a way to some how tell SOAP servlet to use local interface to
    get the session bean's local home interface, I am not sure
    this can be done.
    Any comments would be appreciated.
    Thanks.
    Peter

  • Remote and local interface on same ejb 3.0 bean instance

    Hi,
    Is it posible to get remote and local interface on same ejb 3.0 bean instance.
    For example get local interface of a bean and than pass it as remote to client.
    Both interfaces must operate on same bean instance.
    Thanks
    Zlaja

    yes. You can implement multiple interfaces on a single class, so you can add a local and a remote interface. One trick to avoid duplicate code is to simply make the remote interface extend the local interface; then you only have to add the @Remote annotation and you're done.
    For example get local interface of a bean and than pass it as remote to client.You don't pass an instances to a client, a client looks up a remote instance of the bean through JNDI.

  • JBoss and local interfaces (JNDI)

    I'm trying to do simple example involving local interfaces on JBoss.
    There is Bar remote interface, which uses Foo, local interface. And the problem is - i cant locate Foo within Bar:
    ejb-jar.xml:
    <session>
    <ejb-name>BarEjb</ejb-name>
    </session>
    <entity>
    <ejb-name>FooEjb</ejb-name>
    </entity>To make FooEjb accessible for Bar via local interface, as manual says, i have to put additional reference in ejb-jar.xml for Bar:
    <ejb-local-ref>
         <ejb-ref-name>LocalFooEjb</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
         <local-home>beans.FooHome</local-home>
         <local>beans.Foo</local>
         <ejb-link>FooEjb</ejb-link>
    </ejb-local-ref>But it doesnt change anything, JBoss maps Foo like this: "Bound EJB LocalHome 'FooEjb' to jndi 'local/FooEjb@13595063'", and
    public class  Bar ... {
    Object ref = context.lookup("LocalFooEjb");
    }resuluts in exception:
    "java.lang.RuntimeException: LocalFooEjb not bound ..."
    Question: how do i map local interfaces within JBoss to some human-readable and predictable name?
    Thanks for help.
    update:
    specifying JNDI names in jboss.xml does the trick, but i still dont understand why JBoss ignores local-ref element. So anyone who can explain is welcome.
    jboss.xml
    ...xml declaration..
    <jboss>
         <enterprise-beans>
              <session>
                   <ejb-name>StockListEjb</ejb-name>
                   <jndi-name>remote/StockListEjb</jndi-name>
              </session>
              <entity>
                   <ejb-name>StockEjb</ejb-name>
                   <local-jndi-name>local/StockEjb</local-jndi-name>
              </entity>
         </enterprise-beans>
    </jboss>Edited by: anykeyN on Jun 29, 2008 7:06 AM

    [skipped]

  • CMR and Local Interfaces

    I have a question on setting up CMR in an environment where I want to utilize local
    interfaces within a weblogic server instance. In the deployment descriptor, I have
    set up the home, remote, local-home, local, and ejb-class entries. I then want to
    define the relationships between two CMP entity beans. Here is where I run into
    problems.
    1) If I define the CMR field using the local interface, I get an error stating that
    the type defined by the bean for the field does not match that of the remote interface.
    2) If I define the CMR field using the remote interface, I get an error stating that
    the bean must use the local interface for the CMR if one exists.
    Seems kind of circular to me. What am I missing?

    If you want to be able to have mutiple children companies for a parent
    company and you want to be able to query for the parent company for a given
    comapnay then this is the XML I would do something like the following. In
    your xml you had the mutiplicities inverted and also the cmr field was
    either in the wrong place or misnamed (ie, if it had to be in the top block
    then it should have been "childCompanies" instead of "parentCompany").
    Assuming the bean name in the descriptor for the CompanyEJB is Company:
    <ejb-relation>
    <ejb-relation-name>Company-ParentCompany</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ChildCompanies</ejb-relationship-rol
    e-name>
    <multiplicity>one</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ParentCompany</ejb-relationship-role
    -name>
    <multiplicity>many</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>parentCompany</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    In the CompanyEJB you would have:
    public abstract CompanyLocal getParentCompany();
    public abstract void setParentCompany( CompanyLocal parent );
    -- Anand
    "Steve Ebersole" <[email protected]> wrote in message
    news:[email protected]...
    >
    The jar I am running through ejbc is attached (with source). The EJBobject naming
    conventions are as follows:
    ejb-class = CompanyEJB
    home = CompanyHome
    remote = Company
    local-home = CompanyLocalHome
    local = CompanyLocal
    The pertinent ejb-jar snippet:
    <ejb-relation>
    <ejb-relation-name>Company-ParentCompany</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ChildCompanies</ejb-relationship-rol
    e-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>parentCompany</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ParentCompany</ejb-relationship-role
    -name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    And the weblogic-cmp-rdbms-jar snippet:
    <weblogic-rdbms-relation>
    <relation-name>Company-ParentCompany</relation-name>
    <weblogic-relationship-role>
    <relationship-role-name>Company-Has-ParentCompany</relationship-role-name>
    </weblogic-relationship-role>
    <weblogic-relationship-role>
    <relationship-role-name>Company-Has-ChildCompanies</relationship-role-name>
    <column-map>
    <foreign-key-column>PRNT_COMP_ID</foreign-key-column>
    <key-column>COMP_ID</key-column>
    </column-map>
    </weblogic-relationship-role>
    </weblogic-rdbms-relation>
    In the CompanyEJB, these are the two scenarios I tried:
    1)
    public abstract Company getParentCompany();
    public abstract void setParentCompany( Company prnt );
    2)
    public abstract CompanyLocal getParentCompany();
    public abstract void setParentCompany( CompanyLocal prnt );
    The only way I have been able to get it to work so far is to use thesyntax in #1
    above and then to remove all references to the local interfaces in thedeployment
    descriptors.
    Thanks for all help

Maybe you are looking for

  • Logic 9 Issue Triggering Wrong 3rd Party Samples

    I know the question says 3rd party but bear with me because I have ruled out issues with the 3rd party libraries and players. This is my Issue: So far no one from 8dio, Native Instruments, or Apple can fix this and I am completely out of ideas. I rec

  • Bridge Mode Problems?

    Connected my new AEBS gigabit model one week ago to our existing home network with the AEBS in bridge mode. All worked fine for 7-days but we lost internet connection yesterday. The Belkin router needed to be reset and Belkin support says its because

  • Can't browse to specific web page

    I am having an interesting problem browsing to the website http://members.boston.com/reg/login.do This is the login page for Boston.com; you are asked to create an account to access more content. I can access this page from my MacBook (Intel, 10.4.10

  • IPad Command & Conquer 3

    I am not sure hwere to ask this question. I have been trying to get past the first level of C&C for 16 months and I am not able to. I am playing the Allies and every time I think I am able to go in and attack the russians I get pounded and within a f

  • Reception on Droid X

    Anyone have a phone that is noisy. I swapped out the phone and it still sounds terrible. I was right next to a cell tower and it sounds like a swishing noise in the background..