Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-4319

Local Websphere EJB lookup fails in 2.5.1 and worked in 2.5.0


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.5.2
    • Component/s: EJB
    • Labels:
    • Last commented by a User:


      In Spring 2.5.0, we had a local EJB being looked up with this spring definition:

      <jee:local-slsb jndi-name="ejb/WebCacheManager" business-interface="com.bc.dctm.webcache.ejb.WebCacheManagerLocal"
      lookup-home-on-startup="true" id="webcacheManagerEP" resource-ref="true"/>

      In spring 2.5.1, it appears that Spring is referencing the wrong class on the EJB to make method calls. The exception is:

      java.lang.NoSuchMethodException: com.bc.dctm.webcache.ejb.EJSLocalStatelessWebCacheManagerHome_940a93c6.query(java.lang.String, java.lang.String, java.util.List, java.lang.String)
      [1/10/08 19:48:08:505 GMT] 42193c4c SystemErr R at java.lang.Class.getMethod(Class.java(Compiled Code))
      [1/10/08 19:48:08:505 GMT] 42193c4c SystemErr R at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:73)
      [1/10/08 19:48:08:505 GMT] 42193c4c SystemErr R at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      [1/10/08 19:48:08:505 GMT] 42193c4c SystemErr R at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      [1/10/08 19:48:08:506 GMT] 42193c4c SystemErr R at $Proxy1.query(Unknown Source)
      [1/10/08 19:48:08:506 GMT] 42193c4c SystemErr R at com.roche.cwp.tool.expertpanel.dao.documentum.ExpertPanelContentDAODocumentum.retrieveContent(ExpertPanelContentDAODocumentum.java:174)

      The call being made is:
      wcoList = getWebcacheManager().query(webcacheInstance, query, values, sortBy);

      However, if looking in the generated EJB class EJSLocalStatelessWebCacheManagerHome_940a93c6 referenced above, there are only two methods: create and remove. It seems odd that Spring is looking at this WebCacheManagerHome class when it should be looking at this other generated class: EJSLocalStatelessWebCacheManager_940a93c6 which has our query method in it.

      The interface we reference com.bc.dctm.webcache.ejb.WebCacheManagerLocal is correct and it's the local business interface. We have also tried writing our EJB spring element like:

      <bean id="webcacheManagerEP"
      <property name="jndiName" value="ejb/WebCacheManager"/>
      <property name="businessInterface" value="com.bc.dctm.webcache.ejb.WebCacheManagerLocal"/>
      <property name="jndiEnvironment">
      <prop key="javax.naming.factory.initial">com.ibm.websphere.naming.WsnInitialContextFactory</prop>
      <prop key="javax.naming.provider.url">iiop://localhost:2809</prop>
      <property name="resourceRef" value="true"/>
      <property name="cacheHome" value="false"/>


      but we receive the same issue.




            • Assignee:
              juergen.hoeller Juergen Hoeller
              grant.gochnauer Grant Gochnauer
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:
                Days since last comment:
                10 years, 15 weeks ago