eclipse-ee4j / metro-jax-ws

metro-jax-ws
https://eclipse-ee4j.github.io/metro-jax-ws/
BSD 3-Clause "New" or "Revised" License
68 stars 40 forks source link

java.nio.BufferOverflowException While sending SOAP request using metro-jax-ws in helidon #676

Open imrahul2 opened 7 months ago

imrahul2 commented 7 months ago

we are trying to send SOAP requests using metro-jax-ws, But we are getting an error:

Exception in thread "helidon-server-3" java.nio.BufferOverflowException
        at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:231)
        at io.helidon.common.reactive.MultiFromOutputStream.publish(MultiFromOutputStream.java:160)
        at io.helidon.common.reactive.MultiFromOutputStream.write(MultiFromOutputStream.java:113)
        at com.sun.xml.ws.util.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:133)
        at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:597)
        at com.sun.xml.ws.transport.http.HttpAdapter$3.onCompletion(HttpAdapter.java:702)
        at com.sun.xml.ws.server.WSEndpointImpl$1.onCompletion(WSEndpointImpl.java:335)
        at com.sun.xml.ws.api.pipe.Fiber.completionCheck(Fiber.java:897)
        at com.sun.xml.ws.api.pipe.Fiber.run(Fiber.java:792)
        at com.sun.xml.ws.api.pipe.Fiber.start(Fiber.java:393)
        at com.sun.xml.ws.server.WSEndpointImpl.processAsync(WSEndpointImpl.java:347)
        at com.sun.xml.ws.server.WSEndpointImpl.process(WSEndpointImpl.java:377)
        at com.sun.xml.ws.metro.api.config.management.ManagedEndpoint.process(ManagedEndpoint.java:201)
        at com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:697)
        at com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:661)
        at org.eclipse.metro.helidon.HelidonAdapter.handle(HelidonAdapter.java:74)
        at org.eclipse.metro.helidon.MetroSupport$MetroHandler.lambda$doAccept$2(MetroSupport.java:323)
        at io.helidon.common.context.Contexts.runInContext(Contexts.java:117)
        at io.helidon.common.context.ContextAwareExecutorImpl.lambda$wrap$7(ContextAwareExecutorImpl.java:154)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)

While sending response back to our client. we tried experimenting with different metro.dump configurations but metro.dump=all and metro.dump=service give us the above error whereas metro.dump=none and metro.dump=client do not send the required response. How to solve this?