6 Replies Latest reply on Feb 14, 2014 2:00 AM by Gulam Samdani

    jasperreports and WildFly integration problem

    Gulam Samdani Expert

      @Stateless

      public class ReportService implements ReportServiceRemote {

       

          @Resource(lookup = "java:/component")

          private DataSource dataSource;

       

         

       

          public JasperPrint getJasperPrint(JasperReport report) throws Exception {

              JasperPrint print = null;

                         

              try {

             

                  System.out.println("con test : "+dataSource.getConnection().isClosed());

           // jasperPrint= JasperFillManager.fillReport(jasperReport, null,con);

                  print = JasperFillManager.fillReport(report, null,dataSource.getConnection());

                  System.out.println("ednd ..............");

             

             

              } catch (Exception ex) {

                  System.out.println("excpeiotn"+ex.getMessage());

                  ex.printStackTrace();

              }

              return print;

          }

       

       

       

      Error :

      21:40:50,483 ERROR [io.undertow.request] (default task-4) Servlet request failed HttpServerExchange

      { GET /reportdemo/EAPReport}: java.lang.LinkageError:

      loader constraint violation:

      Lnet/sf/jasperreports/engine/JasperReport;)Lnet/sf/jasperreports/engine/JasperPrint;" the class loader

      (instance of org/jboss/modules/ModuleClassLoader) of the current class, EAPReport/EAPReport, and the class loader

      (instance of org/jboss/modules/ModuleClassLoader) for resolved class, com/bus/ReportServiceRemote,

      have different Class objects for the type ote.getJasperPrint(Lnet/sf/jasperreports/engine/JasperReport; )Lnet/sf/jasperreports/engine/JasperPrint; used in the signature


      any one pls help me