`

jboss-as-7.1.1不兼容spring解决办法

阅读更多

项目部署到jboss-as-7.1.1服务器,兼容spring几大要点配置如下

  1. web.xml中的
    <context-param>
       <param-name>contextConfigLocation</param-name>
       <param-value>
          classpath:applicationContext-*.xml		      
       </param-value>
    </context-param>
     必须修改为:
    <context-param>
       <param-name>contextConfigLocation</param-name>
       <param-value>
          classpath:applicationContext-configuration.xml,
          classpath:applicationContext-security.xml
       </param-value>
    </context-param>
     
  2. 将snowdrop-vfs.jar(附件下载)文件添加到%{project}/WEB-INFO/lib目录下,在web.xml中添加
    <context-param>
       <param-name>contextClass</param-name>
       <param-value>
          org.jboss.spring.vfs.context.VFSXmlWebApplicationContext
       </param-value>
    </context-param>
     
  3. 如果使用springmvc,必须启动springmvc注解功能
    <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
     
0
7
分享到:
评论
2 楼 luoxiang183 2013-11-26  
是啊,不对啊
1 楼 liqiaoqiaoz 2013-08-07  
按照你上面的改法不正确出现如下错误:13:49:55,759 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."ngbf-p-mini-1.6.9.0.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ngbf-p-mini-1.6.9.0.war".PARSE: Failed to process phase PARSE of deployment "ngbf-p-mini-1.6.9.0.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
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(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_10-rc2]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_10-rc2]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_10-rc2]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: beans
at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:85)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: beans
at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:123)
at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:82)
at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:80)
... 6 more

13:49:55,892 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "ngbf-p-mini-1.6.9.0.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ngbf-p-mini-1.6.9.0.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ngbf-p-mini-1.6.9.0.war\".PARSE: Failed to process phase PARSE of deployment \"ngbf-p-mini-1.6.9.0.war\""}}
13:50:00,849 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
13:50:01,167 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment ngbf-p-mini-1.6.9.0.war in 5275ms
13:50:01,176 INFO  [org.jboss.as.controller] (MSC service thread 1-2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."ngbf-p-mini-1.6.9.0.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ngbf-p-mini-1.6.9.0.war".PARSE: Failed to process phase PARSE of deployment "ngbf-p-mini-1.6.9.0.war"

相关推荐

    jboss-as-web.Final-RECOMPILE.jar.rar

    总之,"jboss-as-web.Final-RECOMPILE.jar"是JBoss AS 7热部署机制的核心组成部分,它使得开发者能够在不中断服务的情况下更新Web应用,极大地提高了开发效率。理解并熟练运用这一特性,对于高效地开发和维护基于...

    jboss-as-7.1.1.Final

    在工程上右键——&gt;【Export】——&gt;【EJB JAR file】 在Destination处:——&gt;【Browse…】——&gt; 选择JBoss服务器的部署目录,我的目录如下: D:\eclipse-jboss\jboss-as-7.1.1.Final\standalone\deployments\TestEJB....

    jboss-as-sprint-int-5.0.0.GA.jar jboss-spring-int-vfs.jar

    "jboss-as-sprint-int-5.0.0.GA.jar" 和 "jboss-spring-int-vfs.jar" 是与JBoss应用服务器相关的两个关键组件,主要用于Spring框架与JBoss服务器的集成以及虚拟文件系统(Virtual File System,VFS)的支持。...

    jboss-as-sprint-int-5.0.0.GA.jar 和 jboss-spring-int-vfs.jar

    总之,`jboss-as-sprint-int-5.0.0.GA.jar`和`jboss-spring-int-vfs.jar`是将Spring应用迁移到JBoss AS的关键组件,它们提供了Spring与JBoss AS之间的桥梁,使开发者能够在保持原有架构优势的同时,充分利用JBoss AS...

    Jboss-Spring

    综上所述,`Jboss-Spring`是Spring框架与JBoss AS深度整合的一种技术实现,通过`jboss-as-sprint-int-5.0.0.GA.jar`和`jboss-spring-int-vfs.jar`这两个核心库,实现了Spring在JBoss服务器上的无缝运行,为开发者...

    jboss-as-distribution-6.1.0.Final系列3

    jboss-as-distribution-6.1.0.Final

    jboss-as-sprint-int-5.0.0.GA.jar

    jboss-as-sprint-int-5.0.0.GA

    jboss-logging-3.4.1.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.4.1.Final.jar; 赠送原API文档:jboss-logging-3.4.1.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.1.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.1.Final....

    jboss-logging-3.3.2.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.3.2.Final.jar; 赠送原API文档:jboss-logging-3.3.2.Final-javadoc.jar; 赠送源代码:jboss-logging-3.3.2.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.3.2.Final....

    jboss-threads-3.1.0.Final-API文档-中文版.zip

    赠送jar包:jboss-threads-3.1.0.Final.jar; 赠送原API文档:jboss-threads-3.1.0.Final-javadoc.jar; 赠送源代码:jboss-threads-3.1.0.Final-sources.jar; 赠送Maven依赖信息文件:jboss-threads-3.1.0.Final....

    jboss-logging-3.4.3.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.4.3.Final.jar; 赠送原API文档:jboss-logging-3.4.3.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.3.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.3.Final....

    jboss-as-7.1.0.Final.zip

    《JBoss AS 7.1.0.Final:企业级应用服务器详解》 JBoss AS,全称为"Java EE Application Server",是Red Hat公司开发的一款开源、免费的应用服务器,它基于Java平台的企业级服务(Java Platform, Enterprise ...

    jboss-annotations-api_1.3_spec-2.0.1.Final-API文档-中英对照版.zip

    赠送jar包:jboss-annotations-api_1.3_spec-2.0.1.Final.jar; 赠送原API文档:jboss-annotations-api_1.3_spec-2.0.1.Final-javadoc.jar; 赠送源代码:jboss-annotations-api_1.3_spec-2.0.1.Final-sources.jar;...

    jboss-as-master

    1. **Java EE兼容性**:JBoss AS完全支持Java Enterprise Edition的各种规范,包括Servlet、JSP、EJB、JMS、JPA等,提供了一整套的Web和企业级服务。 2. **模块化设计**:JBoss AS采用模块化架构,使得组件之间的...

    jboss-as-7.1.0.CR1b.zip

    4. **统一的命令行管理工具**:使用名为`jboss-as-cli.sh`的命令行接口,用户可以方便地管理和控制服务器,执行部署、配置、监控等操作,大大简化了管理员的工作。 5. **自动热部署**:JBoss AS 7支持自动检测文件...

    spring-webmvc.jar+jboss-logging.jar+jboss-logging-annotations.jar

    总而言之,`spring-webmvc.jar`是构建基于Spring的Web应用的关键,而`jboss-logging.jar`和`jboss-logging-annotations.jar`则为日志管理提供了便利。理解这些jar包的功能和用法,能够帮助开发者更高效地开发和维护...

    jboss-as-web-7.0.1.Final_SSL.zip_JBOSS 7_jboss

    jboss-7 部署说明,详细介绍了webLogic程序创建过程和配置优化

    jboss-as-distribution-6.1.0.Final系列2

    jboss-as-distribution-6.1.0.Final系列2

Global site tag (gtag.js) - Google Analytics