Hello, I'm trying to setup OpenEJB3 in order to reference a Spring Bean from a stateless session bean. I'm using the OpenEJB 3.1 webapp into a Tomcat 5.5 instance and I wonder how to setup OpenEJB3 to allow it to "see" Spring Beans ?
Currently OpenEJB3 is starting into Tomcat and it is deploying my EJBs but it does'nt seems to see the springs beans as I get the following exceptions: org.apache.openejb.OpenEJBException: No provider available for resource-ref 'null' of type 'myPackage.MySpringBeanInterface for MyStatelessBean'. at org.apache.openejb.config.AutoConfig.autoCreateResource(AutoConfig.java:1312) at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1305) at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1256) at org.apache.openejb.config.AutoConfig.processResourceRef(AutoConfig.java:799) at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:724) at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:133) at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:228) at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:588) at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.start(TomcatWebAppBuilder.java:238) at org.apache.openejb.tomcat.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:58) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) I've configured spring using the following XML file and it starts correctly (using its listener configured in my web.xml file): <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <!-- Containers --> <bean name="SpringDefinedSingletonContainer" class="org.apache.openejb.spring.SingletonContainer"> <property name="accessTimeout" value="45 sec"/> </bean> <bean name="SpringDefinedStatelessContainer" class="org.apache.openejb.spring.StatelessContainer"> <property name="poolSize" value="50"/> </bean> <bean name="SpringDefinedStatefulContainer" class="org.apache.openejb.spring.StatefulContainer"> <property name="poolSize" value="50"/> </bean> <bean name="SpringDefinedMdbContainer" class="org.apache.openejb.spring.MdbContainer"> <property name="resourceAdapter" value="SpringDefinedJMSResourceAdapter"/> <property name="instanceLimit" value="50"/> </bean> <bean name="SpringDefinedBmpContainer" class="org.apache.openejb.spring.BmpContainer"> <property name="poolSize" value="50"/> </bean> <bean name="SpringDefinedCmpContainer" class="org.apache.openejb.spring.CmpContainer"> </bean> <bean name="TransactionManager" class="org.apache.geronimo.transaction.manager.GeronimoTransactionManager"/> <bean name="SecurityService" class="org.apache.openejb.core.security.SecurityServiceImpl"/> <bean name="classPathApplication" class="org.apache.openejb.spring.ClassPathApplication"/> <bean id="MySpringBean" class="myPackage.MySpringBean"> </bean> </beans> I've added the openejb-sping.jar jar file and all the Spring jar files into the lib directory of OpenEJB3 webapp. Thanks in advance. Nicolas. Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.