java.net.MalformedURLException

117 views
Skip to first unread message

pma...@crateandbarrel.com

unread,
Mar 6, 2017, 4:23:51 AM3/6/17
to membrane-monitor
I have got about the simplest proxies.xml imaginable. It seems to be working properly but it is filling the log with countless MalformedURLException errors. The proxies.xml is here followed by the error that appears in the command window.  How can I correct this? Thanks!

proxies.xml:
<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
   
xmlns:spring="http://www.springframework.org/schema/beans"
   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   
xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
                        http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd"
>

   
<router>
       
<serviceProxy port="5555">
           
<target port="5559" host="localhost"/>
       
</serviceProxy>
   
</router>
</spring:beans>

Dump:
ERROR HttpServerHandler:140 -
java.net.MalformedURLException: For input string: "5559http:"
        at java.net.URL.<init>(URL.java:620)
        at java.net.URL.<init>(URL.java:483)
        at java.net.URL.<init>(URL.java:432)
        at com.predic8.membrane.core.util.HttpUtil.getPathAndQueryString(HttpUtil.java:253)
        at com.predic8.membrane.core.transport.http.HttpClient.setRequestURI(HttpClient.java:122)
        at com.predic8.membrane.core.transport.http.HttpClient.init(HttpClient.java:136)
        at com.predic8.membrane.core.transport.http.HttpClient.call(HttpClient.java:182)
        at com.predic8.membrane.core.interceptor.HTTPClientInterceptor.handleRequest(HTTPClientInterceptor.java:60)
        at com.predic8.membrane.core.interceptor.InterceptorFlowController.invokeRequestHandlers(InterceptorFlowController.java:106)
        at com.predic8.membrane.core.interceptor.InterceptorFlowController.invokeHandlers(InterceptorFlowController.java:71)
        at com.predic8.membrane.core.transport.http.AbstractHttpHandler.invokeHandlers(AbstractHttpHandler.java:70)
        at com.predic8.membrane.core.transport.http.HttpServerHandler.process(HttpServerHandler.java:225)
        at com.predic8.membrane.core.transport.http.HttpServerHandler.run(HttpServerHandler.java:112)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NumberFormatException: For input string: "5559http:"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:65)
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.parseInt(Integer.java:615)
        at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:216)
        at java.net.URL.<init>(URL.java:615)
        ... 15 more

pma...@crateandbarrel.com

unread,
Mar 7, 2017, 12:57:24 AM3/7/17
to membrane-monitor
Here is some additional information I've discovered. If I change the router to a different proxy port it works without throwing any errors. The target port has not changed:

    <router>
       
<serviceProxy port="5550">

           
<target port="5559" host="localhost"/>
       
</serviceProxy>
   
</router>
 
There is nothing that I know of that is any different about ports 5550 and 5555. Except that 5555 gives me those Malformed URL exceptions. Unfortunately I am required to make this work with port 5555. Has anybody experienced anything like this before? Another interesting thing about my situation is that I CAN use port 5555 in a soapProxy without throwing any errors either. I don't know what to make of that. This is membrane 4.3 running on Windows Server 2012R2.

Thanks again.

Till Born

unread,
Mar 20, 2017, 6:14:07 AM3/20/17
to membrane-monitor
Hello Perry Malen,
sorry for the late response. I tried to reproduce your error and must unfortunately say that i could not reproduce your error. I've used the following configuration
                   http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">

   
<router>
     
<serviceProxy port="5555">

         
<target port="5559" host="localhost"/>
     
</serviceProxy>

     
<serviceProxy port="5550">
         
<target port="5559" host="localhost"/>
     
</serviceProxy>


     
<serviceProxy port="5559">
         
<groovy>
            exc.setResponse(Response.ok("Working").build());
            RETURN;
         
</groovy>
     
</serviceProxy>
   
</router>

</spring:beans>
By the looks of the error could you doublecheck if there was no typo in the "port" part of your configuration?
Wish you all the best,
Till

Perry Malen

unread,
Mar 20, 2017, 9:31:39 PM3/20/17
to membrane...@googlegroups.com
Hi Till,

Thank you for your response. I am not surprised that you couldn't reproduce the error. I can not reproduce it either! I have loaded the proxy on my Windows 7 desktop pc and it works just fine with the exact same configuration. I have loaded it on a different windows 2012 server and it works just fine with the same configuration. It's just on the one server where I actually need it that it throws the errors. There is no typo in the configuration file. All of the machines are running the identical version of java. I've never had a thing perplex me so. There has got to be something else running on this one server that is interfering with the proxy. I'll try to determine what it is. If you have any ideas on what might cause this symptom I would be very grateful to hear them. Thank you for your help.

Perry

Perry Malen
Manager, Software Integration Services

1250 Techny Road
Northbrook, IL 60062

This communication (including any attachments) may contain confidential or privileged information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, disclose or otherwise use this information. Also, please notify the sender by email that you have received this transmission in error, and delete this email from your system. Thank you.

--
You received this message because you are subscribed to a topic in the Google Groups "membrane-monitor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/membrane-monitor/KqlDyhPfeV8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to membrane-monitor+unsubscribe@googlegroups.com.
To post to this group, send email to membrane-monitor@googlegroups.com.
Visit this group at https://groups.google.com/group/membrane-monitor.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages