我尝试将war文件部署到JBoss AS 7服务器并收到以下错误:不确定applicationContext.xml有什么问题。
错误消息:
00:53:08,503 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-8) Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
00:53:08,891 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-8) Context initialization failed: java.util.NoSuchElementException
at java.util.LinkedList.remove(Unknown Source) [rt.jar:1.6.0_45]
at java.util.LinkedList.removeFirst(Unknown Source) [rt.jar:1.6.0_45]
at org.springframework.beans.JrBeanFactoryData.popResource(JrBeanFactoryData.java:99) [spring-beans-jr-plugin-5.5.3.jar:]
at org.zeroturnaround.javarebel.integration.spring.beans.XmlBeanDefinitionManager.exitXmlResource(XmlBeanDefinitionManager.java:218) [spring-beans-jr-plugin-5.5.3.jar:]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:465) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:395) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.2.RELEASE.jar:3.0.2.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(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]
00:53:09,040 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-portal-web]] (MSC service thread 1-8) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: java.util.NoSuchElementException
at java.util.LinkedList.remove(Unknown Source) [rt.jar:1.6.0_45]
at java.util.LinkedList.removeFirst(Unknown Source) [rt.jar:1.6.0_45]
at org.springframework.beans.JrBeanFactoryData.popResource(JrBeanFactoryData.java:99) [spring-beans-jr-plugin-5.5.3.jar:]
at org.zeroturnaround.javarebel.integration.spring.beans.XmlBeanDefinitionManager.exitXmlResource(XmlBeanDefinitionManager.java:218) [spring-beans-jr-plugin-5.5.3.jar:]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [spring-beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:465) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:395) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java) [spring-context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.2.RELEASE.jar:3.0.2.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(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]
00:53:09,262 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-8) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/my-portal-web'
00:53:11,878 INFO [stdout] (MSC service thread 1-8) 2014-06-06 00:53:11 JRebel: Monitoring Log4j configuration in 'vfs:/C:/Users/akuma249/jboss-as-7.1.1.Final/standalone/deployments/my-portal-web.war/WEB-INF/classes/log4j.properties'.
00:53:11,889 INFO [stdout] (MSC service thread 1-8) 06 06 2014 00:53:11,886 INFO CacheControlPhaseListener:21 - CacheControlPhaseListener is ACTIVE.
00:53:12,265 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-8) Hibernate Validator 4.2.0.Final
00:53:13,716 INFO [org.richfaces.log.Cache] (MSC service thread 1-8) Selected fallback cache factory
00:53:13,721 INFO [org.richfaces.log.Cache] (MSC service thread 1-8) Creating LRUMap cache instance using parameters: {WORKING_FOLDER_ACCESS_ONLY=true, BIRT_FILENAME_GENERATOR_CLASS=org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator, BIRT_VIEWER_CONFIG_FILE=WEB-INF/viewer.properties, BIRT_VIEWER_PRINT_SERVERSIDE=ON, BIRT_VIEWER_DOCUMENT_FOLDER=, HTML_ENABLE_AGENTSTYLE_ENGINE=true, BIRT_VIEWER_LOG_LEVEL=WARNING, BIRT_VIEWER_SCRIPTLIB_DIR=, org.richfaces.skin=customBlueSky, javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE=true, BIRT_VIEWER_WORKING_FOLDER=, BIRT_VIEWER_MAX_ROWS=, BIRT_VIEWER_IMAGE_DIR=, BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS=, javax.faces.PROJECT_STAGE=Development, BIRT_VIEWER_CUBE_MEMORY_SIZE=, BIRT_RESOURCE_PATH=, BIRT_VIEWER_LOCALE=en-US, URL_REPORT_PATH_POLICY=domain, BIRT_VIEWER_MAX_CUBE_ROWLEVELS=, org.richfaces.enableControlSkinning=true, javax.servlet.jsp.jstl.fmt.localizationContext=resources.application, BIRT_VIEWER_TIMEZONE=, contextConfigLocation=/WEB-INF/applicationContext.xml, javax.faces.STATE_SAVING_METHOD=client, BIRT_VIEWER_LOG_DIR=}
00:53:13,758 INFO [org.richfaces.log.Cache] (MSC service thread 1-8) Creating LRUMap cache instance of 512 items capacity
00:53:13,771 INFO [org.richfaces.log.Application] (MSC service thread 1-8) RichFaces Core Implementation by JBoss by Red Hat, version 4.3.5.Final
00:53:13,810 WARNING [org.richfaces.log.Application] (MSC service thread 1-8) JMS API was found on the classpath; if you want to enable RichFaces Push JMS integration, set context-param 'org.richfaces.push.jms.enabled' in web.xml
00:53:15,903 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Error listenerStart
00:53:15,908 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Context [/my-portal-web] startup failed due to previous errors
00:53:15,921 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-portal-web]] (MSC service thread 1-8) Closing Spring root WebApplicationContext
00:53:15,936 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.web.deployment.default-host./my-portal-web: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./my-portal-web: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]
我的applicationContext.xml文件没有任何问题
这是我的applicationContext.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" default-init-method="beanInit" default-destroy-method="beanDestroy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<import resource="classpath*:portal-business-appContext.xml"/>
<!-- <import resource="classpath*:portal-common-appContext.xml"/> -->
<!-- <import resource="classpath*:portal-db-appContext.xml"/> -->
<bean id="baseWorkOrderBean" class="com.amy.ipprd.my.soa.portal.common.bean.BaseWorkOrderBean" abstract="true">
<property name="errorCodeMsgMappings" ref="errorCodeMsgMappings" />
<property name="offsetTime" vamye="17:00"/>
</bean>
<bean id="loginBean" class="com.amy.ipprd.my.soa.portal.bean.LoginBean" scope="session">
<property name="usersWorkOrder" ref="usersWorkOrder"/>
</bean>
<bean id="panelMenuBean" class="com.amy.ipprd.my.soa.portal.bean.PanelMenuBean" scope="session"> </bean>
<bean id="alarmasActivasAstroBean" class="com.amy.ipprd.my.soa.portal.bean.mba.AlarmasActivasAstroBean" parent="baseWorkOrderBean" scope="session">
<property name="alarmasActivasAstroWorkOrder" ref="alarmasActivasAstroWorkOrder"/>
</bean>
<bean id="asignacionAlarmasBean" class="com.amy.ipprd.my.soa.portal.bean.mba.AsignacionAlarmasBean" parent="baseWorkOrderBean" scope="session">
<property name="asignacionAlarmasWorkorder" ref="asignacionAlarmasWorkorder"/>
<property name="panelMenuBean" ref="panelMenuBean"/>
</bean>
<bean id="confFiltroGeBean" class="com.amy.ipprd.my.soa.portal.bean.mba.ConfFiltroGeBean" parent="baseWorkOrderBean" scope="session">
<property name="confFiltroGeWorkOrder" ref="confFiltroGeWorkOrder"/>
<property name="panelMenuBean" ref="panelMenuBean"/>
</bean>
<bean id="asignacionPersistenciaBean" class="com.amy.ipprd.my.soa.portal.bean.mba.AsignacionPersistenciaBean" parent="baseWorkOrderBean" scope="session">
<property name="asignacionPersistenciaWorkOrder" ref="asignacionPersistenciaWorkOrder"/>
<property name="panelMenuBean" ref="panelMenuBean"/>
</bean>
<bean id="confInhibicionGeBean" class="com.amy.ipprd.my.soa.portal.bean.mba.ConfInhibicionGeBean" parent="baseWorkOrderBean" scope="session">
<property name="confInhibicionGeWorkOrder" ref="confInhibicionGeWorkOrder"/>
<property name="panelMenuBean" ref="panelMenuBean"/>
</bean>
<bean id="filtroRetenBean" class="com.amy.ipprd.my.soa.portal.bean.mba.FiltroRetenBean" parent="baseWorkOrderBean" scope="session">
<property name="filtroRetenWorkOrder" ref="filtroRetenWorkOrder"/>
</bean>
<bean id="accionesBean" class="com.amy.ipprd.my.soa.portal.bean.platform.AccionesBean" parent="baseWorkOrderBean" scope="session">
<property name="accionesWorkOrder" ref="accionesWorkOrder"/>
<property name="panelMenuBean" ref="panelMenuBean"/>
</bean>
<bean id="erAccmovBean" class="com.amy.ipprd.my.soa.portal.bean.platform.ErAccmovBean" parent="baseWorkOrderBean" scope="session">
<property name="erAccmovWorkOrder" ref="erAccmovWorkOrder"/>
<property name="panelMenuBean" ref="panelMenuBean"/>
</bean>
<bean id="platformAgentResultBean" class="com.amy.ipprd.my.soa.portal.bean.platform.PlatformAgentResultBean" parent="baseWorkOrderBean" scope="session">
<property name="tagentWorkOrder" ref="tagentWorkOrder"/>
</bean>
<bean id="platformPrioritiesBean" class="com.amy.ipprd.my.soa.portal.bean.platform.PlatformPrioritiesBean" parent="baseWorkOrderBean" scope="session">
<property name="prioritiesWorkOrder" ref="prioritiesWorkOrder"/>
</bean>
<bean id="platformConnectionsBean" class="com.amy.ipprd.my.soa.portal.bean.platform.PlatformConnectionsBean" parent="baseWorkOrderBean" scope="session">
<property name="connectionsWorkOrder" ref="connectionsWorkOrder"/>
</bean>
<bean id="platformLimitsBean" class="com.amy.ipprd.my.soa.portal.bean.platform.PlatformLimitsBean" parent="baseWorkOrderBean" scope="session">
<property name="limitesWorkOrder" ref="limitesWorkOrder"/>
</bean>
<bean id="platformProcessSuper" class="com.amy.ipprd.my.soa.portal.bean.platform.PlatformProcessSuper" parent="baseWorkOrderBean" scope="session">
<property name="supervisionAstroWorkOrder" ref="supervisionAstroWorkOrder"/>
</bean>
<bean id="platformPerformanceKPIBean" class="com.amy.ipprd.my.soa.portal.bean.platform.PlatformPerformanceKPIBean" parent="baseWorkOrderBean" scope="session">
<property name="performanceKPIWorkOrder" ref="performanceKPIWorkOrder"/>
</bean>
<bean id="platformNWDBean" class="com.amy.ipprd.my.soa.portal.bean.platform.PlatformNWDBean" parent="baseWorkOrderBean" scope="session">
<property name="festivosWorkOrder" ref="festivosWorkOrder"/>
</bean>
<bean id="eventsCorrectiveManagedBean" class="com.amy.ipprd.my.soa.portal.corrective.EventsCorrectiveManagedBean" scope="session"> </bean>
<bean id="jobsCorrectiveManagedBean" class="com.amy.ipprd.my.soa.portal.corrective.JobsCorrectiveManagedBean" scope="session"> </bean>
<bean id="ticketsCorrectiveManagedBean" class="com.amy.ipprd.my.soa.portal.corrective.TicketsCorrectiveManagedBean" scope="session"> </bean>
<bean id="controlmapManagersAstroBean" class="com.amy.ipprd.my.soa.portal.corrective.ControlmapManagersBean" parent="baseWorkOrderBean" scope="session">
<property name="ControlmapManagersWorkOrder" ref="ControlmapManagersWorkOrder"/>
<property name="panelMenuBean" ref="panelMenuBean"/>
<property name="eventsCorrectiveManagedBean" ref="eventsCorrectiveManagedBean"/>
<property name="jobsCorrectiveManagedBean" ref="jobsCorrectiveManagedBean"/>
<property name="ticketsCorrectiveManagedBean" ref="ticketsCorrectiveManagedBean"/>
</bean>
<bean id="controlMapManagersFilterBean" class="com.amy.ipprd.my.soa.portal.corrective.ControlMapManagersFilterBean" scope="request">
</bean>
<bean id="techRequest" class="com.amy.ipprd.my.soa.portal.bean.technologyarea.TechnologyAreaAdminRequestBean" parent="baseWorkOrderBean" scope="session">
<property name="techAreaWorkOrder" ref="techAreaWorkOrder"/>
<property name="loginBean" ref="loginBean"/>
<property name="filterBean" ref="filterBean"/>
</bean>
<bean id="techProfile" class="com.amy.ipprd.my.soa.portal.bean.technologyarea.TechnologyAreaAdminProfileBean" parent="baseWorkOrderBean" scope="session">
<property name="techAreaProfileWorkOrder" ref="techAreaProfileWorkOrder"/>
<property name="loginBean" ref="loginBean"/>
<property name="filterBean" ref="filterBean"/>
</bean>
<bean id="usersBean" class="com.amy.ipprd.my.soa.portal.bean.aaa.UsersBean" parent="baseWorkOrderBean" scope="session">
<property name="usersWorkOrder" ref="usersWorkOrder"/>
<property name="loginBean" ref="loginBean"/>
<property name="fileUploadBean" ref="fileUploadBean"/>
</bean>
<bean id="usersFilterBean" class="com.amy.ipprd.my.soa.portal.bean.aaa.UsersFilterBean" scope="request">
</bean>
<bean id="fileUploadBean" class="com.amy.ipprd.my.soa.portal.bean.aaa.FileUploadBean" scope="session">
</bean>
<bean id="filterBean" class="com.amy.ipprd.my.soa.portal.bean.technologyarea.TechnologyFilterBean" scope="request">
</bean>
</beans>
错误消息没有说明解析xml代码的查找问题的哪一行。请让我知道它有什么问题。
答案 0 :(得分:2)
它看起来像JRebel问题,尝试暂时关闭JRebel并查看问题是否仍然存在。如果没有JRebel,则将问题发送到support@zeroturnaround.com
答案 1 :(得分:1)
它没有验证。此元素中存在错误:
<property name="offsetTime" vamye="17:00"/>
应该是:
<property name="offsetTime" value="17:00"/>
当您怀疑可能存在XML问题时,可以使用XML验证程序。你的IDE应该这样做。您还可以使用一些在线服务。