The error java.lang.OutOfMemoryError cannot be cast to java.lang.Exception usually indicates that the BIRT Web Viewer is running out of memory while processing this specific report. As you mentioned that it’s running fine locally, the issue could be likely with the server’s JVM memory configuration. Also, the amount of data the report processes might have an impact, which resulted in this error.
So, to handle or overcome this, we can try to increase the heap size for the BIRT Web Viewer. You can verify that the report is not loading a much larger dataset on the server. This will help. Checking and identifying any heavy scripts or event handlers in the report can help resolve the issue. It's good practice to review the server log always. Doing this will provide you with a direct vision on where the memory is being consumed a lot and will guide you to take it from there. If you are interested in learning about the types of OutOfMemoryError, you can check out this blog:Types of OutOfMemoryError, Causes, and Solutions.