[jboss-user] [JBoss/Spring Integration] - Re: Jboss 5 Beta 2 and Spring Deployer
ragavgomatam
do-not-reply at jboss.com
Wed Jan 2 21:19:28 EST 2008
Ales,
As mentioned before, I have an EAR (ejb3.ear) with spring-inject.jar (spring-module) , ejb3.war (web module) and ejb3.jar (ejb 3 module). In my spring-inject.jar under META-INF I have a spring-inject-spring.xml and
in the application .xml I have as follows :-
<application xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
| http://java.sun.com/xml/ns/javaee/application_5.xsd"
| version="5">
| <description>Test ejb3 j2ee 5 application</description>
| <display-name>Ejb3</display-name>
| <module>
| <java>spring-inject.jar</java>
| </module>
| <module>
| <web>
| <web-uri>Ejb3.war</web-uri>
| <context-root>ejb3</context-root>
| </web>
| </module>
| <module>
| <ejb>Ejb3.jar</ejb>
| </module>
| </application>
My spring-inject-spring.xml under META-INF in spring-inject.jar:-
<?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:util="http://www.springframework.org/schema/util"
| xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
| http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
| <bean id="person" class="com.ejb3.domain.Person">
| <property name="firstName" value="Roger" />
| <property name="lastName" value="Daniel" />
| <property name="age" value="51" />
| </bean>
| </beans>
As you see the spring module is at the top. I still get errors in "spring-inject" not binding in jndi.
Error below :- You see the server is started, ejb deployed, spring interceptor instantiated, javax.naming.NameNotFoundException: spring-inject not bound
21:14:28,156 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.Beta3 (build: SVNTag=JBoss_5_0_0_Beta3 date=200712210026)] Started in 3m:3s:109ms
| 21:15:42,531 INFO [SpringInjectionInterceptor] Instantiating SpringInjectionInterceptor
| 21:15:45,328 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:ear=Ejb3.ear,jar=Ejb3.jar,name=CalculatorBean,service=EJB3 with dependencies:
| 21:15:45,328 INFO [MCKernelAbstraction] and supplies:
| 21:15:45,328 INFO [MCKernelAbstraction] Class:com.ejb3.interfaces.Calculator
| 21:15:47,484 INFO [EJBContainer] STARTED EJB: com.ejb3.beans.CalculatorBean ejbName: CalculatorBean
| 21:15:47,953 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:ear=Ejb3.ear,jar=Ejb3.jar,name=SayHelloBean,service=EJB3 with dependencies:
| 21:15:47,953 INFO [MCKernelAbstraction] and supplies:
| 21:15:47,953 INFO [MCKernelAbstraction] Class:com.ejb3.interfaces.SayHello
| 21:15:49,750 INFO [EJBContainer] STARTED EJB: com.ejb3.beans.SayHelloBean ejbName: SayHelloBean
| 21:15:50,422 INFO [CollectionFactory] JDK 1.4+ collections available
| 21:15:50,422 INFO [CollectionFactory] Commons Collections 3.x available
| 21:15:50,688 INFO [NamedXmlBeanDefinitionReader] Loading XML bean definitions from URL [vfsfile:/C:/jboss-5.0.0.Beta3/server/default/deploy/Ejb3.ear/spring-inject.jar/META-INF/jboss-spring.xml]
| 21:15:51,906 INFO [NamedXmlApplicationContext] Bean factory for application context [org.jboss.spring.factory.NamedXmlApplicationContext;hashCode=22372262]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [person]; root of BeanFactory hierarchy
| 21:15:51,906 INFO [NamedXmlApplicationContext] 1 beans defined in application context [org.jboss.spring.factory.NamedXmlApplicationContext;hashCode=22372262]
| 21:15:51,922 INFO [NamedXmlApplicationContext] Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource at 1504d66]
| 21:15:51,922 INFO [NamedXmlApplicationContext] Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster at 1504f68]
| 21:15:51,922 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [person]; root of BeanFactory hierarchy]
| 21:15:52,203 INFO [TomcatDeployment] deploy, ctxPath=/ejb3, vfsUrl=Ejb3.ear/Ejb3.war
| 21:15:52,516 INFO [ContextLoaderPlugIn] ContextLoaderPlugIn for Struts ActionServlet 'action, module '': initialization started
| 21:15:52,516 INFO [[/ejb3]] Initializing WebApplicationContext for Struts ActionServlet 'action', module ''
| 21:15:52,766 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-ejb3.xml]
| 21:15:52,906 INFO [XmlWebApplicationContext] Bean factory for application context [WebApplicationContext for namespace 'action-servlet']: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [/home,ejbLocalIntf]; root of BeanFactory hierarchy
| 21:15:52,906 INFO [XmlWebApplicationContext] 2 beans defined in application context [WebApplicationContext for namespace 'action-servlet']
| 21:15:52,906 INFO [XmlWebApplicationContext] Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource at 246609a]
| 21:15:52,906 INFO [XmlWebApplicationContext] Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster at 246629b]
| 21:15:52,922 INFO [UiApplicationContextUtils] Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource at 242a7bb]
| 21:15:52,922 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [/home,ejbLocalIntf]; root of BeanFactory hierarchy]
| 21:15:53,156 ERROR [STDERR] java.lang.RuntimeException: javax.naming.NameNotFoundException: spring-inject not bound
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:727)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.createBeanContext(StatefulContainer.java:103)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.pool.AbstractPool.createBeanContext(AbstractPool.java:130)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:79)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:56)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:58)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:113)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:351)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.createSession(StatefulContainer.java:296)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.session.SessionContainer.createSession(SessionContainer.java:457)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxyFactory.createProxy(StatefulLocalProxyFactory.java:148)
| 21:15:53,156 ERROR [STDERR] at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:55)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116577#4116577
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116577
More information about the jboss-user
mailing list