2010-03-23 74 views
1

我正在爲flex blazeds和Java編寫一個web應用程序。我安裝了用於使用WTP混合項目的Eclipse插件。我使用Flex的服務器,當我運行我的Flex服務時,使用模擬的tomcat,Web應用程序獲得數據,所有東西都可以。問題是,當我還是用我的tomcat,Flex生成的所有文件的BlazeDS的Tomcat複製的項目,這是行不通的,這是becasue我想在服務器上實現我的應用程序的錯誤是:如何用blazeds + java + flex + tomcat實現一個web應用程序?

"(mx.messaging.messages::ErrorMessage)#0 
    body = (Object)#1 
    clientId = (null) 
    correlationId = "B425A2A7-7D12-A982-7779-8CCBF669413C" 
    destination = "" 
    extendedData = (null) 
    faultCode = "Client.Error.MessageSend" 
    faultDetail = "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf'" 
    faultString = "Send failed" 
    headers = (Object)#2 
    messageId = "1CBC6020-0ED8-C4CC-3B77-8CCBF6D6621D" 
    rootCause = (mx.messaging.events::ChannelFaultEvent)#3 
    bubbles = false 
    cancelable = false 
    channel = (mx.messaging.channels::AMFChannel)#4 
     authenticated = false 
     channelSets = (Array)#5 
     [0] (mx.messaging::ChannelSet)#6 
      authenticated = false 
      channelIds = (Array)#7 
      [0] "my-amf" 
      channels = (Array)#8 
      [0] (mx.messaging.channels::AMFChannel)#4 
      clustered = false 
      connected = false 
      currentChannel = (mx.messaging.channels::AMFChannel)#4 
      initialDestinationId = (null) 
      messageAgents = (Array)#9 
      [0] (mx.rpc::AsyncRequest)#10 
       authenticated = false 
       autoConnect = true 
       channelSet = (mx.messaging::ChannelSet)#6 
       clientId = (null) 
       connected = false 
       defaultHeaders = (null) 
       destination = "ADEscenario" 
       id = "7D92EDF2-CF62-9545-BA11-8CCBF6691E6B" 
       reconnectAttempts = 0 
       reconnectInterval = 0 
       requestTimeout = -1 
       subtopic = "" 
     connected = false 
     connectTimeout = -1 
     enableSmallMessages = true 
     endpoint = "http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf" 
     failoverURIs = (Array)#11 
     id = "my-amf" 
     mpiEnabled = false 
     netConnection = (flash.net::NetConnection)#12 
     client = (mx.messaging.channels::AMFChannel)#4 
     connected = false 
     objectEncoding = 3 
     proxyType = "none" 
     uri = "http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf" 
     piggybackingEnabled = false 
     polling = false 
     pollingEnabled = true 
     pollingInterval = 3000 
     protocol = "http" 
     reconnecting = false 
     recordMessageSizes = false 
     recordMessageTimes = false 
     requestTimeout = -1 
     uri = "http://{server.name}:{server.port}/IEC-BLAZEDS/messagebroker/amf" 
     url = "http://{server.name}:{server.port}/IEC-BLAZEDS/messagebroker/amf" 
     useSmallMessages = false 
    channelId = "my-amf" 
    connected = false 
    currentTarget = (mx.messaging.channels::AMFChannel)#4 
    eventPhase = 2 
    faultCode = "Channel.Connect.Failed" 
    faultDetail = "NetConnection.Call.Failed: HTTP: Failed: url: 'http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf'" 
    faultString = "error" 
    reconnecting = false 
    rejected = false 
    rootCause = (Object)#13 
     code = "NetConnection.Call.Failed" 
     description = "HTTP: Failed" 
     details = "http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf" 
     level = "error" 
    target = (mx.messaging.channels::AMFChannel)#4 
    type = "channelFault" 
    timestamp = 0 
    timeToLive = 0" 

我不知道爲什麼tomcat沒有找到用於my-amf'http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf'的flex.messaging.endpoints.AMFEndpoint類。所有的flex都可以在模擬的服務器上運行。

+0

http://www.adobe.com/devnet/livecycle/articles/blazeds_testdrive.html http://flexbandit.com/archives/55 – 2012-04-04 08:43:49

回答

1

確保web.xml具有messagebroker的servlet,並且BlazeDS庫位於WEB-INF/lib文件夾中。

+0

OK坦克,一天我解決了問題,問題是我沒有做一個版本,並且WEB-INF,META-INF沒有與bin-debug(發佈)相同的級別,其他問題是.svn文件在我們的項目中,現在的應用程序在服務器上運行完美,謝謝你的時間,我讚賞你的評論 – ARYAD 2010-03-24 17:48:57

+0

另外一個如何完成任務的好例子可以在這裏找到http://www.adobe.com/ DEVNET /的LiveCycle /用品/ blazeds_testdrive。html – 2012-05-04 13:55:50

0

我不知道你是否已經檢查過,但由於java版本的原因,我有過相同的轉儲次數。 Flex服務器可能使用與您的tomcat/blazeDS不同的Java版本。

此外,你不應該在tomcat服務器上覆制你的項目。你爲什麼不把你的應用程序發佈到war文件中?我使用Flex Builder直接工作,創建混合的Flex/Java項目(我這樣做會導致Java部分非常輕),並使應用程序在Tomcat服務器中運行。爲了讓我的應用程序在另一臺服務器上運行,我首先確保服務器使用與我在應用程序中使用的版本相同的Java版本(或更高版本),然後部署war文件。訣竅完成了。

+0

ok坦克,到了一天我解決了問題,問題是我沒有做一個發佈,並且WEB-INF,META-INF沒有與bin-debug(發佈)相同的級別,其他問題是.svn文件,在我們的項目中,現在應用程序在服務器上完美運行,謝謝你的時間,我apreciate您的評論 – ARYAD 2010-03-24 17:48:16

0

這種類型的問題是很常見的。最近,我也一直在爲這種類型而苦苦掙扎。48小時的研究後,我發現一個小錯誤使得這個錯誤與我們在部署webapp期間所做的一樣大。

您的錯誤信息:當你不是在你的服務器的webapp完美部署發生 http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf'

此錯誤消息。 例如,您在機器中的tomcat下的webapps中創建了「IEC-BLAZEDS」文件夾。 首先,檢查它是否在你的機器上正常運行。

現在,如果要在任何服務器和相應的webapps文件夾中進行部署,請確保必須直接放置「IEC-BLAZEDS」文件夾的副本。

Definitly,它會適用於你。如上修改恢復我的問題。

希望這對你有幫助。

-Tej Ilindra 一個即將到來的Flex Professioinal ...

相關問題