none
[E2010] [EWS Java API 1.1][JAVA] - Strings.properties not available as it is loaded using system classloader. RRS feed

  • Question

  • Hi,

    For getting the exception messages EWS is using Strings.properties file. This file is present in the EWSAPI1.1.jar file. It is loaded in the class "microsoft.exchange.webservices.data.Strings" as follows.

    URL url = ClassLoader.getSystemResource("microsoft/exchange/webservices/data/Strings.properties");
    if (url != null)
        BUNDLE.load(url.openStream());
    

    Our application could be deployed in any J2EE container. So the EWSAPI1.1jar does not come in the System classpath. It will be in the web application classpath. So the Strings.properties file is not getting loaded in our environment.

    So instead of using System classloader, is it possible to use the current classloader to load the properties file?


    Regards,
    Paul

     

     

    Monday, March 7, 2011 12:09 PM

All replies

  • You are not alone - I see the same issue...

    Regards,

    Anton.

    Thursday, March 31, 2011 9:01 PM
  • Hi PaulNibin and khitrenovich, I wanted to let you know that we have an updated version (1.1.2) available with a change to address your issue "Strings.properties not available as it is loaded using system classloader".Please let us know if you have any questions or problems using the updated version.  Thank you for using EWS Java API and for your feedback!

    Monday, May 23, 2011 2:27 PM
  • Hi Anand,

    The updated version does not solve the problem.

    The new logic now is: try to load Strings file from current directory, and fallback to system classloader if the file is not found. In J2EE world the file system of the web server is "out of scope" for the deployed application (and in some cases this call may cause uncatched security exception and application crash). This way we are back to the system classloader - which will not work as Paul explained above.

    Regards,

        Anton.

    Monday, May 23, 2011 5:46 PM
  • Hi PaulNibin and khitrenovich, I wanted to let you know that we have an updated version (1.1.3) available with a change to address this issue : "Strings.properties not available as it is loaded using system classloader".Please let us know if you have any questions or problems using the updated version.  Thank you for using EWS Java API and for your feedback!
    Friday, June 17, 2011 10:40 AM
  • Hi AnandMSFT, Could you please provide the link to download 1.1.3 version, I couldn't find the link to download that version. Thank you.
    Friday, February 22, 2013 12:17 PM