Unpack the test attached.
Build with ant
run java -jar build/httpserver-bug.jar
The test runs HttpServer and invokes repeatingly the following code:
javax.xml.ws.Service service = Service.create(URL,QNAME);
Hello hello = service.getPort(Hello.class);
***// hello.sayHello();
after a while the test starts throwing exceptions. The exceptions may be different,
but command
ls -1 /proc/[pid of java]/fd | wc -l
will return something near the maxopenfiles value. On my machine it is 1024
Also, if uncomment a line marked with stars, the test runs much longer before
exceptions will appear. Unfortunately in JAXWS tests we do not actually invoke web methods
in most cases.
====== Example of exception ==================
Unable to create StAX reader or writer
at com.sun.xml.ws.streaming.XMLStreamReaderFactory.createFreshXMLStreamReader(XMLStreamReaderFactory.java:105)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:140)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:165)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:62)
at com.sun.xml.ws.wsdl.WSDLContext.<init>(WSDLContext.java:60)
at com.sun.xml.ws.client.ServiceContextBuilder.build(ServiceContextBuilder.java:77)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:113)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:50)
at javax.xml.ws.Service.<init>(Service.java:58)
at javax.xml.ws.Service.create(Service.java:302)
at com.sun.testws.Test.execClient(Test.java:53)
at com.sun.testws.Test.runTest(Test.java:43)
at com.sun.testws.Test.main(Test.java:61)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:688)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:558)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:686)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:558)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:970)
at java.net.URL.openStream(URL.java:1007)
at com.sun.xml.ws.streaming.XMLStreamReaderFactory.createFreshXMLStreamReader(XMLStreamReaderFactory.java:100)