2013-05-30 24 views
0

我使用spring 3.0.5,並試圖以我的應用程序從jboss 5.1 to 7.1.彈簧3種豆無法在使用ResourceBundleMessageSource會

我無法初始化它引用的MessageSource豆遷移的JBoss 7被初始化。

我收到以下部署錯誤

ERROR [org.apache.catalina.core.ContainerBase。[jboss.web] [缺省主機]。[/ RIKS餐廳] (MSC服務線程1-12)異常發送上下文初始化事件 監聽器的實例類 org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException:錯誤 創建名稱爲豆 '爲myBean' 在ServletContext的資源定義 [/ WEB-INF/applicationContext.xml]:bean初始化失敗; 嵌套的異常是 org.springframework.beans.ConversionNotSupportedException:未能類型 「org.springframework.context.support.ResourceBundleMessageSource」的 轉換屬性值以 所需類型 「org.springframework.context.support.ResourceBundleMessageSource」的 property'resourceBundleMessageSource';嵌套的異常是 java.lang.IllegalStateException:不能 [org.springframework.context.support.ResourceBundleMessageSource]類型的值轉換爲所需 類型 [org.springframework.context.support.ResourceBundleMessageSource用於 屬性 'ResourceBundleMessageSource會':沒有匹配的編輯者或 轉換策略在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)發現 [彈簧豆-3.0.7.RELEASE.jar:3.0.7.RELEASE]在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455) [彈簧豆-3.0.7.RELEASE.jar:3。 0.7.RELEASE]在 org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:293) [彈簧豆-3.0.7.RELEASE.jar:3.0.7.RELEASE]在 有機.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support .AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java :192) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactor y.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) [spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) [spring-context-3.0.7。 RELEASE.jar:3.0.7.RELEASE] org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]在 org.springframework.web.context.ContextLoader。initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [ spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar: ] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start( WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(Servi ceControllerImpl.java:1811) 在 org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1746) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [ rt.jar:1.7.0_21] at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21] at java.lang.Thread.run(Thread.java :722) [rt.jar中:1.7.0_21]引起的: org.springframework.beans.ConversionNotSupportedException:未能類型 'org.springframework.context.support.ResourceBundleMessageSource' 的 轉換屬性值以 所需類型 '要麼g.springframework.context.support.ResourceBundleMessageSource'for property'resourceBundleMessageSource';嵌套的異常是 java.lang.IllegalStateException:不能 [org.springframework.context.support.ResourceBundleMessageSource]類型的值轉換爲所需 類型 [org.springframework.context.support.ResourceBundleMessageSource用於 屬性 'ResourceBundleMessageSource會':沒有匹配在 org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:481) [彈簧豆-3.0.7.RELEASE.jar:3.0.7.RELEASE]發現編輯或 轉換策略在 有機springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:518) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.BeanWrapperImpl.conv ertForProperty(BeanWrapperImpl.java:512) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1373) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1332) [spring-beans-3.0。 7.RELEASE.jar:3.0.7.RELEASE]在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085) [彈簧豆-3.0.7.RELEASE.jar:3.0。 7.RELEASE]在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCre ateBean(AbstractAutowireCapableBeanFactory.java:516) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] ... 19更多原因: java.lang.IllegalStateException:無法轉換 類型的值[ org.springframework.context.support.ResourceBundleMessageSource]至 所需類型 [org.springframework.context.support.ResourceBundleMessageSource用於 屬性「ResourceBundleMessageSource會」:沒有匹配的編輯者或 轉換策略發現在 org.springframework.beans.TypeConverterDelegate .convertIfNecessary(TypeConverterDelegate.java:236) [spring-beans-3.0.7.RELEASE.jar:3.0.7。RELEASE]在 org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:466) [彈簧豆-3.0.7.RELEASE.jar:3.0.7.RELEASE] ... 25更

回答

0

它看起來像你用不同的彈簧版本編譯你的代碼,而不是你的JBoss容器中加載的代碼。如果你設置了一些依賴項來提供,請仔細檢查它們是否都是相同的彈簧版本

+0

我還沒有在提供的範圍中使用任何彈簧庫。 –