Partage
  • Partager sur Facebook
  • Partager sur Twitter

Erreur NullPointerException

Sujet résolu
    27 juillet 2015 à 11:25:46

    Bonjour, 

    Je veux effectuer une impression d'un Ireport, j'ai donc une preview avant l'impression avec JasperViewer, mais dès que je lance cette préview j'ai une erreur avec un JavaNullPointerExeption, il me dit que le chemin de mon Ireport est introuvable alors que c'est bien le bon..

    Je ne comprend pas d'où l'erreur pourrait venir.. 

    Pouvez vous m'aider svp ? 

    Merci

    ps: je ne peux pas vous mettre l'erreur mais voici le code 

    package Contener;
    
    
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.InputStream;
    import java.util.HashMap;
    import net.sf.jasperreports.engine.xml.JRXmlLoader;
    import net.sf.jasperreports.engine.design.JasperDesign;
    import net.sf.jasperreports.engine.JREmptyDataSource;
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.view.JasperViewer;
    import CSV.CSVcheck;
    
    
    public class GeneratePDF {
    	
        
    	public GeneratePDF(){
    		
    	}	
    	
    	public void startPrint () {
    		
    		HashMap<String, Object> params = new HashMap<String, Object>();
    		
            File file = null;
            InputStream is = null;
            
    		try {
    			
    			String path = "src\\main\\resources\\test.jrxml";
            	
    			file = new File(path);
    			is = new FileInputStream(file);
    		}
    		catch(Exception e) {
    			e.printStackTrace();
    		}
    		
    		try
    		{
    			
    			JasperDesign jasperDesign = JRXmlLoader.load(is);
    			JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
    	
    			params.put("Serial", CSVcheck.getSN());
    			params.put("Ethmac",CSVcheck.getEth());
    			params.put("Model",CSVcheck.getModel());
    			params.put("CodeBarre",CSVcheck.getSN());
    		
    			JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, new JREmptyDataSource());
    			JasperViewer.viewReport(jasperPrint);
    
    			JasperViewer jv = new JasperViewer(jasperPrint, true);
    		  
    			jv.setTitle("Impression Etiquette");
    			jv.setVisible(true);
    	   	
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		
    		}
    	}
    }
    	
    • Partager sur Facebook
    • Partager sur Twitter
      27 juillet 2015 à 12:20:46

      Bonjour

      magique06 a écrit:

      ps: je ne peux pas vous mettre l'erreur mais voici le code 

      On pourra difficilement t'aider...
      • Partager sur Facebook
      • Partager sur Twitter
      Angular 2 est l'avenir, jQuery c'est de la merde !!! - Java 8 c'est l'an 2016+ (programmez en 1 ligne)
        27 juillet 2015 à 14:17:37

        Voila j'ai pu les récupérer autant pour moi..

        Les voici : 

        java.io.FileNotFoundException: src\main\resources\test.jrxml (Le chemin d?accès spécifié est introuvable)
                at java.io.FileInputStream.open0(Native Method)
                at java.io.FileInputStream.open(Unknown Source)
                at java.io.FileInputStream.<init>(Unknown Source)
                at Contener.GeneratePDF.startPrint(GeneratePDF.java:36)
                at Menu.Menu.Impression(Menu.java:521)
                at Menu.Menu$11$1.actionPerformed(Menu.java:441)
                at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
                at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
                at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
                at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
                at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
                at java.awt.Component.processMouseEvent(Unknown Source)
                at javax.swing.JComponent.processMouseEvent(Unknown Source)
                at java.awt.Component.processEvent(Unknown Source)
                at java.awt.Container.processEvent(Unknown Source)
                at java.awt.Component.dispatchEventImpl(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Window.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
                at java.awt.EventQueue.access$500(Unknown Source)
                at java.awt.EventQueue$3.run(Unknown Source)
                at java.awt.EventQueue$3.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue$4.run(Unknown Source)
                at java.awt.EventQueue$4.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue.dispatchEvent(Unknown Source)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.run(Unknown Source)
        net.sf.jasperreports.engine.JRException: java.net.MalformedURLException
                at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:306)
                at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:285)
                at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:274)
                at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:248)
                at Contener.GeneratePDF.startPrint(GeneratePDF.java:45)
                at Menu.Menu.Impression(Menu.java:521)
                at Menu.Menu$11$1.actionPerformed(Menu.java:441)
                at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
                at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
                at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
                at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
                at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
                at java.awt.Component.processMouseEvent(Unknown Source)
                at javax.swing.JComponent.processMouseEvent(Unknown Source)
                at java.awt.Component.processEvent(Unknown Source)
                at java.awt.Container.processEvent(Unknown Source)
                at java.awt.Component.dispatchEventImpl(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
                at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
                at java.awt.Container.dispatchEventImpl(Unknown Source)
                at java.awt.Window.dispatchEventImpl(Unknown Source)
                at java.awt.Component.dispatchEvent(Unknown Source)
                at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
                at java.awt.EventQueue.access$500(Unknown Source)
                at java.awt.EventQueue$3.run(Unknown Source)
                at java.awt.EventQueue$3.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue$4.run(Unknown Source)
                at java.awt.EventQueue$4.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                at java.awt.EventQueue.dispatchEvent(Unknown Source)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                at java.awt.EventDispatchThread.run(Unknown Source)
        Caused by: java.net.MalformedURLException
                at java.net.URL.<init>(Unknown Source)
                at java.net.URL.<init>(Unknown Source)
                at java.net.URL.<init>(Unknown Source)
                at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
                at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                at org.apache.commons.digester.Digester.parse(Digester.java:1892)
                at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:298)
                ... 42 more
        Caused by: java.lang.NullPointerException
                ... 54 more
        • Partager sur Facebook
        • Partager sur Twitter
          27 juillet 2015 à 14:24:49

          C'est assez explicite:  src\main\resources\test.jrxml (Le chemin d?accès spécifié est introuvable)

          Ton fichier jasper se trouve dans les dossiers de ton application? Si oui, tu dois plutôt utiliser le resource bundle. http://stackoverflow.com/questions/2593154/get-a-resource-using-getresource

          • Partager sur Facebook
          • Partager sur Twitter
            27 juillet 2015 à 14:34:22

            Oui il se trouve dans mon dossier d'application.

            J'utilise un projet Maven et ca marchait très bien y'a quelque temps, et du jour au lendemain j'ai eu cette erreur la.

            Avant de passer sur le projet Maven, j'avais essayé le ressource bundle mais sa ne fonctionnait pas.. 

            • Partager sur Facebook
            • Partager sur Twitter
              27 juillet 2015 à 19:37:14

              Il faut retenter.

              Crée une simple classe avec un test unitaire dedans. Ce test doit récupérer le fichier via le resource bundle et vérifier qu'il n'est pas nul.

              • Partager sur Facebook
              • Partager sur Twitter
                28 juillet 2015 à 11:49:54

                On est obligé d'utiliser un resource bundle ? 

                Car avant tout fonctionner correctement et du jour au lendemain j'ai l'erreur qui met apparue. 

                • Partager sur Facebook
                • Partager sur Twitter
                  28 juillet 2015 à 12:06:32

                  C'est la solution la plus propre.

                  Essaie ça:

                  is =getClass().getResourceAsStream("test.jrxml");

                  • Partager sur Facebook
                  • Partager sur Twitter
                    28 juillet 2015 à 12:11:37

                    magique06 a écrit:

                    On est obligé d'utiliser un resource bundle ? 

                    Tu vas récupérer un fichier par chemin relatif dans ton projet.
                    Si la structure de ton projet change cela ne fonctionnera plus. Si tu crée un JAR cela ne fonctionne plus.
                    • Partager sur Facebook
                    • Partager sur Twitter
                    Angular 2 est l'avenir, jQuery c'est de la merde !!! - Java 8 c'est l'an 2016+ (programmez en 1 ligne)
                      28 juillet 2015 à 15:22:01

                      max-om-93 Merci ! 

                      Je n'ai plus l'erreur, il trouve bien le fichier .jrxml

                      En revanche j'ai toujours se NullPointerException.

                      Je sais pas si l'erreur est du au faite que j'instancie mal "GeneratePDF" oui la méthode elle même.

                      Voici le code de ma méthode (qui provient d'une autre classe) ou j'instancie cette classe:

                      	public void Impression(){
                      
                      		setVisible(false);
                      		GeneratePDF test = new GeneratePDF();
                      		test.startPrint();
                      		
                      	 }


                        et l'erreur lors de l'exécution de cette méthode: 

                      net.sf.jasperreports.engine.JRException: java.net.MalformedURLException
                              at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:306)
                              at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:285)
                              at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:274)
                              at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:248)
                              at Contener.GeneratePDF.startPrint(GeneratePDF.java:39)
                              at Menu.Menu.Impression(Menu.java:508)
                              at Menu.Menu$11$1.actionPerformed(Menu.java:442)
                              at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
                              at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
                              at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
                              at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
                              at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
                              at java.awt.Component.processMouseEvent(Unknown Source)
                              at javax.swing.JComponent.processMouseEvent(Unknown Source)
                              at java.awt.Component.processEvent(Unknown Source)
                              at java.awt.Container.processEvent(Unknown Source)
                              at java.awt.Component.dispatchEventImpl(Unknown Source)
                              at java.awt.Container.dispatchEventImpl(Unknown Source)
                              at java.awt.Component.dispatchEvent(Unknown Source)
                              at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
                              at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
                              at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
                              at java.awt.Container.dispatchEventImpl(Unknown Source)
                              at java.awt.Window.dispatchEventImpl(Unknown Source)
                              at java.awt.Component.dispatchEvent(Unknown Source)
                              at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
                              at java.awt.EventQueue.access$500(Unknown Source)
                              at java.awt.EventQueue$3.run(Unknown Source)
                              at java.awt.EventQueue$3.run(Unknown Source)
                              at java.security.AccessController.doPrivileged(Native Method)
                              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                              at java.awt.EventQueue$4.run(Unknown Source)
                              at java.awt.EventQueue$4.run(Unknown Source)
                              at java.security.AccessController.doPrivileged(Native Method)
                              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                              at java.awt.EventQueue.dispatchEvent(Unknown Source)
                              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                              at java.awt.EventDispatchThread.run(Unknown Source)
                      Caused by: java.net.MalformedURLException
                              at java.net.URL.<init>(Unknown Source)
                              at java.net.URL.<init>(Unknown Source)
                              at java.net.URL.<init>(Unknown Source)
                              at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
                              at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
                              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                              at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                              at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                              at org.apache.commons.digester.Digester.parse(Digester.java:1892)
                              at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:298)
                              ... 42 more
                      Caused by: java.lang.NullPointerException
                              ... 54 more



                      • Partager sur Facebook
                      • Partager sur Twitter
                        28 juillet 2015 à 15:34:55

                        Je me suis trompé, c'était plutôt ça: is =getClass().getClassLoader().getResourceAsStream("test.jrxml");


                        As-tu vérifié que is n'est pas nul?

                        • Partager sur Facebook
                        • Partager sur Twitter
                          29 juillet 2015 à 11:08:37

                          Alors j'ai changé mon InpuStream par: FileInputStream is avec un chemin absolue de mon .jrxml en paramètre.

                          J'ai vérifié si il était null, il ne l'est pas.

                          Je n'ai plus l'erreur de nullPointer et de path en revanche j'ai une erreur assez bizarre, en cherchant sur le net il existe qu'un seul liens qui parle a peu près de cette erreur mais je ne comprend toujours pas.

                          Si par hasard vous comprenez ou connaissez cette erreur la voici : 

                          net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: org.codeh
                          aus.groovy.control.MultipleCompilationErrorsException: startup failed:
                          calculator_report1_1438159759088_37431: 170: unexpected char: '\' @ line 170, column 25.
                          1 error
                          .
                                  at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:115)
                                  at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:212)
                                  at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:357)
                                  at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:617)
                                  at Contener.GeneratePDF.startPrint(GeneratePDF.java:45)
                                  at Menu.Menu.Impression(Menu.java:508)
                                  at Menu.Menu$11$1.actionPerformed(Menu.java:442)
                                  at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
                                  at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
                                  at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
                                  at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
                                  at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
                                  at java.awt.Component.processMouseEvent(Unknown Source)
                                  at javax.swing.JComponent.processMouseEvent(Unknown Source)
                                  at java.awt.Component.processEvent(Unknown Source)
                                  at java.awt.Container.processEvent(Unknown Source)
                                  at java.awt.Component.dispatchEventImpl(Unknown Source)
                                  at java.awt.Container.dispatchEventImpl(Unknown Source)
                                  at java.awt.Component.dispatchEvent(Unknown Source)
                                  at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
                                  at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
                                  at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
                                  at java.awt.Container.dispatchEventImpl(Unknown Source)
                                  at java.awt.Window.dispatchEventImpl(Unknown Source)
                                  at java.awt.Component.dispatchEvent(Unknown Source)
                                  at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
                                  at java.awt.EventQueue.access$500(Unknown Source)
                                  at java.awt.EventQueue$3.run(Unknown Source)
                                  at java.awt.EventQueue$3.run(Unknown Source)
                                  at java.security.AccessController.doPrivileged(Native Method)
                                  at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                                  at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                                  at java.awt.EventQueue$4.run(Unknown Source)
                                  at java.awt.EventQueue$4.run(Unknown Source)
                                  at java.security.AccessController.doPrivileged(Native Method)
                                  at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
                                  at java.awt.EventQueue.dispatchEvent(Unknown Source)
                                  at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                                  at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                                  at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                                  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                                  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                                  at java.awt.EventDispatchThread.run(Unknown Source)
                          Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
                          calculator_report1_1438159759088_37431: 170: unexpected char: '\' @ line 170, column 25.
                          1 error
                          
                                  at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
                                  at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:150)
                                  at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:120)
                                  at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:132)
                                  at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:360)
                                  at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:140)
                                  at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:111)
                                  at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:237)
                                  at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:167)
                                  at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
                                  at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
                                  at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
                                  at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
                                  at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:111)
                                  ... 42 more

                          -
                          Edité par magique06 29 juillet 2015 à 11:09:07

                          • Partager sur Facebook
                          • Partager sur Twitter
                            29 juillet 2015 à 11:21:12

                            Ton fichier jasper  comporte des erreurs.

                            On n'utilise jamais de .jrxml mais des .jasper (qui correspond au fichier compilé).

                            Du coup, tu ré-ouvres Ireport et tu compile ton rapport pour obtenir un .jasper que tu chargeras dans ton programme.

                            Je suppose que la compilation de ton rapport va planter, à toi de le corriger.

                            • Partager sur Facebook
                            • Partager sur Twitter
                              29 juillet 2015 à 11:32:04

                              J'ai TROUVE !!!! 

                              Dans le jrxml j'ai 3 images, le path de ces 3 images était : C:\User\..\...,

                              il fallait mettre deux antislash.. C:\\User\\..\... 

                              Merci à vous en tout cas ! 

                              • Partager sur Facebook
                              • Partager sur Twitter
                                29 juillet 2015 à 11:54:10

                                Et tu passe par un fichier .jasper maintenant?
                                • Partager sur Facebook
                                • Partager sur Twitter

                                Erreur NullPointerException

                                × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
                                × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
                                • Editeur
                                • Markdown