#2 Patch XINS2.1 to improve class loading



I've been having a fair few issues with class loading and getting my XINS project up and running under anything but the integrated Jetty. Specifically, I am getting this message as the EngineStarter class's loadApiClass method.

Anthony has offered me help on this issue, but to no avail.

This error occurs for me both under my app server and under the Eclipse Jetty plugin:

3207 FATAL XINS/Java Server Framework cannot be bootstrapped. Invalid application package. The build property "org.xins.api.class", which defines the name of the API class, is set to "org.test.data.api.APIImpl", but that class cannot be loaded.

These issues have been fixed in my patch by updating the use of class.forName() to the 3 argument version which takes into the account the current thread's context class loader. The single argument call used in XINS at the moment is antiquated and problematic under anything but simple Java environments such as XINS own included Jetty test environment.

I urge you to read this article on the java classloader for more information.



Stephen Gardiner


  • Anthony Goubard

    Anthony Goubard - 2007-12-17
    • assigned_to: nobody --> agoubard
  • Anthony Goubard

    Anthony Goubard - 2007-12-17
    • status: open --> closed-fixed
  • Anthony Goubard

    Anthony Goubard - 2007-12-17

    Logged In: YES
    Originator: NO

    Patched applied.
    Note that the implementation differs a bit as getContextClassLoader is a Java SE 5 method.
    Will be in XINS 2.2-alpha1.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks