Hi
I have problems loading resources via the UserCodeClassloader as described in:
https://ci.apache.org/projects/flink/flink-docs-release-1.4/monitoring/debugging_classloading.html#manual-classloading-in-the-job

I have tried in several scenarios to load properties or wsdl files via a 
RichMapFunction. It never worked. Any ideas?

public class EmbargoClient extends RichMapFunction<MessageEnvelope, 
MessageEnvelope> {

    private static final String PAYMENT_CHECK_WSDL_LOCATION = 
"/wsdl/payment_check.wsdl";

...

    private URL readWsldFile() {
        ClassLoader userClassLoader = 
getRuntimeContext().getUserCodeClassLoader();
        URL url = userClassLoader.getResource(PAYMENT_CHECK_WSDL_LOCATION);
        if ( url == null )
            throw new RuntimeException("Could not load wsdl file from " + 
PAYMENT_CHECK_WSDL_LOCATION);
        return url;
    }
...
}

Regards,

Bernd



  ________________________________


Landesbank Hessen-Thueringen Girozentrale
Anstalt des oeffentlichen Rechts
Sitz: Frankfurt am Main / Erfurt
Amtsgericht Frankfurt am Main, HRA 29821 / Amtsgericht Jena, HRA 102181

Bitte nutzen Sie die E-Mail-Verbindung mit uns ausschliesslich zum 
Informationsaustausch. Wir koennen auf diesem Wege keine rechtsgeschaeftlichen 
Erklaerungen (Auftraege etc.) entgegennehmen.

Der Inhalt dieser Nachricht ist vertraulich und nur fuer den angegebenen 
Empfaenger bestimmt. Jede Form der Kenntnisnahme oder Weitergabe durch Dritte 
ist unzulaessig. Sollte diese Nachricht nicht fur Sie bestimmt sein, so bitten 
wir Sie, sich mit uns per E-Mail oder telefonisch in Verbindung zu setzen.

Please use your E-mail connection with us exclusively for the exchange of 
information. We do not accept legally binding declarations (orders, etc.) by 
this means of communication.

The contents of this message is confidential and intended only for the 
recipient indicated. Taking notice of this message or disclosure by third 
parties is not
permitted. In the event that this message is not intended for you, please 
contact us via E-mail or phone.

Reply via email to