Expand my Community achievements bar.

help to Configure a Data Management Service destination

Avatar

Level 1
Hi, I have a problem with the sample here :
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&f...



with flex builder I have the following error : Destination
'notes' must specify at least one channel.



somebody can tell me what I need to do to resolve my problem
?



thanks



Frederic Cantenot





9 Replies

Avatar

Level 1
you have your channels setup in
WEB-INF\flex\services-config.xml file - search for

<channels>

....

<channel-definition id="my-rtmp"
class="mx.messaging.channels.RTMPChannel">

<endpoint uri="rtmp://{server.name}:2037"
class="flex.messaging.endpoints.RTMPEndpoint"/>

<properties>

<idle-timeout-minutes>20</idle-timeout-minutes>

<!-- for deployment on WebSphere, must be mapped to a
WorkManager available in the web application's jndi context.


<websphere-workmanager-jndi-name>java:comp/env/wm/MessagingWorkManager</websphere-workmanager-jndi-name>

-->

</properties>

</channel-definition>



.....

</channels>



then in your WEB-INF\flex\data-management-config.xml

you have channel entry



<default-channels>

<channel ref="my-rtmp"/>

</default-channels>



and your destination

<destination id="notes">

<adapter ref="actionscript"/>

<properties>

<metadata>

<identity property="noteId"/>

</metadata>

</properties>

</destination>



check that your channel entry in data-management-config.xml
corresponds to your channel setup in services-config.xml

Avatar

Level 1
thanks for your answer, now my application compiles fine.

however I have an error when I execute it.



[RPC Fault faultString="Send failed"
faultCode="Client.Error.MessageSend"
faultDetail="Channel.Connect.Failed error undefined
url:'rtmp://localhost:2038'"]

at mx.data::ConcreteDataService/
http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()

at ::DataListRequestResponder/fault()

at mx.rpc::AsyncRequest/fault()

at mx.messaging::ChannelSet/::faultPendingSends()

at mx.messaging::ChannelSet/channelFaultHandler()

at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at
mx.messaging::Channel/mx.messaging:Channel::connectFailed()

at
mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()

at
mx.messaging.channels::RTMPChannel/mx.messaging.channels:RTMPChannel::statusHandler()



do you have an idea why I have this message with IE7 (jrun is
started) ?



thanks

Avatar

Level 1
if you use default configs - your
WEB-INF\flex\services-config.xml should contain



<channel-definition id="my-rtmp"
class="mx.messaging.channels.RTMPChannel">

<endpoint uri="rtmp://{server.name}:2037"
class="flex.messaging.endpoints.RTMPEndpoint"/>

<properties>

<idle-timeout-minutes>20</idle-timeout-minutes>

<!-- for deployment on WebSphere, must be mapped to a
WorkManager available in the web application's jndi context.


<websphere-workmanager-jndi-name>java:comp/env/wm/MessagingWorkManager</websphere-workmanager-jndi-name>

-->

</properties>

</channel-definition>



try to change <endpoint uri="rtmp://{server.name}:2037" to
<endpoint uri="rtmp://{server.name}:2038" there

Avatar

Level 1
Thanks for your answer, in fact in my configuration file, it
was already indicated 2038. it's strange, my code seems to be ok
and configuration files too.



I don't know why code don't work. the applications works fine
on your computer ?



thanks.

Avatar

Level 1
the message server cant connect to localhost:2038 for some
reason...

so try to change port number or change localhost to your
server ip address to see if it works



all works fine on my computer

Avatar

Level 1
ok thank you, I'm going to take a look. I keep you
posted.

Avatar

Level 1
I have found the problem. I have changed the port number to
2037 and now application works. I don't know why.



thanks for your help

Avatar

Level 1
may be some other application listens to 2038 port

you can find out this by `netstat -an` - and see if there
2038 port is listed



here is a list of ports and registered applications that use
them -
http://www.iana.org/assignments/port-numbers

Avatar

Level 1
thanks for link and information. I'm going to take a
look.