java.io.StreamCorruptedException:invalid stream header: EFBFBDEF exception.
It turns out this happens because I had the resources filtering enabled in my project and Maven filtered the jasper file, producing in the target folder a file that was different than what I had in my resource folder. Hence, the stream corrupted exception. The solution to solve this is to configure the maven resources plug-in to exclude the .jasper file from filtering like this:<nonFilteredFileExtensions>
<nonFilteredFileExtension>jasper</nonFilteredFileExtension> </nonFilteredFileExtensions>