Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java validation shouldn't throw Exception if no connection to tx.fhir.org #85

Closed
patrick-werner opened this issue Sep 23, 2019 · 1 comment
Labels
enhancement New feature or request validation-cli FHIR java validation CLI

Comments

@patrick-werner
Copy link
Member

Issue: the validation-cli throws an exception if the network is down and tx.fhir.org not connectable.

Expected behaviour: Meaningful error message including the -tx n/a option

Exception in thread "main" org.hl7.fhir.dstu3.utils.client.EFhirClientException: Error sending Http Request: Software caused connection abort (connect failed)
	at org.hl7.fhir.dstu3.utils.client.ClientUtils.sendRequest(ClientUtils.java:331)
	at org.hl7.fhir.dstu3.utils.client.ClientUtils.issueResourceRequest(ClientUtils.java:250)
	at org.hl7.fhir.dstu3.utils.client.ClientUtils.issueResourceRequest(ClientUtils.java:234)
	at org.hl7.fhir.dstu3.utils.client.ClientUtils.issueResourceRequest(ClientUtils.java:225)
	at org.hl7.fhir.dstu3.utils.client.ClientUtils.issueGetResourceRequest(ClientUtils.java:161)
	at org.hl7.fhir.dstu3.utils.client.FHIRToolingClient.getCapabilitiesStatementQuick(FHIRToolingClient.java:198)
	at org.hl7.fhir.convertors.TerminologyClientR3.getCapabilitiesStatementQuick(TerminologyClientR3.java:88)
	at org.hl7.fhir.r5.context.SimpleWorkerContext.connectToTSServer(SimpleWorkerContext.java:225)
	at org.hl7.fhir.r5.validation.ValidationEngine.connectToTSServer(ValidationEngine.java:749)
	at org.hl7.fhir.r5.validation.ValidationEngine.setTerminologyServer(ValidationEngine.java:357)
	at org.hl7.fhir.r5.validation.ValidationEngine.<init>(ValidationEngine.java:386)
	at org.hl7.fhir.r5.validation.Validator.main(Validator.java:474)
Caused by: java.net.ConnectException: Software caused connection abort (connect failed)
	at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
	at java.base/java.net.Socket.connect(Socket.java:591)
	at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
	at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)
	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
	at org.hl7.fhir.dstu3.utils.client.ClientUtils.sendRequest(ClientUtils.java:329)
	... 11 more
@patrick-werner patrick-werner added validation-cli FHIR java validation CLI enhancement New feature or request labels Sep 23, 2019
@grahamegrieve
Copy link
Collaborator

fixed as of 0.9.84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request validation-cli FHIR java validation CLI
Projects
None yet
Development

No branches or pull requests

2 participants