# Exception when error getting host connection

**URL:** <https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138>\
**Category:** Forum\
**Tags:** Mainframe-Integration, ApplinX\
**Created:** [July 15, 2010, 11:35am UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138 "2010-07-15T11:35:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![raymond2](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@raymond2](https://techcommunity.softwareag.com/u/raymond2)\
**Post date:** [July 15, 2010, 11:35am UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/1 "2010-07-15T11:35:34Z")

</div>

Hi,  
Sorry, my English is not very good ☹  
I use a ApplinX generated WebService to go on a BS2000-UTM-Application. If this Application is not reachable (not started) with the Programm soapUI returns a

```auto
<Exception>java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053
...
</Exception>
```

This is perfect!  
But if I try this Test in Java like this:

```auto
            try {
                STOLISServicesStolisServices ws = new STOLISServicesStolisServices(url, new QName("http://tempuri.org/", "STOLIS.Services.StolisServices"));

                StolisServicesPortType stolisServicesPortType = ws.getStolisServicesPort();
                MeldeDaten meldeDaten = stolisServicesPortType.partnerAnmelden(meldungPartnerAnmeldenData);
            } catch (Exception e) {
                throw new BatchTechnicalException("WebServiceCall partnerAnmelden failed! Message: " + e.getMessage());
            }
```

This Exception will returned:

```auto
ERROR AbstractStep - Encountered an error executing the step
org.springframework.batch.retry.ExhaustedRetryException: Retry exhausted after last attempt in recovery path, but exception is not skippable.; nested exception is ch.admin.estv.insieme.schnittstellen.exception.BatchTechnicalException: WebServiceCall partnerAnmelden failed! Message: faultCode argument for createFault was passed NULL
	at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor$5.recover(FaultTolerantChunkProcessor.java:358)
	at org.springframework.batch.retry.support.RetryTemplate.handleRetryExhausted(RetryTemplate.java:405)
	at org.springframework.batch.retry.support.RetryTemplate.doExecute(RetryTemplate.java:274)
	at org.springframework.batch.retry.support.RetryTemplate.execute(RetryTemplate.java:180)
	at org.springframework.batch.core.step.item.BatchRetryTemplate.execute(BatchRetryTemplate.java:213)
	at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor.write(FaultTolerantChunkProcessor.java:371)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:178)
	at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:74)
	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:268)
	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
	at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)
	at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
	at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
	at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:242)
	at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:198)
	at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:348)
	at org.springframework.batch.core.job.flow.FlowJob.access$0(FlowJob.java:1)
	at org.springframework.batch.core.job.flow.FlowJob$JobFlowExecutor.executeStep(FlowJob.java:135)
	at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)
	at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:103)
	at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:250)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:110)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:105)
	at ch.admin.estv.insieme.schnittstellen.batch.T2StolisImportBatchJobTest.testT2StolisImport(T2StolisImportBatchJobTest.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: ch.admin.estv.insieme.schnittstellen.exception.BatchTechnicalException: WebServiceCall partnerAnmelden failed! Message: faultCode argument for createFault was passed NULL
	at ch.admin.estv.insieme.schnittstellen.batch.stolis.StolisAdresseErfassenItemWriter.write(StolisAdresseErfassenItemWriter.java:69)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.writeItems(SimpleChunkProcessor.java:156)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.doWrite(SimpleChunkProcessor.java:137)
	at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor$3.doWithRetry(FaultTolerantChunkProcessor.java:284)
	at org.springframework.batch.retry.support.RetryTemplate.doExecute(RetryTemplate.java:231)
	... 52 more
```

How I can get the same Exception in Java like soapUI it gets (error getting host connection)?  
I hope you understand my Problem. Else, my mother tongue is german 😉

Thx for helping.  
Raymond.

PS: I am Junior-Java-Programmer :oops:

---

<div class="post-metadata">

**Author:** ![Tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tanya](https://techcommunity.softwareag.com/u/Tanya)\
**Post date:** [July 15, 2010, 2:03pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/2 "2010-07-15T14:03:33Z")

</div>

Raymond,

afraid the problem is not Applinx but the framework you are using. One wraps the problem in one message, the other in another.

---

<div class="post-metadata">

**Author:** ![raymond2](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@raymond2](https://techcommunity.softwareag.com/u/raymond2)\
**Post date:** [July 21, 2010, 4:11pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/3 "2010-07-21T16:11:45Z")

</div>

Hi Tanya,  
I spoke with my Senior Engeneer. He means, that the SOAP-Response is not complete and the faultstring and the Reason are missing!  
He answered:

> [@](#):
>
> Die SOAP Answer you got contains only the Element inside the Elements. The SOAP Spezifikation is unmistakable and defined that depending on the SOAP Version (1.1 oder 1.2) minimum following Elemement must incuding. Spring Web Service use exclusive the Reason resp. faultstring (1.1) Element for the exception message.
> 
> Look at the SOAP 1.1 Spezification:
> 
> The SOAP Fault element is used to carry error and/or status information within a SOAP message. If present, the SOAP Fault element MUST appear as a body entry and MUST NOT appear more than once within a Body element.
> 
> The SOAP Fault element defines the following four subelements:
> 
> faultcode  
> The faultcode element is intended for use by software to provide an algorithmic mechanism for identifying the fault. The faultcode MUST be present in a SOAP Fault element and the faultcode value MUST be a qualified name as defined in [8], section 3. SOAP defines a small set of SOAP fault codes covering basic SOAP faults (see section 4.4.1)  
> faultstring  
> The faultstring element is intended to provide a human readable explanation of the fault and is not intended for algorithmic processing. The faultstring element is similar to the ‘Reason-Phrase’ defined by HTTP (see [5], section 6.1). It MUST be present in a SOAP Fault element and SHOULD provide at least some information explaining the nature of the fault.
> 
> The SOAP 1.2 Spezification says almost the same:
> 
> The Fault element information item has:  
> A [local name] of Fault .
> 
> Two or more child element information items in its [children] property in order as follows:  
> A mandatory Code element information item (see 5.4.1 SOAP Code Element).  
> A mandatory Reason element information item (see 5.4.2 SOAP Reason Element).  
> An optional Detail element information item (see 5.4.5 SOAP Detail Element).

Look also: [SOAP Version 1.2 Part 1: Messaging Framework (Second Edition)](http://www.w3.org/TR/soap12-part1/#soapfault)

Is this a Bug? Or why I dont become the faultcode and the faultreason elements??? It’s very importent for us.

This is the whole response:

```auto
<SOAP>
   <SOAP>
      <SOAP>
         <detail>
            <Exception>java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.createNewUser(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.getServiceSessionUser(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.startPathContext(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.createRuntimeContext(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXFlowWrapperProcedure.executeFlow(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXFlowWrapperProcedure.execute(Unknown Source)
	at com.sabratec.applinx.server.runtime.webservices.GXWSServerLogic.execute(Unknown Source)
	at com.sabratec.applinx.server.runtime.webservices.GXApplinXLocalAdapter.execute(Unknown Source)
	at com.softwareag.applinx.wsstack.GXApplinXLocalMessageReceiver.invokeBusinessLogic(Unknown Source)
	at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
	at com.softwareag.wsstack.deployment.server.SAGAdminServlet.doPost(SAGAdminServlet.java:37)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
	at java.lang.Thread.run(Thread.java:619)</Exception>
         </detail>
         <SOAP>
      </SOAP>
   </SOAP>
</SOAP>
```

---

<div class="post-metadata">

**Author:** ![Tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tanya](https://techcommunity.softwareag.com/u/Tanya)\
**Post date:** [July 21, 2010, 5:38pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/4 "2010-07-21T17:38:46Z")

</div>

Raymond,

am a bit confused:

in your first message you present a problem of an undeployed web service (the not yet existing url) - when trying to run that web service you received 2 different messages from 2 different frameworks. That happened BEFORE the ApplinX is involved, the message is from the framework, we have no control over it.

in your second message the error is a not existing path. What could cause that problem is, for example, creating a procedure group with a certain path, using it in the WS, after which changing the procedure group (say, deleting that path) and still attempting to use it.

Did I understand the problems correctly or is it something else?

---

<div class="post-metadata">

**Author:** ![raymond2](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@raymond2](https://techcommunity.softwareag.com/u/raymond2)\
**Post date:** [July 21, 2010, 6:40pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/5 "2010-07-21T18:40:58Z")

</div>

No,

the main problem is: We are receving not Correct SOAP Fault. We just receive Fault with details. This is the reason why SpringFramework throws exception without Fault Reason and Failt Code.

If ApplinX WS would response with SOAP Fault with Code and Reason Elements the problem will be solved. In Applinx Fault message we receive just a detail element, not more.  
[http://www.w3.org/TR/soap12-part1/#soapfault](http://www.w3.org/TR/soap12-part1/#soapfault)

> [@http://www.w3.org/TR/soap12-part1/#soapfault](#):
>
> A SOAP fault is used to carry error information within a SOAP message.
> 
> The Fault element information item has:
> 
> A [local name] of Fault .
> 
> A [namespace name] of “[http://www.w3.org/2003/05/soap-envelope](http://www.w3.org/2003/05/soap-envelope)”.
> 
> Two or more child element information items in its [children] property in order as follows:
> 
> A mandatory Code element information item (see 5.4.1 SOAP Code Element).
> 
> A mandatory Reason element information item (see 5.4.2 SOAP Reason Element).
> 
> An optional Node element information item (see 5.4.3 SOAP Node Element).
> 
> An optional Role element information item (see 5.4.4 SOAP Role Element).
> 
> An optional Detail element information item (see 5.4.5 SOAP Detail Element).
> 
> To be recognized as carrying SOAP error information, a SOAP message MUST contain a single SOAP Fault element information item as the only child element information item of the SOAP Body .
> 
> When generating a fault, SOAP senders MUST NOT include additional element information items in the SOAP Body . A message whose Body contains a Fault plus additional element information items has no SOAP-defined semantics.
> 
> A SOAP Fault element information item MAY appear within a SOAP header block, or as a descendant of a child element information item of the SOAP Body ; in such cases, the element has no SOAP-defined semantics.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tanya](https://techcommunity.softwareag.com/u/Tanya)\
**Post date:** [July 21, 2010, 6:54pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/6 "2010-07-21T18:54:44Z")

</div>

Raymond,

which ApplinX version is it exactly?

---

<div class="post-metadata">

**Author:** ![raymond2](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@raymond2](https://techcommunity.softwareag.com/u/raymond2)\
**Post date:** [July 21, 2010, 8:22pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/7 "2010-07-21T20:22:19Z")

</div>

> [@Tanya](#):
>
> Raymond,
> 
> which ApplinX version is it exactly?

Do you meen this:  
applinx-wsstack.jar (Software AG.) ApplinX WS-Stack client 8.1.1.0001.0158 November 25 2009 ???

---

<div class="post-metadata">

**Author:** ![Tanya](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tanya](https://techcommunity.softwareag.com/u/Tanya)\
**Post date:** [July 26, 2010, 7:42pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/8 "2010-07-26T19:42:41Z")

</div>

Raymond,

we seem to be talking about different things.

Please run that by me again:

in your first post you gave an example of using 2 different frameworks with 2 different problems and asked why the results are different.

in your 2nd post you gave a wrong SOAP resonse that indicates a completely different problem.

Which of those 2 posts are the problem?

---

<div class="post-metadata">

**Author:** ![raymond2](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@raymond2](https://techcommunity.softwareag.com/u/raymond2)\
**Post date:** [July 28, 2010, 7:33pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/9 "2010-07-28T19:33:54Z")

</div>

Hi Tanya,  
The problem is simple, the SOAP-Response we get from the web service is not complete, the faultstring and the Reason elements are missing.

This is what we get when an error occurs:

 java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053 

According to [SOAP Version 1.2 Part 1: Messaging Framework (Second Edition)](http://www.w3.org/TR/soap12-part1/#soapfault) (the Code element and the Reason element are mandatory) the response we should get looks like follows:

 [color="red"]`
		[/color]example content[color="red"]
[/color]example content[color="red"]
	 ` [/color]example content[color="red"] [/color] java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053 

In the response we get from the web service the mandatory tags (marked in red) are always missing, this is the only problem we have. I hope you understand my problem now.

Regards

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:58pm UTC](https://techcommunity.softwareag.com/t/exception-when-error-getting-host-connection/94138/10 "2021-04-02T14:58:46Z")

</div>


