I have a EJB3-archive. It contains jrxml-file. Usually I perform the following actions to compile a jasper report
File file = new File("report.jrxml"); FileInputStream reportStream = new FileInputStream(file); JasperDesign jasperDesign = JRXmlLoader.load (reportStream); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
You cannot simply construct a File from a given pathnam ein order to load a file which is packaged within a jar file.
Take a look at this page on accessing resources:
You should try:
URL url = Classloader.getResource( "report.jrxml" );