dav-git-ide opened a new issue, #8160:
URL: https://github.com/apache/hop/issues/8160

   ### Apache Hop version?
   
   2.19
   
   ### Java version?
   
   25
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   The OData Input transform appears to close the shared Apache HttpClient 
connection pool.
   
   The first OData request works correctly after starting Hop. After using "Get 
Fields" or after executing the OData Input transform, subsequent OData requests 
fail with:
   
   java.lang.IllegalStateException: Connection pool shut down
   
   After this happens, even "Get Entity Sets" no longer works. Fully closing 
and restarting Hop restores functionality, but only until the next OData 
operation.
   
   The issue was reproduced with both:
   
   SAP Cloud for Customer OData V2
   Public Northwind OData service
   It was also reproduced using Microsoft OpenJDK 21 and Microsoft OpenJDK 25.
   
   The runtime stack trace points to:
   org.apache.hop.pipeline.transforms.odata.ODataInput.fetchNextPage()
   
   and then to:
   org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.lease()
   
   Possible cause:
   
   HttpClientManager keeps a static shared PoolingHttpClientConnectionManager 
and builds clients using:
   
   httpClientBuilder.setConnectionManager(manager);
   
   ODataInput later closes its CloseableHttpClient in dispose().
   
   Since the connection manager is not marked as shared, closing one client may 
also shut down the global shared connection manager.
   
   A possible fix could be:
   
   httpClientBuilder.setConnectionManager(manager);
   httpClientBuilder.setConnectionManagerShared(true);
   
   Steps to Reproduce
   
   Start Hop GUI.
   Create or open a pipeline containing an OData Input transform.
   Configure a valid public OData service, for example Northwind.
   Click "Get Entity Sets".
   Confirm that the entity sets are loaded successfully.
   Click "Get Fields" or execute the pipeline.
   Observe the error: "Connection pool shut down".
   Try "Get Entity Sets" again.
   Observe that it now also fails with "Connection pool shut down".
   Fully close Hop and restart it.
   Repeat the test and observe that the first request works again.
   Expected Behavior
   
   OData requests should be repeatable during the same Hop session.
   
   "Get Entity Sets", "Get Fields", and pipeline execution should continue to 
work after previous OData requests have completed.
   
   Closing an individual OData HTTP client should not shut down the shared HTTP 
connection pool used by later requests.
   
   
   ### Issue Priority
   
   Priority: 0
   
   ### Issue Component
   
   Component: Transforms


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to