Announcement Announcement Module
Collapse
No announcement yet.
EJB home has no no-arg create() method Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • EJB home has no no-arg create() method

    Hi!
    I'm facing a problem while moving my web app from Tomcat to Weblogic.

    I have Weblogic Clustered SLSB EJB that are acting as Remote Facades of some spring beans extending the AbstractStatelessSessionBean. I used to have my web apps on Tomcat and everything worked alright accessing those EJB using the SimpleRemoteStatelessSessionProxyFactoryBean.

    Now I moved my Web Apps to the same Weblogic cluster and I'm getting the following exception:

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'direccionesService' defined in class path resource [cl-sii-sdi-ejemplo-bd-appCtx.xml]: Invocation of init method failed; nested exception is org.springframework.ejb.access.EjbAccessException: EJB home [ClusterableRemoteRef(3773857510744357739S:10.34.2.105:[7001,7001,-1,-1,7001,-1,-1,0,0]:mydomain:myserver [3773857510744357739S:10.34.2.105:[7001,7001,-1,-1,7001,-1,-1,0,0]:mydomain:myserver/294])/294] has no no-arg create() method
    Caused by: 
    org.springframework.ejb.access.EjbAccessException: EJB home [ClusterableRemoteRef(3773857510744357739S:10.34.2.105:[7001,7001,-1,-1,7001,-1,-1,0,0]:mydomain:myserver [3773857510744357739S:10.34.2.105:[7001,7001,-1,-1,7001,-1,-1,0,0]:mydomain:myserver/294])/294] has no no-arg create() method
    	at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.getCreateMethod(Ljava/lang/Object;)Ljava/lang/reflect/Method;(AbstractSlsbInvokerInterceptor.java:124)
    	at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.refreshHome()V(AbstractSlsbInvokerInterceptor.java:107)
    	at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.afterPropertiesSet()V(AbstractSlsbInvokerInterceptor.java:91)
    	at org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean.afterPropertiesSet()V(SimpleRemoteStatelessSessionProxyFactoryBean.java:96)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Ljava/lang/String;Ljava/lang/Object;Lorg/springframework/beans/factory/support/RootBeanDefinition;)V(AbstractAutowireCapableBeanFactory.java:1062)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Ljava/lang/String;Ljava/lang/Object;Lorg/springframework/beans/factory/support/RootBeanDefinition;)Ljava/lang/Object;(AbstractAutowireCapableBeanFactory.java:1029)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Ljava/lang/String;Lorg/springframework/beans/factory/support/RootBeanDefinition;[Ljava/lang/Object;)Ljava/lang/Object;(AbstractAutowireCapableBeanFactory.java:420)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject()Ljava/lang/Object;(AbstractBeanFactory.java:245)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(Ljava/lang/String;Lorg/springframework/beans/factory/ObjectFactory;)Ljava/lang/Object;(DefaultSingletonBeanRegistry.java:141)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;(AbstractBeanFactory.java:242)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ljava/lang/String;)Ljava/lang/Object;(AbstractBeanFactory.java:156)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons()V(DefaultListableBeanFactory.java:287)
    	at org.springframework.context.support.AbstractApplicationContext.refresh()V(AbstractApplicationContext.java:348)
    	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>([Ljava/lang/String;Lorg/springframework/context/ApplicationContext;)V(ClassPathXmlApplicationContext.java:92)
    	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>([Ljava/lang/String;)V(ClassPathXmlApplicationContext.java:77)
    	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Ljava/lang/String;)V(ClassPathXmlApplicationContext.java:68)
    	at cl.sii.sdi.ejemplo.bd.DefaultBD.<clinit>()V(DefaultBD.java:18)
    	at jrockit.vm.Classes.forName0(Ljava/lang/String;ZI)I(Unknown Source)
    	at jrockit.vm.Classes.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;(Unknown Source)
    	at java.lang.Class.forName(Ljava/lang/String;I)Ljava/lang/Class;(Unknown Source)
    	at uk.ltd.getahead.dwr.create.NewCreator.setClass(Ljava/lang/String;)V(NewCreator.java:35)
    	at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
    	at jrockit.reflect.NativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
    	at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
    	at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;I)Ljava/lang/Object;(Unknown Source)
    	at uk.ltd.getahead.dwr.util.LocalUtil.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V(LocalUtil.java:281)
    	at uk.ltd.getahead.dwr.impl.DefaultCreatorManager.addCreator(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V(DefaultCreatorManager.java:105)
    	at uk.ltd.getahead.dwr.impl.DefaultConfiguration.loadCreate(Lorg/w3c/dom/Element;)V(DefaultConfiguration.java:255)
    	at uk.ltd.getahead.dwr.impl.DefaultConfiguration.loadAllows(Lorg/w3c/dom/Element;)V(DefaultConfiguration.java:196)
    	at uk.ltd.getahead.dwr.impl.DefaultConfiguration.addConfig(Lorg/w3c/dom/Document;)V(DefaultConfiguration.java:90)
    	at uk.ltd.getahead.dwr.impl.DefaultConfiguration.addConfig(Ljava/io/InputStream;)V(DefaultConfiguration.java:66)
    	at uk.ltd.getahead.dwr.AbstractDWRServlet.readFile(Ljava/lang/String;Luk/ltd/getahead/dwr/Configuration;)V(AbstractDWRServlet.java:188)
    My Business Delegates Application Context Conf is the following:

    Code:
     <!-- PROPERTIES -->
     <bean id="propertyConfigurer" class="cl.sii.sdi.core.util.SdiPropertyPlaceHolderConfigurer"></bean>
     <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
      <property name="environment">
       <props>
        <prop key="java.naming.factory.initial">${cl.sii.sdi.j2ee.server.ejemplo.factory}</prop>
        <prop key="java.naming.provider.url">${cl.sii.sdi.j2ee.server.ejemplo.url}</prop>
       </props>
      </property>
     </bean>
     <bean id="direccionesService" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
      <property name="jndiName" value="cl.sii.sdi.ejemplo.service.DireccionesService" />
      <property name="businessInterface" value="cl.sii.sdi.ejemplo.service.DireccionesService" />
       <property name="jndiTemplate">
       <ref bean="jndiTemplate" />
       </property>
     </bean>
    </beans>
    Any idea why is this happening?

    Many thanks in advance!

    Johann

  • #2
    Problem solved, I just needed to add the "expectedType" attribute.

    <bean id="direccionesService" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
    <property name="jndiName" value="cl.sii.sdi.ejemplo.service.DireccionesServi ce" />
    <property name="businessInterface" value="cl.sii.sdi.ejemplo.service.DireccionesServi ce" />
    <property name="expectedType" value="cl.sii.sdi.ejemplo.ejb.rf.DireccionesRFHome " />
    <property name="jndiTemplate">
    <ref bean="jndiTemplate" />
    </property>
    </bean>

    Comment

    Working...
    X