HTTPGetValue scheitert mit einem Java Stack Trace wenn der Server nicht verfügbar ist

  • Ich habe ein Modul gebaut, dass eine Umleitung eines Anrufs aufgrund des Ergebnis eines Webservices durchführt. Das Modul funktioniert auch einwandfrei, solange der externe Server verfügbar ist. Wenn aber der externe Server nicht verfügbar ist, würde ich gerne auf ein Standardumleitungsziel umleiten. Leider ist das aber nicht möglich, da das Modul, wenn der Webservices nicht verfügbar ist mit dem folgenden Stacktrace beim HTTPGetValue abstürzt:


    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:478)
    at java.net.Socket.<init>(Socket.java:375)
    at java.net.Socket.<init>(Socket.java:249)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at de.vertico.starface.module.core.runtime.functions.net.HttpGetValue.execute(HttpGetValue.java:85)
    at de.vertico.starface.module.core.runtime.executables.JavaFunctionExec.executeImpl(JavaFunctionExec.java:132)
    at de.vertico.starface.module.core.runtime.executables.BaseExec.execute(BaseExec.java:145)
    at de.vertico.starface.module.core.runtime.LoadedModule.invokeFunction(LoadedModule.java:253)
    at de.vertico.starface.module.core.runtime.LoadedFunction.invoke(LoadedFunction.java:89)
    at de.vertico.starface.module.core.runtime.RuntimeEnvironmentImpl.invokeFunction(RuntimeEnvironmentImpl.java:272)
    at de.vertico.starface.module.core.runtime.executables.FunctionCallExec.executeImpl(FunctionCallExec.java:148)
    at de.vertico.starface.module.core.runtime.executables.BaseExec.execute(BaseExec.java:145)
    at de.vertico.starface.module.core.runtime.executables.ContainerExec.executeImpl(ContainerExec.java:96)
    at de.vertico.starface.module.core.runtime.executables.FunctionExec.executeImpl(FunctionExec.java:71)
    at de.vertico.starface.module.core.runtime.executables.BaseExec.execute(BaseExec.java:145)
    at de.vertico.starface.module.core.runtime.ModuleRuntime.callEntryPoint(ModuleRuntime.java:361)
    at de.vertico.starface.module.core.runtime.ModuleRuntime.callEntryPoint(ModuleRuntime.java:543)
    at de.vertico.starface.module.core.ModuleRegistry.callEntryPoint(ModuleRegistry.java:343)
    at de.starface.bo.callhandling.events.ModuleBusinessObjectEvents$1.run(ModuleBusinessObjectEvents.java:97)
    at java.lang.Thread.run(Thread.java:662)


    Für mich sollte es so sein, dass die HTTPGetValue leer oder einen Fehlercode zurückgeben sollte, wenn der ferne Server nicht erreichbar ist. So ist das nur eingeschränkt verwendbar.


    Ralf M Petter

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!