0 Replies Latest reply on Jul 10, 2012 5:07 AM by rossog

    Invoking JBoss EAP5 EJBs from EAP6

    rossog

      Good morning everybody.

      I'm trying to solve a problem with new EAP6 (RedHat version 7.1.2). My company has a bunch of (almost) new ejb cluster, developed and maintained on EAP5 (RedHat 5.1.1 and 5.1.2). I'd like to suggest migration for the frontends to an EAP6, given the numerous benefits of the new platform.

      This is the situation: usually our frontends use Spring 3 and velocity as development framework, and SimpleRemoteStatelessSessionProxyFactoryBean as abstraction to invoke the ejb layer.

      I've managed to solve problems related to templating injection, but still I'm not able to deploy web frontend. I will try as much to clarify my conf.

      First, the error:

       

      10:49:53,658 ERROR [org.springframework.web.servlet.DispatcherServlet] (MSC service thread 1-4) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceStatusInterceptor': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private it.cmp.extranetpf.common.util.ServiceListHelper it.cmp.extranetpf.common.interceptors.ServiceStatusInterceptor.serviceListHelper; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceListHelper': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private it.cmp.ejb.service.ServiceGenericEJB it.cmp.extranetpf.common.util.ServiceListHelper.serviceGenericEJB; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [it.cmp.ejb.service.ServiceGenericEJB] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=serviceGenericEjb)}

      Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceGenericEjb' defined in ServletContext resource [/WEB-INF/conf/app-config.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: serviceGenericEjb -- service jboss.naming.context.java.serviceGenericEjb

      Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceGenericEjb' defined in ServletContext resource [/WEB-INF/conf/app-config.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: serviceGenericEjb -- service jboss.naming.context.java.serviceGenericEjb

              at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

      ...

       

      And this is the bean definition:

       

      <bean id="serviceGenericEjb" lazy-init="true" class="it.cmp.extranetpf.common.util.EjbFactoryBean" >

      <property name="jndiName" value="serviceGenericEjb"/>

      <!--

      <property name="jndiName" value="ejb:jndirvinterface/jndirvinterface-ejb//serviceGenericEjb!it.cmp.ejb.service.ServiceGenericEJB"/>

      -->

      <property name="businessInterface" value="it.cmp.ejb.service.ServiceGenericEJB"/>

      <property name="jndiTemplate"><ref bean="remoteBankingJndi"/></property>

      <property name="refreshHomeOnConnectFailure" value="true" />

      </bean>

       

      And finally my jndi.properties:

       

      java.naming.provider.url=remote://remotehost.hostdomain:4546

       

      As you can see I tryed also the new romoting solution (jndiName commented out), but still no luck.

      My question is: is there a way to solve this without modifing frontend code (with works smoothly if deployed on EAP5)?

      Thank you very much.