Je migre une application de JBoss 5 vers 7. Mais c'est comme si JBoss 7 ne supportait pas les binaires JNDI programmées. Je reçois le message d'erreur ci-dessous lorsque je démarre le serveur web:JBoss 7 - Intégration Spring
14: 50: 05752 INFO [stdout] (fil service MSC 1-1) 05.09.2011 14: 50: 05,750 ERREUR [MSC thread de service 1-1] org.springframework.web.context.ContextLoader initialisation du contexte échoué org.springframework.beans.factory.BeanCreationException: erreur création haricot avec le nom 'testApplicationSessionFactory' défini dans la ressource ServletContext [/ WEB-INF/applicationContext.xml]: Invocation de la méthode init a échoué; exception imbriquée est java.lang.UnsupportedOperationException: contexte de nommage est en lecture seule
14: 50: 05753 INFO [stdout] (thread de service MSC 1-1) à org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory .initializeBean (AbstractAutowireCapableBeanFactory.java:1330)
14: 50: 05753 INFO [stdout] (thread de service MSC 1-1) à org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java: 475)
14: 50: 05,754 INFO [stdout] (fil de service MSC 1-1) à org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory 1.run $ (AbstractAutowireCapableBeanFactory.java:411)
14: 50: 05754 INFO [stdout] (fil de service MSC 1-1) à java.security.AccessController .doPrivileged (native Method)
14: 50: 05754 INFO [stdout] (filetage service MSC 1-1) à org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:382)
14: 50: 05,755 INFO [stdout] (fil de service MSC 1-1) à org.springframework.beans.factor y.support.AbstractBeanFactory 1.getObject $ (AbstractBeanFactory.java:271)
14: 50: 05755 INFO [stdout] (filetage de service MSC 1-1) à org.springframework.beans.factory.support.DefaultSingletonBeanRegistry. getSingleton (DefaultSingletonBeanRegistry.java:222)
14: 50: 05756 INFO [stdout] à org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (thread de service MSC 1-1) (AbstractBeanFactory.java:268
14: 50: 05 756 INFO [stdout] (fil de service MSC 1-1) à org.springframework.beans.factory.support.AbstractBeanFactory.getBean (Abstra ctBeanFactory.java:170)
14: 50: 05756 INFO [stdout] (filetage 1-1) de service du MSC à org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:464)
14: 50: 05,756 INFO [stdout] (fil de service MSC 1-1) à org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java: 719)
14: 50: 05757 INFO [stdout] (filetage service MSC 1-1) à org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:378)
14 : 50: 05757 INFO [stdout] (filetage service MSC 1-1) à org.springframework.web.context.ContextLoader.createWebApplicationContext (ContextLoader.java:254)
14: 50: 05757 INFO [stdout] (Fil de service MSC 1-1) à org.springframework.web.context.ContextLoader.initWebApplicationContext (ContextLoader.java:198)
14: 50: 05758 INFO [stdout] (thread de service MSC 1-1) à org.springframework.web.context.ContextLoaderServlet.init (ContextLoaderServlet.java:83)
14: 50: 05759 INFO [stdout] (thread de service MSC 1-1) à javax.servlet.GenericServlet.init (GenericServlet.java:242)
14: 50: 05759 INFO [stdout] (thread de service MSC 1-1) à org.apache.catalina.core.StandardWrapper.loadServlet (StandardWrapper.java:1202)
14: 50: 05,759 INFO [stdout] (fil de service MSC 1-1) à org.apache.catalina.core.StandardWrapper.load (StandardWrapper.java:1102)
14: 50: 05760 INFO [stdout] (thread de service MSC 1-1) à org.apache.catalina.core. StandardContext.loadOnStartup (StandardContext.java:3631)
14: 50: 05760 INFO [stdout] (thread de service MSC 1-1) à org.apache.catalina.core.StandardContext.start (StandardContext.java:3844)
14: 50: 05760 INFO [stdout] (filetage 1-1) de service du MSC à org.jboss.as.web.deployment.WebDeploymentService.start (WebDeploymentService.java:70)
14: 50: 05760 INFO [stdout] (fil service MSC 1-1) à org.jboss.msc.service.ServiceControllerImpl $ StartTask.run (ServiceControllerImpl.java:1765)
14:50: 05761 INFO [stdout] (filetage service MSC 1-1) à org.jboss.msc.service.ServiceControllerImpl $ ClearTCCLTask.run (ServiceControllerImpl.java:2291)
14: 50: 05761 INFO [stdout] (MSC thread de service 1-1) à java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1110)
14: 50: 05,761 INFO [stdout] (service MSC lire 1-1) à java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:603)
14: 50: 05762 INFO [stdout] (filetage de service MSC 1-1) à java. lang.Thread.run (Thread.java:722)
14: 50: 05762 INFO [stdout] (thread de service MSC 1-1) provoqué par: java.lang.UnsupportedOperationException: contexte de nommage est en lecture seule
14: 50: 05,762 INFO [stdout] (fil de service MSC 1-1) à org.jboss.as.naming.NamingContext.createSubcontext (NamingContext.java: 298)
14: 50: 05762 INFO [stdout] (thread de service MSC 1-1) à org.hibernate.util.NamingHelper.bind (NamingHelper.java:92)
14:50 : 05763 INFO [stdout] (thread de service MSC 1-1) à org.hibernate.impl.SessionFactoryObjectFactory.addInstance (SessionFactoryObjectFactory.java:113)
14: 50: 05763 INFO [stdout] (thread de service MSC 1 -1) à org.hibernate.impl.SessionFactoryImpl. (SessionFactoryImpl.java:338)
14: 50: 05,763 INFO [Stdout] (thread de service MSC 1-1) à org.hibernate.cfg.Configuration.buildSessionFactory (Configuration.java:1327)
14: 50: 05763 INFO [stdout] (thread de service MSC 1-1) à org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory (LocalSessionFactoryBean.java:806)
14: 50: 05764 INFO [stdout] (thread de service MSC 1-1) à org.springframework.orm.hibernate3 .LocalSessionFactoryBean.buildSessionFactory (LocalSessionFactoryBean.java:724)
14: 50: 05 764 INFO [stdout] (fil de service MSC 1-1) à ou g.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet (AbstractSessionFactoryBean.java:211)
14: 50: 05764 INFO [stdout] (thread de service MSC 1-1) à org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.invokeInitMethods (AbstractAutowireCapableBeanFactory.java:1361)
14: 50: 05765 INFO [stdout] (de fil de service MSC 1-1) à org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory. java: 1327)
14: 50: 05,765 INFO [stdout] (fil de service MSC 1-1) ... 25 plus
Mon applicationContext.xml ressemble à ceci:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--DATA SOURCE SETTINGS BEGIN HERE-->
<bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:/jdbc/test-application-xa" />
</bean>
<!-- Hibernate SessionFactory.-->
<!--http://www.vaannila.com/spring/spring-hibernate-integration-1.html-->
<bean id="testApplicationSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource"/>
</property>
<property name="configLocation" value="classpath:test-application- hibernate.cfg.xml"/>
</bean>
......
</beans>
Comment obtenir ces configurations de printemps pour travailler dans JBoss 7?
salutations,
David