2014-02-18 87 views
0

我的Prime Push/atmosphere配置有一些錯誤,但是在一般應用程序中可用。 PrimePUSH的例子也適用。我不確定我的錯誤是什麼意思,以及如何解決它。Primefaces Push:在JBoss 7.2中進行部署時出錯

上部署我有錯誤「URI方案不是‘文件’」:

12:07:08,102 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation 
12:07:08,103 INFO [org.atmosphere.cpr.DefaultAnnotationProcessor] (ServerService Thread Pool -- 213) AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used 
12:07:08,106 ERROR [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) : java.lang.IllegalArgumentException: URI scheme is not "file" 
    at java.io.File.<init>(File.java:366) [rt.jar:1.6.0_32] 
    at org.atmosphere.util.annotation.AnnotationDetector.toFile(AnnotationDetector.java:420) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.atmosphere.util.annotation.AnnotationDetector.detect(AnnotationDetector.java:297) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.atmosphere.cpr.DefaultAnnotationProcessor.scanForAnnotation(DefaultAnnotationProcessor.java:147) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.atmosphere.cpr.DefaultAnnotationProcessor.configure(DefaultAnnotationProcessor.java:133) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.atmosphere.cpr.AtmosphereFramework.autoConfigureService(AtmosphereFramework.java:2260) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:707) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:614) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:86) [atmosphere-runtime-native-2.1.0.jar:2.1.0] 
    at org.primefaces.push.PushServlet.init(PushServlet.java:43) [primefaces-4.0.jar:4.0] 
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194) [jbossweb-7.2.0.Final.jar:7.2.0.Final] 
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100) [jbossweb-7.2.0.Final.jar:7.2.0.Final] 
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3591) [jbossweb-7.2.0.Final.jar:7.2.0.Final] 
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3798) [jbossweb-7.2.0.Final.jar:7.2.0.Final] 
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] 
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] 
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4] 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_32] 
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_32] 
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_32] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_32] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_32] 
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32] 
    at org.jboss.threads.JBossThread.run(JBossThread.java:122) 

12:07:08,111 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Auto detecting atmosphere handlers /WEB-INF/classes/ 
12:07:08,151 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Auto detecting WebSocketHandler in /WEB-INF/classes/ 
12:07:08,174 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
12:07:08,178 WARN [org.atmosphere.cpr.DefaultAsyncSupportResolver] (ServerService Thread Pool -- 213) Found multiple containers, please specify which one to use: org.atmosphere.container.JBossWebCometSupport, org.atmosphere.container.TomcatCometSupport, until you do, Atmosphere will use:class org.atmosphere.container.JBossWebCometSupport 
12:07:08,181 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Installing Default AtmosphereInterceptor 
12:07:08,181 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support 
12:07:08,182 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor 
12:07:08,183 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support 
12:07:08,183 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support 
12:07:08,184 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support 
12:07:08,184 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support 
12:07:08,185 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support 
12:07:08,186 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol 
12:07:08,186 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor 
12:07:08,187 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection 
12:07:08,187 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor 
12:07:08,187 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them. 
12:07:08,192 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper 
12:07:08,193 WARN [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache 
12:07:08,193 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster 
12:07:08,194 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Broadcaster Polling Wait Time 100 
12:07:08,194 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Shared ExecutorService supported: true 
12:07:08,225 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Messaging Thread Pool Size: Unlimited 
12:07:08,225 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Async I/O Thread Pool Size: 200 
12:07:08,225 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory 
12:07:08,225 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor 
12:07:08,225 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) HttpSession supported: true 
12:07:08,225 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation 
12:07:08,226 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Atmosphere is using async support: org.atmosphere.container.JBossWebCometSupport running under container: JBoss Web/7.2.0.Final 
12:07:08,227 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Atmosphere Framework 2.1.0 started. 
12:07:08,227 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) 

    For Atmosphere Framework Commercial Support, visit 
    http://www.async-io.org/ or send an email to [email protected] 

12:07:08,227 INFO [org.atmosphere.cpr.AtmosphereServlet] (ServerService Thread Pool -- 213) AtmosphereServlet with native support for Tomcat 6/7 and JBossWeb Installed. 
12:07:08,228 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT 
12:07:08,230 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority AFTER_DEFAULT 
12:07:08,230 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 213) Installed AtmosphereInterceptor UUID Tracking Interceptor with priority AFTER_DEFAULT 
12:07:08,343 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018565: Replaced deployment "app.war" with deployment "app.war" 

應用程序部署後 - 我在網頁控制檯第一項頁面加載後:

"NetworkError: 501 Not Implemented - http://localhost:8080/primepush/message/qla/robert?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.0.3-jquery&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&X-atmo-protocol=true" 
robert...ol=true 
Websocket failed. Downgrading to Comet and resending 
push.j...s&v=4.0 (row 1) 

GET http://localhost:8080/primepush/message/qla/robe...ache-Date=0&X-atmo-protocol=true&_=1392721774715 

而且後來一切順利。

我的總理PUSH的配置 - web.xml中: 推送的Servlet org.primefaces.push.PushServlet org.atmosphere.useWebSocket 假

<init-param> 
     <param-name>org.atmosphere.useNative</param-name> 
     <param-value>true</param-value> 
    </init-param> 

    <init-param> 
     <param-name>org.atmosphere.cpr.sessionSupport</param-name> 
     <param-value>true</param-value> 
    </init-param> 

<init-param> 
    <param-name>org.atmosphere.resumeOnBroadcast</param-name> 
    <param-value>true</param-value> 
</init-param> 
<load-on-startup>1</load-on-startup> 
<async-supported>true</async-supported> 

</servlet> 

<servlet-mapping> 
    <servlet-name>Push Servlet</servlet-name> 
    <url-pattern>/primepush/*</url-pattern> 
</servlet-mapping> 

而且pom.xml中:

<dependency> 
     <groupId>org.atmosphere</groupId> 
     <artifactId>atmosphere-runtime-native</artifactId> 
     <version>2.1.0</version> 
    </dependency> 

im web.xml中是否存在一些錯誤配置? 感謝您的幫助。

回答

1

感謝您的報告。問題是https://github.com/Atmosphere/atmosphere/issues/1473,並將在2.1.1中解決。您現在可以使用2.1.1-SNAPSHOT進行嘗試。

謝謝!

- Jeanfrancois

+0

感謝您的回答Jeanfrancois。我嘗試了新的快照,但不幸的結果是相同的:'10:32:45,605錯誤[org.atmosphere.cpr.AtmosphereFramework](ServerService線程池 - 174):java.lang.IllegalArgumentException:URI方案不是「文件」 \t位於java.io.File。 (File.java:366)[rt.jar:1.6.0_32] \t at org.atmosphere.util.annotation.AnnotationDetector.toFile(AnnotationDetector.java:420)[atmosphere-runtime-native-2.1.1-SNAPSHOT .jar:2.1.1-SNAPSHOT]' – robson

+0

行不匹配。你確定你有最新的? – jfarcand

+0

是的,我確定。有URISyntaxException catch,但File.class在這種情況下拋出IllegalArgumentException。我更新了問題#1473,代碼適合我。 – robson