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

    jasperreports and WildFly integration problem

    masummymesingh

      @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

        • 1. Re: jasperreports and jboss 7 integration problem
          sfcoy

          It looks like you could have different versions of JasperReports built into both your EAR file and a WAR file contained within it.

           

          You really need to show the complete stack trace plus the structure of your application showing what jars you have where.

          1 of 1 people found this helpful
          • 2. Re: jasperreports and jboss 7 integration problem
            masummymesingh

            Hi Stephen ,

             

            I have send my project structure ..and details..............pls review it . I

            • 3. Re: jasperreports and jboss 7 integration problem
              sfcoy

              Do you really need ReportService to be a remote EJB?

               

              If it was me I'd just build everything into a single WAR file, which you can do in JEE6+.

               

              Unfortunately those images don't show us what is actually getting deployed on the server. You have library jars in the root of your EAR file which won't even be visible unless you have correct manifest class path entries in both the ejb and web modules.

              1 of 1 people found this helpful
              • 4. Re: jasperreports and jboss 7 integration problem
                masummymesingh

                Hi Stephen,

                 

                I have need remote EJB because I have need to  use distributed system , I  have serveral module on ejb like : Accounting , Customer Info ,

                Administration module . I want to do deploy  my  app separately each module . So, I have no other way expecting Remote EJB.

                 

                can you tell me my decision (for selecting Remote EJB) is correct or not ?

                any idea for Remote EJB when using Large clustering system on JBoss 8 ?

                 

                I am use JAVA EE 7 (EJB 3.2 on wildfly 8 final)

                 

                 

                My Reporing app is now working nice for Remote or local !!!!!!!!!!!!!!!!!!

                 

                 

                Thanks your very helpful consideration.....

                • 5. Re: jasperreports and jboss 7 integration problem
                  sfcoy

                  Why do you think you need to use a distributed system?

                  • 6. Re: jasperreports and jboss 7 integration problem
                    masummymesingh

                    My App is small size ERP app . it has some module (10): accouning, customer infor , inventory etc.

                    i want to deploy this app indepently .

                     

                    our requirement is : when deploy accounting module no impact other module .

                     

                    but i saw that if i use local ejb , it can not deploy without other dependent module but when use remote ejb

                    it does not any give any work error for compile and deploy time expect run time .

                     

                    so, i am use Remote ejb (distributed system)