Jump to content
  • JRCompiler fails to find alternate compiler if primary isn't on classpath

    Assigned User teodord
    CategoryBug report
    When you are compiling a format, JRCompiler.getJavaCompiler() tries to first load org.eclipse.jdt.internal.compiler.Compiler by calling JRClassLoader.loadClassForName(String). If the class isn't on the classpath a java.lang.NoClassDefFoundError is thrown. Since this class doesn't inherit from java.lang.Exception, it is missed by the try/catch block it's in, preventing it from trying to locate an alternate compiler. The try/catch blocks in this method should be changed to catch java.lang.Throwable instead so this exception is caught.

    User Feedback

    Recommended Comments




    I think you should send us the stack trace, because those methods are expected to throw ClassNotFoundException and not NoClassDefFoundError.

    I suspect there is something wrong with the third party libraries found in your classpath (are they incomplete?).

    Anyway, it is the first time we hear of this problem and the code was not touched for years.


    Telling us the exact versions you are using would also help.


    Thank you,




    Link to comment
    Share on other sites




    If you have experienced troubles posting comments to this tracker, please try again and reopen the bug.


    I\'m closing it for now.


    Thank you,



    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...