I recently upgraded to CF8 and experienced a small problem when i went to configure my AMF end points and channels. First I must say that I like the new method of keeping the channel definitions in the services-config while breaking out the destination settings into separate files like remoting-config. Now all that being said I encountered the following error when going to http://localhost/flex2gateway/
after copying over my old settings into these files.
500
java.lang.NullPointerException
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:283)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
The problem occurs because apparently while it was ok to have two channels share the same endpoint uri URL in CF7…
4 Comments
2008.03.03 at 4:54 pm
Hey There,
I’m stuck as well on a 500 error viewing http://localhost/flex2gateway when I found your potential solution. You said to "The solution is to simply change the endpoint uri for the new channel. (You should leave the class definition the same for the uri.)". I don’t exactly understand what you mean, could you help clarify? Here’s what’s currently in my services-config.xml.
<channel-definition id="cf-polling-amf" class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/cfamfpolling/" class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>8</polling-interval-seconds>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
<channel-definition id="my-cfamf-secure" class="mx.messaging.channels.SecureAMFChannel">
<endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
Thanks,
Noah
2008.03.07 at 11:32 am
So I’m finding this error myself, and am a bit confused by just "changing" the endpoint uri… I’ve got
3 different servers which all have the flex2gateway endpoint enabled, and CF8 bitches at me about the
duplicate endpoints even though the server definitions are all completely different!
eg. (excerpts from remoting-config.xml and services-config.xml)
<channels>
<channel ref="server1"/>
<channel ref="server2"/>
</channels>
<endpoint uri="http://www.server1.com:80/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
<endpoint uri="http://www.server2.com:80/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
Inside the cfserver.log file, I watch the gateways services fail because:
Could not register endpoint ‘/flex2gateway’ with channel ’server1′, already registered by channel ’server2′
WTF? Anyone else have this issue?
2008.03.13 at 1:54 pm
“Noah,
I think the problem you are having is that you are not hitting a valid URL for testing. If the two channel definitions that you included are the only two you have in your services config.xml then then you are missing the default channel of
http://~~~/flex2gateway/
If this is th case then you will get a 500 error when you go to http://~~~/flex2gateway/
You need to hit the configured urls in your browser for your gateways for testing. In your case these would be:
http://~~~/flex2gateway/cfamfpolling/
and
https://~~~/flex2gateway/cfamfsecure“
2008.04.30 at 2:48 pm
Loooolll I had same error, and actually, I open the web.xml file, saw the servlet MessageBroker… This Java classes is on flex/jars/ on my development server.
But in my prod. server, I have not jars directory in flex !!! So I just copy jars folder in flex and restart server and works!!!
Leave a Reply