flex2gateway - 404 - "Please specify a valid 'services.configuration.file' in web.xml"

239 views
Skip to first unread message

Jens Jüttner

unread,
May 8, 2014, 4:59:04 AM5/8/14
to ra...@googlegroups.com
Hi,

Yesterday I ran into a problem setting up flex2gateway on Railo 4.1
First, I started uncommenting this section in my web.xml:
 
<servlet id="MessageBrokerServlet">
<description>Railo Servlet for Flex Gateway</description>
<servlet-name>MessageBrokerServlet</servlet-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<init-param>
<param-name>messageBrokerId</param-name>
<param-value>_default_</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

then made sure that the servlet-mapping existed:

<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/flex2gateway/*</url-pattern>
<url-pattern>/flashservices/gateway/*</url-pattern>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>


Finally I restarted Railo but going to http://mydomain:8888/flex2gateway/ returns 404.
So I checked the Tomcat log files and found this error message:

"Schwerwiegend: Servlet  threw load() exception
javax.servlet.UnavailableException: Please specify a valid 'services.configuration.file' in web.xml.  You specified '/WEB-INF/flex/services-config.xml'.  This is not a valid file system path reachable via the app server and is also not a path to a resource in your J2EE application archive.
at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:170)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1120)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1678)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)"
I was expecting Railo to create the "WEB-INF/flex" directory after restarting but it didn't.
Creating the flex directory and copying the *-config.xml files didn't work either.
Because Railo is running on a Windows machine, I tried changing the slashes into backslashes, which resulted in a slightly different error message:

"...Please specify a valid 'services.configuration.file' in web.xml.  
You specified '{0}'.
This is not a valid...."

Does Anybody know how to fix this? 

Thanks in advance.
Jens

Randy Heaps

unread,
May 16, 2014, 6:44:46 PM5/16/14
to ra...@googlegroups.com
Here is the thread I started earlier https://groups.google.com/d/topic/railo/qH3I0J6YdKQ/discussion ... I was able to get most of the settings as I progressed through the process. Still haven't got the last one figured out, but maybe the first few steps will help you get to the right config files with IIS.

Still looking for a "complete" guide on how to set up what was once the default configuration of Flex being ready out-of-the box... no one seems to have the exact recipe.

Good luck,
Randy
Reply all
Reply to author
Forward
0 new messages