Error message
Hi everyone I am using XML-RPC to provide an interface with many methods and different clients. I get the following error message: Sep 7, 2010 10:25:16 AM org.apache.xmlrpc.server.XmlRpcErrorLogger log SEVERE: No method matching arguments: java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer org.apache.xmlrpc.XmlRpcException: No method matching arguments: java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:110) at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46) at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86) at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200) at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68) I was wondering if there is any way to make the error message more useful. I can see that a client tries to invoke a method with five arguments and that it probably did not find the method. It would be very useful if the method name would be listed in the exception, is there a way to achieve this, maybe a start parameter for XML-RPC? Thanks in advance Lars
void methods
Hi I am considering using PropertyHandlerMapping.getListMethods() and PropertyHandlerMapping.getMethodHelp(String pHandlerName) to document my interface. The PropertyHandlerMapping.getListMethods() gives me an array of strings listing the methods, except those methods that return void. I have invoked PropertyHandlerMapping.setVoidMethodEnabled(true), but the methods that return void are not listed, why? Thanks Lars
Re: XML-RPC timeout
I did and it works now, thank you! Jochen Wiedmann wrote: Quite possible. Try 3.1.3. On Mon, Feb 15, 2010 at 11:50 AM, Lars Schnoor wrote: When I look at the source code for XML-RPC 3.1.2 I can't see any initHttpHeaders in XmlRpcSun15HttpTransport, is this initHttpHeaders a newer thing? Jochen Wiedmann wrote: Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That should demonstrate you that the timeout values are set. If they aren't working, contact Sun. On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor wrote: Would this be correct? XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setConnectionTimeout(2000); config.setReplyTimeout(5000); this.client = new XmlRpcClient(); this.client.setConfig(config); this.client.setTransportFactory(new XmlRpcSun15HttpTransportFactory(this.client)); I tried it, but still get about 20 seconds before the XML-RPC invocation fails. Jochen Wiedmann wrote: http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory) On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor wrote: How do I set the transport factory? I followed the example on the website. Jochen Wiedmann wrote: Are you using a proper transport factory, like XmlRpcSun15HttpTransportFactory? On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor wrote: Hi I have seen that the XmlRpcClientConfigImpl has two methods to set timeout, there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int pTimeout). Do these methods do anything? I have used these methods to set the two timeouts to 2 and 5 seconds respectively. I setup a client with these timeouts, print out a debug statement with timestamp and then I attempt to execute a XML-RPC method on my server which does not exist. The first thing in my catch block for the exception is a new debug statement that tells me that attempted XML-RPC failed after about 20 seconds. So, for me it looks like XML-RPC does not care about the timeouts I set, is this correct? Is there a way to set the timeouts and have XML-RPC attempt for the timeout period? I am using Windows XP. Thanks Lars
Re: XML-RPC timeout
When I look at the source code for XML-RPC 3.1.2 I can't see any initHttpHeaders in XmlRpcSun15HttpTransport, is this initHttpHeaders a newer thing? Jochen Wiedmann wrote: Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That should demonstrate you that the timeout values are set. If they aren't working, contact Sun. On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor wrote: Would this be correct? XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setConnectionTimeout(2000); config.setReplyTimeout(5000); this.client = new XmlRpcClient(); this.client.setConfig(config); this.client.setTransportFactory(new XmlRpcSun15HttpTransportFactory(this.client)); I tried it, but still get about 20 seconds before the XML-RPC invocation fails. Jochen Wiedmann wrote: http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory) On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor wrote: How do I set the transport factory? I followed the example on the website. Jochen Wiedmann wrote: Are you using a proper transport factory, like XmlRpcSun15HttpTransportFactory? On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor wrote: Hi I have seen that the XmlRpcClientConfigImpl has two methods to set timeout, there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int pTimeout). Do these methods do anything? I have used these methods to set the two timeouts to 2 and 5 seconds respectively. I setup a client with these timeouts, print out a debug statement with timestamp and then I attempt to execute a XML-RPC method on my server which does not exist. The first thing in my catch block for the exception is a new debug statement that tells me that attempted XML-RPC failed after about 20 seconds. So, for me it looks like XML-RPC does not care about the timeouts I set, is this correct? Is there a way to set the timeouts and have XML-RPC attempt for the timeout period? I am using Windows XP. Thanks Lars
Re: XML-RPC timeout
Are you referring to a bug in the JRE? Jochen Wiedmann wrote: Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That should demonstrate you that the timeout values are set. If they aren't working, contact Sun. On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor wrote: Would this be correct? XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setConnectionTimeout(2000); config.setReplyTimeout(5000); this.client = new XmlRpcClient(); this.client.setConfig(config); this.client.setTransportFactory(new XmlRpcSun15HttpTransportFactory(this.client)); I tried it, but still get about 20 seconds before the XML-RPC invocation fails. Jochen Wiedmann wrote: http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory) On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor wrote: How do I set the transport factory? I followed the example on the website. Jochen Wiedmann wrote: Are you using a proper transport factory, like XmlRpcSun15HttpTransportFactory? On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor wrote: Hi I have seen that the XmlRpcClientConfigImpl has two methods to set timeout, there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int pTimeout). Do these methods do anything? I have used these methods to set the two timeouts to 2 and 5 seconds respectively. I setup a client with these timeouts, print out a debug statement with timestamp and then I attempt to execute a XML-RPC method on my server which does not exist. The first thing in my catch block for the exception is a new debug statement that tells me that attempted XML-RPC failed after about 20 seconds. So, for me it looks like XML-RPC does not care about the timeouts I set, is this correct? Is there a way to set the timeouts and have XML-RPC attempt for the timeout period? I am using Windows XP. Thanks Lars
Re: XML-RPC timeout
Would this be correct? XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setConnectionTimeout(2000); config.setReplyTimeout(5000); this.client = new XmlRpcClient(); this.client.setConfig(config); this.client.setTransportFactory(new XmlRpcSun15HttpTransportFactory(this.client)); I tried it, but still get about 20 seconds before the XML-RPC invocation fails. Jochen Wiedmann wrote: http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory) On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor wrote: How do I set the transport factory? I followed the example on the website. Jochen Wiedmann wrote: Are you using a proper transport factory, like XmlRpcSun15HttpTransportFactory? On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor wrote: Hi I have seen that the XmlRpcClientConfigImpl has two methods to set timeout, there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int pTimeout). Do these methods do anything? I have used these methods to set the two timeouts to 2 and 5 seconds respectively. I setup a client with these timeouts, print out a debug statement with timestamp and then I attempt to execute a XML-RPC method on my server which does not exist. The first thing in my catch block for the exception is a new debug statement that tells me that attempted XML-RPC failed after about 20 seconds. So, for me it looks like XML-RPC does not care about the timeouts I set, is this correct? Is there a way to set the timeouts and have XML-RPC attempt for the timeout period? I am using Windows XP. Thanks Lars
Re: XML-RPC timeout
How do I set the transport factory? I followed the example on the website. Jochen Wiedmann wrote: Are you using a proper transport factory, like XmlRpcSun15HttpTransportFactory? On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor wrote: Hi I have seen that the XmlRpcClientConfigImpl has two methods to set timeout, there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int pTimeout). Do these methods do anything? I have used these methods to set the two timeouts to 2 and 5 seconds respectively. I setup a client with these timeouts, print out a debug statement with timestamp and then I attempt to execute a XML-RPC method on my server which does not exist. The first thing in my catch block for the exception is a new debug statement that tells me that attempted XML-RPC failed after about 20 seconds. So, for me it looks like XML-RPC does not care about the timeouts I set, is this correct? Is there a way to set the timeouts and have XML-RPC attempt for the timeout period? I am using Windows XP. Thanks Lars
XML-RPC timeout
Hi I have seen that the XmlRpcClientConfigImpl has two methods to set timeout, there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int pTimeout). Do these methods do anything? I have used these methods to set the two timeouts to 2 and 5 seconds respectively. I setup a client with these timeouts, print out a debug statement with timestamp and then I attempt to execute a XML-RPC method on my server which does not exist. The first thing in my catch block for the exception is a new debug statement that tells me that attempted XML-RPC failed after about 20 seconds. So, for me it looks like XML-RPC does not care about the timeouts I set, is this correct? Is there a way to set the timeouts and have XML-RPC attempt for the timeout period? I am using Windows XP. Thanks Lars
Design question
Hi I am using XML-RPC for a control interface for my application. My application starts a web server which loads the class that provides the XML-RPC methods. I believe that the web server creates a new object of the class that implements the XML-RPC methods each time a XML-RPC method is invoked. This is not a problem as long as the methods do simple things like the calculator example, but if the method should manipulate data that is not passed in by the method it becomes a bit more complicated. When my application starts up I create and initialize some objects, the XML-RPC based interface is used to manipulate the objects in my application, but since the interface class gets initialized for every method invocation I need to make my methods to manipulate the objects static and invoke them from the XML-RPC interface. Having to have all methods that should be invoked by the XML-RPC interface static is become more and more a problem. I was therefore wondering if it is possible to create and initialize the XML-RPC interface once and have the web server use this object again and again? Thanks in advance! Lars
Re: XML-RPC update
I guess my reasons aren't good enough? Lars Schnoor wrote: Hi Jochen The reason I am using the snapshot is that the 3.1.2 version that I used before ran into the deadlock problem (XMLRPC-168) which I believe would be solved in an update? I noticed that I am not the only one running into the deadlock problem, so I think that it would be a good idea to get XML-RPC updated so that people avoid this possible deadlock problem in the first place? Lars Jochen Wiedmann wrote: On Mon, Jul 27, 2009 at 2:31 PM, Lars Schnoor wrote: I was wondering if there soon will be an official release 3.1.3 of XML-RPC? Since May I have been using a snapshot of 3.1.3. You are the first one to ask for, so I haven't seen any reson. Why should there be any, in your opinion?
Re: XML-RPC update
Hi Jochen The reason I am using the snapshot is that the 3.1.2 version that I used before ran into the deadlock problem (XMLRPC-168) which I believe would be solved in an update? I noticed that I am not the only one running into the deadlock problem, so I think that it would be a good idea to get XML-RPC updated so that people avoid this possible deadlock problem in the first place? Lars Jochen Wiedmann wrote: On Mon, Jul 27, 2009 at 2:31 PM, Lars Schnoor wrote: I was wondering if there soon will be an official release 3.1.3 of XML-RPC? Since May I have been using a snapshot of 3.1.3. You are the first one to ask for, so I haven't seen any reson. Why should there be any, in your opinion?
XML-RPC update
Hi I was wondering if there soon will be an official release 3.1.3 of XML-RPC? Since May I have been using a snapshot of 3.1.3. Lars
Re: XmlRpcHttpTransportException (apache xmlrpc client, xmlrpc-c C++ server)
Hi I am not sure if I can come with any useful for you, but I would try changing the argument to you function call from Vector to Object[]. My server runs Apaches XML-RPC and I have managed to use it with both xml-rpc for c and for c++. Lars Arne Kalaghan wrote: Hello, I have problems connecting an apache java xml-rpc client with a xmlrpc-c C++ xml-rpc server (system is ubuntu linux 8.04). The client code is modified from the first example at http://www.wordtracker.com/docs/api/ch03s02.html. The server code is http://xmlrpc-c.svn.sourceforge.net/viewvc/xmlrpc-c/trunk/examples/cpp/xmlrpc_sample_add_server.cpp?revision=1083&view=markup When running the client (after server is started) I get: Exception in thread "main" org.apache.xmlrpc.client.XmlRpcHttpTransportException: HTTP server returned unexpected status: Not Found at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.getInputStream(XmlRpcSunHttpTransport.java:94) at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:152) at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:115) at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69) at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147) at test.apachexmlrpc.Client.main(Client.java:9) The java client can communicate with a server from the same apache package, and the C++ server can communicate with a C++ client from the same xmlrpc-c package. What can be the reason for the incompatibilities between java and C++? Here are the sources for completeness: Java client Client.java: import org.apache.xmlrpc.XmlRpcClient; import java.util.Vector; public class Client { public static void main( String args[] ) throws Exception { XmlRpcClient client = new XmlRpcClient( "http://localhost:8080/"; ); Vector params = new Vector(); params.addElement( 5 ); params.addElement( 7 ); Object result = client.execute( "sample.add", params ); if ( result != null ) System.out.println( "Successfully pinged guest account." ); } } C++ server xmlrpc_sample_add_server.cpp: #include #include #include #ifdef WIN32 # include #else # include #endif #include #include #include using namespace std; #ifdef WIN32 #define SLEEP(seconds) SleepEx(seconds * 1000); #else #define SLEEP(seconds) sleep(seconds); #endif class sampleAddMethod : public xmlrpc_c::method { public: sampleAddMethod() { // signature and help strings are documentation -- the client // can query this information with a system.methodSignature and // system.methodHelp RPC. this->_signature = "i:ii"; // method's result and two arguments are integers this->_help = "This method adds two integers together"; } void execute(xmlrpc_c::paramList const& paramList, xmlrpc_c::value * const retvalP) { int const addend(paramList.getInt(0)); int const adder(paramList.getInt(1)); paramList.verifyEnd(2); *retvalP = xmlrpc_c::value_int(addend + adder); // Sometimes, make it look hard (so client can see what it's like // to do an RPC that takes a while). if (adder == 1) SLEEP(2); } }; int main(int const, const char ** const) { try { xmlrpc_c::registry myRegistry; xmlrpc_c::methodPtr const sampleAddMethodP(new sampleAddMethod); myRegistry.addMethod("sample.add", sampleAddMethodP); xmlrpc_c::serverAbyss myAbyssServer( myRegistry, 8080, // TCP port on which to listen "/tmp/xmlrpc_log" // Log file ); myAbyssServer.run(); // xmlrpc_c::serverAbyss.run() never returns assert(false); } catch (exception const& e) { cerr << "Something failed. " << e.what() << endl; } return 0; } Kind regards, A. Kalaghan
Re: ThreadPool deadlock
Hi I am using the newest snapshot and it reduced the frequency of crashes considerably, but I still have problems with it from time to time. I did however not get a chance to check if it is the same deadlock problem as before. Lars Jochen Wiedmann wrote: It is funny. This problem has been in the code for years, but has never been brought up by any user. Now we see it three times in a month ... Try the latest snapshot, as available from https://repository.apache.org/content/repositories/snapshots/org/apache/xmlrpc/ It should be sufficient to replace the "common" jar file. Jochen 2009/5/18 Игорь Бахтояров : Здравствуйте, Xmlrpc-dev. In last release i'am found deadlock issue: java.lang.Throwable: Deadlock Detected: ThreadName= XML-RPC-7LockName = org.apache.xmlrpc.util.threadpool$poola...@1428edflockownername = XML-RPC Weblistener ThreadName= XML-RPC WeblistenerLockName = org.apache.xmlrpc.util.threadpool$poolabl...@b1efd7lockownername = XML-RPC-7 at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107) at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168) at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338) at java.lang.Thread.run(Thread.java:619)
Running xmlrpc client on specific port
Hi everyone I have seen that a xmlrpc server can be created giving both a network port and an IP-address. For me this sounds like the server can be made to listen on a specific network interface. When creating a xmlrpc client only a port and address of the xmlrpc server is given. Is it possible to specify a IP-address for the client to use for connecting to the server? I mean if the client computer has multiple network cards and one specific should be used to connect to the server running the xmlrpc server software. Thanks in advance! Lars
Re: Problem with XmlRpcClient.execute()
Thank you Jochen, I am still testing if version 3.1.3 fixes my problem. Jochen Wiedmann wrote: On Sun, May 10, 2009 at 1:51 PM, Lars Schnoor wrote: Now I checked the newest source out, but how do I build it? I found some eclipse files, but my NetBeans 6.5 does not want to import them as a Eclipse project. Is there maybe some documentation to explain how to get the jar-files generated? Lars, I have uploaded a snapshot to https://repository.apache.org/content/repositories/snapshots/org/apache/xmlrpc Jochen
Re: Problem with XmlRpcClient.execute()
Now I checked the newest source out, but how do I build it? I found some eclipse files, but my NetBeans 6.5 does not want to import them as a Eclipse project. Is there maybe some documentation to explain how to get the jar-files generated? Jochen Wiedmann wrote: Funny, looks like https://issues.apache.org/jira/browse/XMLRPC-168 Checkout and build the latest version from SVN. On Sat, May 9, 2009 at 11:21 PM, Lars Schnoor wrote: Hi Alan Now I have been able to recreate the problem and can post the stack traces. I have actually one client and one server on each machine, but in the example below the call from the client to the server does not return. *On the client side:* /"XML-RPC-1" prio=6 tid=0x02bf1c00 nid=0xd70 in Object.wait() [0x03a7f000..0x03a7fd14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x22f506b8> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC-0" prio=6 tid=0x02c8a400 nid=0xb00 in Object.wait() [0x036df000..0x036dfb14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x22f42870> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC Weblistener" prio=6 tid=0x03008800 nid=0x798 runnable [0x037df000..0x037dfb94] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) - locked <0x22f13ec8> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:326) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None/ *On the server side:* /"XML-RPC-2" prio=6 tid=0x030e9400 nid=0xe64 waiting for monitor entry [0x035af000..0x035afa94] java.lang.Thread.State: BLOCKED (on object monitor) at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99) - waiting to lock <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable) at org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59) - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC-1" prio=6 tid=0x02d2f000 nid=0x26c in Object.wait() [0x03baf000..0x03bafb14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC-0" prio=6 tid=0x02d3c800 nid=0x3d0 in Object.wait() [0x03b5f000..0x03b5fb94] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC Weblistener" prio=6 tid=0x0309b400 nid=0x584 waiting for monitor entry [0x0340f000..0x0340fb94] java.lang.Thread.State: BLOCKED (on object monitor) at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107) - waiting to lock <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable) at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168) - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool) at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None Found one Java-level deadlock: = "XML-RPC-2": waiting to lock monitor 0x030fd5bc (object 0x09293ac0, a org.apache.xmlrpc.util.ThreadPool$Poolable), which is held by "XML-RPC Weblistener" "XML-RPC Weblistener": waiting to lock monitor 0x030a6134 (object 0x09293a50, a org.apache.xmlrpc.util.ThreadPool$Poolable$1), which is held by "XML-RPC-2" Java stack information for the threads listed above: ===
Re: Problem with XmlRpcClient.execute()
Hi Would it be possible to get the newest version as a precompiled binary? I am unfortunately not familiar with SVN, only CVS. Lars Jochen Wiedmann wrote: Funny, looks like https://issues.apache.org/jira/browse/XMLRPC-168 Checkout and build the latest version from SVN. On Sat, May 9, 2009 at 11:21 PM, Lars Schnoor wrote: Hi Alan Now I have been able to recreate the problem and can post the stack traces. I have actually one client and one server on each machine, but in the example below the call from the client to the server does not return. *On the client side:* /"XML-RPC-1" prio=6 tid=0x02bf1c00 nid=0xd70 in Object.wait() [0x03a7f000..0x03a7fd14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x22f506b8> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC-0" prio=6 tid=0x02c8a400 nid=0xb00 in Object.wait() [0x036df000..0x036dfb14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x22f42870> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC Weblistener" prio=6 tid=0x03008800 nid=0x798 runnable [0x037df000..0x037dfb94] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) - locked <0x22f13ec8> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:326) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None/ *On the server side:* /"XML-RPC-2" prio=6 tid=0x030e9400 nid=0xe64 waiting for monitor entry [0x035af000..0x035afa94] java.lang.Thread.State: BLOCKED (on object monitor) at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99) - waiting to lock <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable) at org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59) - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC-1" prio=6 tid=0x02d2f000 nid=0x26c in Object.wait() [0x03baf000..0x03bafb14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC-0" prio=6 tid=0x02d3c800 nid=0x3d0 in Object.wait() [0x03b5f000..0x03b5fb94] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) at java.lang.Object.wait(Object.java:485) at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60) - locked <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) Locked ownable synchronizers: - None "XML-RPC Weblistener" prio=6 tid=0x0309b400 nid=0x584 waiting for monitor entry [0x0340f000..0x0340fb94] java.lang.Thread.State: BLOCKED (on object monitor) at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107) - waiting to lock <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable) at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168) - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool) at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None Found one Java-level deadlock: = "XML-RPC-2": waiting to lock monitor 0x030fd5bc (object 0x09293ac0, a org.apache.xmlrpc.util.ThreadPool$Poolable), which is held by "XML-RPC Weblistener" "XML-RPC Weblistener": waiting to lock monitor 0x030a6134 (object 0x09293a50, a org.apache.xmlrpc.util.ThreadPool$Poolable$1), which is held by "XML-RPC-2" Java stack information for the threads listed above: === "XML-RPC-2": at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99) - waiting to lock
Re: Problem with XmlRpcClient.execute()
<0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) "XML-RPC Weblistener": at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107) - waiting to lock <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1) - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable) at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168) - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool) at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338) at java.lang.Thread.run(Unknown Source) Found 1 deadlock./ Lars Alan Burlison wrote: Lars Schnoor wrote: Hi Alan What is jstack and how do I run it? It is a Java utility that allows you to see what the JVM is doing, and it comes as part of the standard install on all platforms except Windows. You should find it in your Java bin directory, e.g. /usr/java/bin. You should also see if there are any deadlocks reported at the end of the output. See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html
Re: Problem with XmlRpcClient.execute()
Hi again I am running Windows XP so jstack is not part of the JRE. It seems like it is part of the JDK for windows, but strangely I haven't been able to recreate the problem since. Lars Alan Burlison wrote: Lars Schnoor wrote: Hi Alan What is jstack and how do I run it? It is a Java utility that allows you to see what the JVM is doing, and it comes as part of the standard install on all platforms except Windows. You should find it in your Java bin directory, e.g. /usr/java/bin. You should also see if there are any deadlocks reported at the end of the output. See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html
Re: Problem with XmlRpcClient.execute()
Hi Alan What is jstack and how do I run it? Lars Alan Burlison wrote: Lars Schnoor wrote: Hi everyone I am a new user to XML-RPC. I have developed a program that uses XML-RPC to communicate with another of my programs on another machine. Both programs are in Java and use the same XML-RPC libraries. Everything seems to work fine until my programs have run for a couple of minutes, then all of a sudden a call to *XmlRpcClient.|execute (java.lang.String pMethodName, java.lang.Object[] pParams)|* does not return and my program freezes. All my calls are in try catch blocks, but I do not get any exceptions. Does anyone have any idea what might be the problem and how I can fix it? I am using the newest version of XML-RCP from Apache, version 3.1.2. Thanks in advance! Can you run 'jstack' on each of the Java processes and send us the stack traces for the XML-RPC threads? Thanks,
Problem with XmlRpcClient.execute()
Hi everyone I am a new user to XML-RPC. I have developed a program that uses XML-RPC to communicate with another of my programs on another machine. Both programs are in Java and use the same XML-RPC libraries. Everything seems to work fine until my programs have run for a couple of minutes, then all of a sudden a call to XmlRpcClient.execute(java.lang.String pMethodName, java.lang.Object[] pParams) does not return and my program freezes. All my calls are in try catch blocks, but I do not get any exceptions. Does anyone have any idea what might be the problem and how I can fix it? I am using the newest version of XML-RCP from Apache, version 3.1.2. Thanks in advance! Lars