Search code examples
jakarta-eebirt

Birt library File not found error woth relative path


I am trying to edit a report using Birt with classes as data sources.

The report was edited perfectly fine until I tried to export the elements to a library. I now have a "fiel not found" error occuring when the application tries to access the .rptlibrary file. The only way to have it working is to set the .rptlibrary path as an absolute path in the .rptdesign file, which I absolutely need to avoid since this is supposed to be moved onto a server later.

I have tried to change the ressource path from Window>Preference>Report design and also to use setResourcePath on the EngineConfig object (with both an absolute and a relative path), but I still get the same error, and none of the solutions I found have corrected this problem.

I would be very thankful if someone has an idea, this is going on my nerves since two days. Thank you.


Solution

  • A colleague found the answer during the week-end. Actually, all my settings were correct for a local use (previews and so on), but we forgot to add the BIRT_RESOURCE_PATH in the web.xml.

    <context-param>
        <param-name>BIRT_RESOURCE_PATH</param-name>
        <param-value>classpath:wherever your libraries are; it seems that it must be consistent with what is declared in windows ->Preferences -> Report design -> resources -> Folder</param-value>
    </context-param>
    

    Thank you anyway for answering.