[JBossWS] - javax.xml.ws.soap.SOAPFaultException: Read timed out - Does
by r12345_2003
Hi,
I am using jboss eap 4.3 and jboss-ws. My application exposes a web service implemented as a servlet.
I also have a web service client that invokes the web service. So far everything works okay.
I then started load testing the web service by submitting a number of simultaneously requests. (I wrote a standalone application to do this). I noticed that most of the times all the submitted requests are not processed by the web service. For ex. if I run the test with 25 simultaneous requests, only 22 get processed. The numbers are not consistent and vary on each run. I also noticed the following errors returned by the web service for some client requests:
| javax.xml.ws.soap.SOAPFaultException: Read timed out
| at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:69)
| at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
| at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
|
The following exception is also seen:
| javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
| at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:317)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:255)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| ........................
|
| Caused by: java.io.IOException: Could not transmit message
| at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:204)
| at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:337)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| ... 11 more
| Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:333)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:183)
| ... 14 more
| Caused by: java.io.IOException: Error writing to server
| at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
| at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
| at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
| at java.net.HttpURLConnection.getResponseCode(Unknown Source)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:280)
| ... 19 more
|
I was just wondering if the web service times out under load. If so, is there some way of increasing the timeout?
Another point worth mentioning here is that the task performed by the web service is time consuming. So could it be the case that some time consuming web service calls cause a timeout?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200002#4200002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200002
17 years, 3 months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: Could not find datasource message in client JPA although
by ezanih
Ok Jaikiran...by coincidence, you wrote a blog about JNDI naming in MyWiki in October 2007 which helped me understand (a bit) about my problem.
Since I was not using an EJB, I was accessing the server directly through JNDI from my standalone client with the java:/OracleXE1_DS. As your blog said, I cannot do this with the java namespace because my standalone client and the JBoss server are running in separate JVMs.
So I've decided to try 2 alternatives :-
(1) To do a stateless EJB3 to access the datasource through the java: namespace. Since the EJB and the datasource are both managed by the JBoss Server, they should be both running in the same JBoss JVM.
Here is my new context iniation code in the client. Instead of looking up the datasource through java namespace, it accesses the EJB3 :-
| Properties p = new Properties();
| p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| p.put("java.naming.provider.url", "jnp://localhost:1099");
| p.put("java.naming.factory.url.pkgs", "org.jboss.naming.client");
|
| InitialContext ctx = new InitialContext(p);
| BiddingTestBeanRemote bidder = (BiddingTestBeanRemote) ctx.lookup("BiddingTestEAR/BiddingTestBean/remote");
| bidder.saveBidder();
|
However, I'm getting a class cast exception as below. Is it because I am using a remote interface when I am running the database, JBoss, the EJB and the client all on only my computer - so I cannot use remote interface?
| - Container jboss.j2ee:ear=BiddingTestEAR.ear,jar=BiddingTestEJB.jar,name=BiddingTestBean,service=EJB3,VMID=413b70d7e6d9776b:-49ef6645:11eaf86b9cb:-7fff is not yet available
| javax.ejb.EJBException: Invalid (i.e. remote) invocation of local interface (null container)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:80)
| at $Proxy0.saveBidder(Unknown Source)
| at BidClient.main(BidClient.java:87)
| Exception in thread "main" java.lang.NullPointerException
| at BidClient.main(BidClient.java:99)
|
(2) One other way is to try to move the datasource out of the java namespace to the Global JNDI namespace in JBoss JNDI view. Do you know a way I can do this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199990#4199990
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199990
17 years, 3 months