Here's my advice on troubleshooting the issue.
In flex-enterprise-services.xml (may be called services-config.xml
depending on which prerelease you're using), enable logging and the
debug level and check your server console for errors.
Another thing that might be helpful is ensure that you can reach the
destinations via jndi. You can do this by using a jsp page. If the page
runs without stack traces, then you know that your jndi and jms factory
and destination are configured correctly. Be sure to update
flex-message-service.xml with those jndi names. If you have troubles
running the jsp page, the destinations are not configured correctly and
you should check your application server documentation for details.
jndiTest.jsp
<%
Properties p = new Properties();
// as configured in your destination's initial-context-environment in
flex-message-service.xml
p.setProperty("java.naming.factory.initial","fr.dyade.aaa.jndi2.client.N
amingContextFactory");
p.setProperty("com.sonicsw.jndi.mfcontext.domain","Domain1");
p.setProperty("java.naming.provider.url","joram://localhost:16010");
p.setProperty("java.naming.security.principal","anonymous");
p.setProperty("java.naming.security.credentials","anonymous");
Context ctx = new InitialContext(p);
ctx.lookup("TCF"); // this maps to connection-factory on the destination
in flex-message-service.xml
ctx.lookup("sampleTopic"); // this maps to destination-jndi-name on the
destination in flex-message-service.xml
%>
/* If you get an exception running with the above try, generally
application servers make resource available to the application at
java:comp/env/<resource-name>. However, additional configuration may be
required so check your application server documentation.
ctx.lookup("java:comp/env/TCF");
ctx.lookup("java:comp/env/sampleTopic");
*/
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of rania_aya_tgfrd
Sent: Monday, June 26, 2006 9:17 AM
To: [email protected]
Subject: [flexcoders] Using JMS Adapter: 'javax.naming.NamingException
unknown protocol : joram.
Hello,
I'm using a JMS adapter to send a message from java programme to flex.
My JSM server is JONAS and my flex application is running on Jonas
also.
when in try to use the flex application with a consumer to JMS Topics
I have this error :
[Flex] Deserializing AMF/RTMP request
Version: 3
(Command method=null (0) trxId=2.0)
null
(Typed Object #0 'flex.messaging.messages.CommandMessage')
messageRefType = "flex.messaging.messages.AsyncMessage"
operation = 0
correlationId = ""
body = (Object #1)
messageId = "5EC587BB-D811-7E41-E072-105E379C38DA"
destination = "stock-feed"
headers = (Object #2)
DSEndpoint = "my-rtmp"
timestamp = 0
timeToLive = 0
clientId = null
[Flex] Serializing AMF/RTMP response
Version: 3
(Command method=_error (0) trxId=2)
(Typed Object #0 'flex.messaging.messages.ErrorMessage')
rootCause = (Typed Object #1 'javax.naming.NamingException')
rootCause = (Typed Object #2 'javax.naming.NamingException')
rootCause = null
localizedMessage = "Unknown protocol:joram"
resolvedObj = null
resolvedName = null
remainingName = null
message = "Unknown protocol:joram"
cause = null
explanation = "Unknown protocol:joram"
localizedMessage = null
resolvedObj = null
resolvedName = null
remainingName = null
message = null
cause = (Ref #2)
explanation = null
destination = null
headers = (Object #3)
correlationId = "5EC587BB-D811-7E41-E072-105E379C38DA"
faultString = null
messageId = "73F616F5-B70E-E9D8-28A4-BD2460D808AB"
faultCode = "Server.Processing"
timeToLive = 0.0
extendedData = null
faultDetail = null
clientId = null
timestamp = 1.151325847207E12
body = null
I configure the file flex-message-service.xml as follow :
<destination id="stock-feed">
<properties>
<server>
<durable>false</durable>
<durable-store-
manager>flex.messaging.durability.FileStoreManager</durable-store-
manager>
</server>
<jms>
<destination-type>Topic</destination-type>
<message-type>javax.jms.TextMessage</message-
type>
<!-- the name of the JMS connection factory
in JNDI-->
<connection-factory>TCF</connection-factory>
<!-- the name of the destination in JNDI-->
<destination-jndi-
name>sampleTopic</destination-jndi-name>
<durable-consumers>false</durable-consumers>
<delivery-mode>NON_PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-
priority>
<acknowledge-
mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<transacted-sessions>false</transacted-
sessions>
<initial-context-environment>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<value>fr.dyade.aaa.jndi2.client.NamingContextFactory</value>
</property>
<property>
<name>Context.PROVIDER_URL</name>
<value>joram://localhost:16010</value>
</property>
<property>
<name>Context.SECURITY_PRINCIPAL</name>
<value>anonymous</value>
</property>
<property>
<name>Context.SECURITY_CREDENTIALS</name>
<value>anonymous</value>
</property>
</initial-context-environment>
</jms>
</properties>
<channels>
<channel ref="my-rtmp"/>
<channel ref="my-amf"/>
<channel ref="my-polling-amf"/>
</channels>
<adapter ref="jms"/>
<security-constraint ref="registred-users"/>
</destination>
I don't know why I have the error
'javax.naming.NamingException'with unknown protocol : joram. I tried
to give url provider with Http and tcp and i got the same error.
Can any one help
Thanks,
AL
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/