When attempting to use Flash Remoting to CFCs that reside on a ColdFusion MX server that was manually deployed to JRun, you might receive an exception that prevents you from being successful.

[Flash Remoting MX]->flashgateway.adapter.NoSuchServiceException:
No service named com.macromedia.test.HelloWorld is known to Flash Remoting MX.
at flashgateway.filter.AdapterFilter.invoke(AdapterFilter.java:251)
at flashgateway.filter.SecurityFilter.invoke(SecurityFilter.java:85)
at flashgateway.filter.LicenseFilter.invoke(LicenseFilter.java:58)
at flashgateway.filter.ErrorFilter.invoke(ErrorFilter.java:44)
at flashgateway.filter.LogFilter.invoke(LogFilter.java:43)
at flashgateway.filter.BatchProcessFilter.invoke(BatchProcessFilter.java:63)
at flashgateway.filter.DebugFilter.invoke(DebugFilter.java:38)
at flashgateway.filter.SerializationFilter.invoke(SerializationFilter.java:59)
at flashgateway.Gateway.invoke(Gateway.java:194)
at flashgateway.controller.GatewayServlet.service(GatewayServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
In one case of this, I found that the following exception was occuring on a fully functioning CFMX 6.1 Enterprise Server properly licensed and deployed to JRun4:

[Flash Remoting MX]->Logging Filter: Invoking function on Flash Remoting MX service,
target URI: com.macromedia.test.HelloWorld.sayHello
[Flash Remoting MX]->CFC Adapter: invoking component 'com.macromedia.test.HelloWorld'
[Flash Remoting MX]->java.lang.NullPointerException
at coldfusion.license.LicenseManager._isSingleIP(LicenseManager.java:171)
at coldfusion.license.LicenseManager.isSingleIP(LicenseManager.java:68)
at coldfusion.flash.FlashProxy.getComponentFilterChain(FlashProxy.java:179)
at coldfusion.flash.FlashProxy.invokeComponent(FlashProxy.java:125)
at flashgateway.adapter.coldfusion.CFCAdapter.invokeFunction(CFCAdapter.java:95)
at flashgateway.filter.AdapterFilter.invoke(AdapterFilter.java:266)
at flashgateway.filter.SecurityFilter.invoke(SecurityFilter.java:85)
at flashgateway.filter.LicenseFilter.invoke(LicenseFilter.java:58)
at flashgateway.filter.ErrorFilter.invoke(ErrorFilter.java:44)
at flashgateway.filter.LogFilter.invoke(LogFilter.java:43)
at flashgateway.filter.BatchProcessFilter.invoke(BatchProcessFilter.java:63)
at flashgateway.filter.DebugFilter.invoke(DebugFilter.java:38)
at flashgateway.filter.SerializationFilter.invoke(SerializationFilter.java:59)
at flashgateway.Gateway.invoke(Gateway.java:194)
at flashgateway.controller.GatewayServlet.service(GatewayServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


When you create a new server instance of JRun4 it automatically comes with a Default EAR having a context root of "/" and a Flash Remoting EAR having a context root of "/flashservices". Many administrators prefer to have a ColdFusion MX application context root of "/", so they either remove the Default EAR or change the Default EAR context root to something other than "/". However, when planning to use Flash Remoting in this configuration you'll find that the JRun Flash Remoting EAR context root "/flashservices" will conflict with the ColdFusion MX servlet mapping for "/flashservices/*" as defined in the deployment descriptor $CF_EAR/$CF_WAR/WEB-INF/web.xml.


In this case, you'll probably want to either remove the JRun 4 Flash Remoting EAR for that server instance through the JMC interface or change its context root to something other than "/flashservices". If you choose to remove the JRun4 Flash Remoting EAR for that server instance, that EAR this will not affect any other server instances. Once having corrected the URL conflict, you should then be able to make a sucessful connection via Flash Remoting to the appropriate CFC when using the standard NetServices Default Gateway URL of http://{servername}/flashservices/gateway.