Announcement Announcement Module
No announcement yet.
Value of JNDI Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Value of JNDI

    I'm trying to use stateful bean(ejb 3.0) in spring(2.5), but i'm don't know how should look value of JNDI property. I would like to add that I use wls 10.
    I get this error: javax.naming.NameNotFoundException:

    <bean id="bean" class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean">
    <property name="jndiName" value="SpringTest-ejb/ejbModule/com/ejb/UserBean" />
    <property name="resourceRef" value="false"/>
    <property name="businessInterface" value="com.ejb.UserLocal" />

    Thanks for all responses.
    Last edited by lukep1984; Oct 6th, 2008, 06:20 AM.

  • #2
    Still problem

    <bean id="bean" class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean">
    <property name="jndiName" value="java:comp/env/ejb/UserBean" />
    <property name="resourceRef" value="false"/>
    <property name="businessInterface" value="" />
    <property name="lookupHomeOnStartup" value="false" />

    public interface UserLocal {
    List<Usr> findUsers();

    public class UserBean implements UserLocal {

    EntityManager em;

    public List<Usr> findUsers() {


    org.springframework.ejb.access.EjbAccessException: Failed to locate local EJB [ejb/UserBean]; nested exception is javax.naming.NameNotFoundException: Unable to resolve 'ejb.UserBean'. Resolved 'ejb'; remaining name 'UserBean'
    javax.naming.NameNotFoundException: While trying to look up comp/env/ejb/UserBean in /app/webapp/SpringTest-war/19699640.; remaining name 'comp/env/ejb/UserBean'

    What should I change or add?!
    Thanks, for all responses.


    • #3
      Still problem

      I'm little bit far in searching solution for using ejb stateless bean in spring bean.
      Now I declared ejb bean in:


      weblogic.xml (i'm not sure if it's neccessary too):

      and my applicationContext.xml declaration for ejb bean looks:
      <jee:jndi-lookup id="bean"
      resource-ref="false" lookup-on-startup="false"

      Unfortunately, I still have error:
      javax.naming.NameNotFoundException: While trying to look up comp/env/ejb/userBean in /app/webapp/SpringTest-war/31074016.

      Now, after deployment ejb, local-jndi for this bean in weblogic administartive console is set to my value ejb/userBean, but I have no idea why it doesn't work.

      Thanks for all responses.
      Best regards,


      • #4
        Still problem

        Can Anyone wrote few sentecnces about what is neccessary to set in xml files of enterprise application consisting of ejb- and web-module. I have already spent 3 days to find right way to have access to ejb in spring bean. The chapter 18 in sprng reference hasn't enough information for me.

        Best regards,


        • #5
          A little bit different problem

          I have already(after 4 days)found solution to access stateless bean from spring bean, but I have problem when I deployed ejbmodule alone out of my enterprise application and then I want to access to the same bean from web application.
          Thanks for all responses.