0

我有一个单一的战争项目,我将 BlazeDS 与 JBoss 7.1 集成。我可以正常部署我的war文件,但是当我尝试添加安全性时,我得到以下堆栈跟踪

13:23:37,222 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "FooBarBlazeDS.war"
13:23:37,797 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-16) Class Path entry xercesImpl.jar in "/C:/Users/Rasheed/Clients/FooBar/jboss-as-7.1.1.Final/standalone/deployments/FooBarBlazeDS.war/WEB-INF/lib/xalan.jar"  does not point to a valid jar for a Class-Path reference.
13:23:37,799 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-16) Class Path entry xml-apis.jar in "/C:/Users/Rasheed/Clients/FooBar/jboss-as-7.1.1.Final/standalone/deployments/FooBarBlazeDS.war/WEB-INF/lib/xalan.jar"  does not point to a valid jar for a Class-Path reference.
13:23:38,083 WARN  [org.jboss.as.ee] (MSC service thread 1-12) JBAS011006: Not installing optional component org.springframework.web.context.ContextLoaderListener due to exception: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener from [Module "deployment.FooBarBlazeDS.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_01]
    at java.lang.Class.forName(Unknown Source) [rt.jar:1.7.0_01]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:79)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [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.runWorker(Unknown Source) [rt.jar:1.7.0_01]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_01]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_01]

13:23:38,095 WARN  [org.jboss.as.ee] (MSC service thread 1-12) JBAS011006: Not installing optional component org.springframework.web.filter.DelegatingFilterProxy due to exception: java.lang.ClassNotFoundException: org.springframework.web.filter.DelegatingFilterProxy from [Module "deployment.FooBarBlazeDS.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_01]
    at java.lang.Class.forName(Unknown Source) [rt.jar:1.7.0_01]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:79)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [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.runWorker(Unknown Source) [rt.jar:1.7.0_01]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_01]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_01]

13:23:38,105 WARN  [org.jboss.as.ee] (MSC service thread 1-12) JBAS011006: Not installing optional component org.springframework.web.servlet.DispatcherServlet due to exception: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet from [Module "deployment.FooBarBlazeDS.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_01]
    at java.lang.Class.forName(Unknown Source) [rt.jar:1.7.0_01]
    at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:79)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [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.runWorker(Unknown Source) [rt.jar:1.7.0_01]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_01]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_01]

13:23:38,594 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/FooBarBlazeDS]] (MSC service thread 1-8) Error configuring application listener of class org.springframework.web.context.ContextLoaderListener: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener from [Module "deployment.FooBarBlazeDS.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
    at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:72) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3342) [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.runWorker(Unknown Source) [rt.jar:1.7.0_01]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_01]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_01]

13:23:38,610 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/FooBarBlazeDS]] (MSC service thread 1-8) Skipped installing application listeners due to previous error(s)
13:23:38,611 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Error listenerStart
13:23:38,612 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Context [/FooBarBlazeDS] startup failed due to previous errors
13:23:38,616 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.web.deployment.default-host./FooBarBlazeDS: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./FooBarBlazeDS: 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.runWorker(Unknown Source) [rt.jar:1.7.0_01]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_01]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_01]

13:23:38,622 INFO  [org.jboss.as] (MSC service thread 1-9) JBAS015951: Admin console listening on http://127.0.0.1:9990
13:23:38,622 ERROR [org.jboss.as] (MSC service thread 1-9) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 4559ms - Started 171 of 250 services (2 services failed or missing dependencies, 76 services are passive or on-demand)
13:23:38,824 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "FooBarBlazeDS.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./FooBarBlazeDS" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./FooBarBlazeDS: JBAS018040: Failed to start context"}}
13:23:38,884 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment FooBarBlazeDS.war in 60ms
13:23:38,886 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.web.deployment.default-host./FooBarBlazeDS: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./FooBarBlazeDS: JBAS018040: Failed to start context

13:23:38,888 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./FooBarBlazeDS" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./FooBarBlazeDS: JBAS018040: Failed to start context"}}}}

我的 Web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app>

    <display-name>FooBarBlazeDS</display-name>
    <description>FooBar BlazeDS Application</description>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/config/web-application-config.xml
            /WEB-INF/config/web-application-security.xml</param-value>
    </context-param>
    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>FooBarRemoteServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>FooBarRemoteServlet</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>


    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <login-config>
        <auth-method>BASIC</auth-method>
    </login-config>


</web-app>

/WebContent/WEB-INF/lib 中的 Jar 文件

cfgatewayadapter.jar      
commons-codec-1.3.jar        
commons-httpclient-3.0.1.jar
commons-logging.jar
flex-messaging-common.jar
flex-messaging-core.jar
flex-messaging-opt.jar
flex-messaging-proxy.jar
flex-messaging-remoting.jar
flex-rds-server.jar
org.springframework.aop-sources-3.1.4.RELEASE.jar
org.springframework.asm-sources-3.1.4.RELEASE.jar
org.springframework.aspects-sources-3.1.4.RELEASE.jar
org.springframework.beans-sources-3.1.4.RELEASE.jar
org.springframework.context.support-sources-3.1.4.RELEASE.jar
org.springframework.context-sources-3.1.4.RELEASE.jar
org.springframework.core-sources-3.1.4.RELEASE.jar
org.springframework.expression-sources-3.1.4.RELEASE.jar
org.springframework.instrument.tomcat-sources-3.1.4.RELEASE.jar
org.springframework.instrument-sources-3.1.4.RELEASE.jar
org.springframework.jdbc-sources-3.1.4.RELEASE.jar
org.springframework.jms-sources-3.1.4.RELEASE.jar
org.springframework.orm-sources-3.1.4.RELEASE.jar
org.springframework.oxm-sources-3.1.4.RELEASE.jar
org.springframework.spring-library-3.1.4.RELEASE.libd
org.springframework.test-sources-3.1.4.RELEASE.jar
org.springframework.transaction-sources-3.1.4.RELEASE.jar
org.springframework.web.portlet-sources-3.1.4.RELEASE.jar
org.springframework.web.servlet-sources-3.1.4.RELEASE.jar
org.springframework.web.struts-sources-3.1.4.RELEASE.jar
org.springframework.web-sources-3.1.4.RELEASE.jar
spring-security-acl-2.0.4.jar
spring-security-catalina-2.0.4.jar
spring-security-core-2.0.4.jar
spring-security-core-tiger-2.0.4.jar
spring-security-taglibs-2.0.4.jar
xalan.jar

如何配置它以与 Jboss 7.1 一起使用并摆脱这些 CNF 错误?

先感谢您!

4

1 回答 1

2

该类DelegatingFilterProxy是 Spring Framework 的 spring-web 库的一部分。你可以从这里的 maven 获得你想要的版本。选择您想要的版本,下载二进制文件(它是一个 jar)并将其添加到您的 lib 文件夹(添加到类路径中)。

使用 maven 依赖项,它是(对于版本 3.1.4.RELEASE)

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>3.1.4.RELEASE</version>
</dependency>

如果您获得更多ClassNotFoundExceptions,请查找您缺少的类并将包含它的 jar 添加到您的类路径中。

于 2013-03-28T19:09:13.453 回答