RE: [flexcoders] Using JMS Adapter: 'javax.naming.NamingException unknown protocol : joram.
> I testes my JMS destination by coding MessageDrivenBean that subscribe to the > topic and it works fine. Could you include the 'message-driven' definition in ejb-jar.xml as well as any application specific configuration file that may map resource-ref or resource-env-refs to actual jndi names? The ClassCastException that you're seeing is due to a failure in the jndi lookup on the destination. > Could you give me more explanations of these properties > (Context.INITIAL_CONTEXT_FACTORY,Context.PROVIDER_URL)? The properties used by Flex are the ones defined by the naming api - http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/Context.html And, be sure that the troubleshooting JSP page is working first. - Cathy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of HOUMANI Nawal RD-BIZZ-ISS Sent: Monday, June 26, 2006 11:46 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Using JMS Adapter: 'javax.naming.NamingException unknown protocol : joram. Thanks for your reply. I testes my JMS destination by coding MessageDrivenBean that subscribe to the topic and it works fine. What I have done since I posted my subject is to change the properties : Context.INITIAL_CONTEXT_FACTORY=com.sun.jndi.rmi.registry.RegistryContextFactory And Context.PROVIDER_URL=rmi://localhost:1099 And i Have another error : java.lang.ClassCastException at flex.messaging.services.messaging.adapters.JMSProxy.getDestination(JM SProxy.java:186) at flex.messaging.services.messaging.adapters.JMSTopicConsumer.start(JMS TopicConsumer.java:59) at flex.messaging.services.messaging.adapters.JMSAdapter.manage(JMSAdapt er.java:343) at flex.messaging.services.MessageService.manageSubscriptions(MessageSer vice.java:510) at flex.messaging.services.MessageService.serviceCommand(MessageService. java:151) at flex.messaging.MessageBroker.routeCommandToService(MessageBroker.java :640) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndp oint.java:294) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abst ractRTMPServer.java:653) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTM PConnection.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:534) Exception in RtmpReader thread: java.lang.ClassCastException java.lang.ClassCastException at flex.messaging.services.messaging.adapters.JMSProxy.getConnectionFact ory(JMSProxy.java:173) at flex.messaging.services.messaging.adapters.JMSTopicConsumer.start(JMS TopicConsumer.java:72) at flex.messaging.services.messaging.adapters.JMSAdapter.manage(JMSAdapt er.java:343) at flex.messaging.services.MessageService.manageSubscriptions(MessageSer vice.java:510) at flex.messaging.services.MessageService.serviceCommand(MessageService. java:151) at flex.messaging.MessageBroker.routeCommandToService(MessageBroker.java :640) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndp oint.java:294) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abst ractRTMPServer.java:653) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTM PConnection.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:534) Could you give me more explanations of these properties (Context.INITIAL_CONTEXT_FACTORY,Context.PROVIDER_URL)? I will try to test my jms topic using the jsp code you give me. -Message d'origine- De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Cathy Reilly Envoyé : lundi 26 juin 2006 17:08 À : flexcoders@yahoogroups.com Objet : RE: [flexcoders] Using JMS Adapter: 'javax.naming.NamingException unknown protocol : joram. 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
RE: [flexcoders] Using JMS Adapter: 'javax.naming.NamingException unknown protocol : joram.
Thanks for your reply. I testes my JMS destination by coding MessageDrivenBean that subscribe to the topic and it works fine. What I have done since I posted my subject is to change the properties : Context.INITIAL_CONTEXT_FACTORY=com.sun.jndi.rmi.registry.RegistryContextFactory And Context.PROVIDER_URL=rmi://localhost:1099 And i Have another error : java.lang.ClassCastException at flex.messaging.services.messaging.adapters.JMSProxy.getDestination(JM SProxy.java:186) at flex.messaging.services.messaging.adapters.JMSTopicConsumer.start(JMS TopicConsumer.java:59) at flex.messaging.services.messaging.adapters.JMSAdapter.manage(JMSAdapt er.java:343) at flex.messaging.services.MessageService.manageSubscriptions(MessageSer vice.java:510) at flex.messaging.services.MessageService.serviceCommand(MessageService. java:151) at flex.messaging.MessageBroker.routeCommandToService(MessageBroker.java :640) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndp oint.java:294) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abst ractRTMPServer.java:653) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTM PConnection.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:534) Exception in RtmpReader thread: java.lang.ClassCastException java.lang.ClassCastException at flex.messaging.services.messaging.adapters.JMSProxy.getConnectionFact ory(JMSProxy.java:173) at flex.messaging.services.messaging.adapters.JMSTopicConsumer.start(JMS TopicConsumer.java:72) at flex.messaging.services.messaging.adapters.JMSAdapter.manage(JMSAdapt er.java:343) at flex.messaging.services.MessageService.manageSubscriptions(MessageSer vice.java:510) at flex.messaging.services.MessageService.serviceCommand(MessageService. java:151) at flex.messaging.MessageBroker.routeCommandToService(MessageBroker.java :640) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndp oint.java:294) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abst ractRTMPServer.java:653) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTM PConnection.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor ker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:534) Could you give me more explanations of these properties (Context.INITIAL_CONTEXT_FACTORY,Context.PROVIDER_URL)? I will try to test my jms topic using the jsp code you give me. -Message d'origine- De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Cathy Reilly Envoyé : lundi 26 juin 2006 17:08 À : flexcoders@yahoogroups.com Objet : RE: [flexcoders] Using JMS Adapter: 'javax.naming.NamingException unknown protocol : joram. 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 serv
RE: [flexcoders] Using JMS Adapter: 'javax.naming.NamingException unknown protocol : joram.
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/. 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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rania_aya_tgfrd Sent: Monday, June 26, 2006 9:17 AM To: flexcoders@yahoogroups.com 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 : false flex.messaging.durability.FileStoreManager Topic javax.jms.TextMessage TCF sampleTopic false NON_PERSISTENT DEFAULT_PRIORITY AUTO_ACKNOWLEDGE false Context.INITIAL_CONTEXT_FACTORY fr.dyade.aaa.jndi2.client.NamingContextFactory Context.PROVIDER_URL