Ireport não roda pelo .jar

Pessoal fiz uma busca e vi que muitos tiveram esse problema, mas não encontrei a solucção, se alguém puder me ajudar, obrigado.

Fiz um relatório pelo iReport, quando eu executo-o no NetBeans 7.1, roda perfeitamente, porém quando eu construo o programa (gero o .JAR), ele não chama o relatório, eu clico no botão Gerar Relatório e não acontece nada.

tentei usando o caminho absoluto, pois achei que não estaria localizando o .jrxml mas o mesmo encontra-se no local indicado.

       // String path = currentDir+"/Carta.jrxml"; //tentei assim tbm
        String path = currentDir+"/Carta.jasper";
        Impressao imp = new Impressao();
        try {
            imp.ImprimeModal("Boletos", path, dados, brasao, cabecalho, texto, pag2);
        } catch (JRException ex) {
            JOptionPane.showMessageDialog(null, "Erro: " + ex.getMessage(), "Aviso", JOptionPane.ERROR_MESSAGE);
        }
public void ImprimeModal(String titulo, String path, List lista, String brasao,String cabecalho,String soTexto, String pag2  ) throws JRException {
        
        try {                          
        JasperReport report = JasperCompileManager.compileReport(path);
        Map parametros = new HashMap();
        parametros.put("brasao", brasao);        
        parametros.put("cabecalho", cabecalho);
        parametros.put("sotexto", soTexto);
        parametros.put("pag2", pag2);
        
        JasperPrint print = JasperFillManager.fillReport(report, parametros, new JRBeanCollectionDataSource(lista));
        JasperViewer JViewer = new JasperViewer(print);

        

        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();

        JDialog form = new JDialog(new javax.swing.JFrame(), "Visualização do Relatório", true);        
        form.getContentPane().add(JViewer.getContentPane());
        form.setSize(screenSize.width, screenSize.height);
        form.setVisible(true);
        } catch (JRException | HeadlessException e) {
            JOptionPane.showMessageDialog(null, "Erro ao abrir o relatório."+e.getMessage(),"Erro",JOptionPane.ERROR_MESSAGE);
        }
        
    }

O seu .jar tem o arquivo Carta.jasper?

obrigado por responder, como posso verificar isso?
o o carta.jrxml está no mesmo diretorio da aplicacao.jar.

O .jar eh um arquivo compactado, agente consegue abri-lo com o winzip, 7zip etc
vc pode rodar o seu .jar pelo console e ver a exception que estoura para ficar mais facil.

oi, te adicionei no msn, mas eu verifiquei o arquivo, de inicio estava dentro do jar, mas testei tirando-os da pasta src e reconstruindo o jar, mesmo assim nao roda.

[code]log4j:WARN No appenders could be found for logger (net.sf.jasperreports.engine.xml.JRXmlDigesterFactory).
log4j:WARN Please initialize the log4j system properly.
Exception in thread “AWT-EventQueue-0” java.lang.NoClassDefFoundError: org/springframework/core/io/Resource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:157)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115)
at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:53)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:236)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:213)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:163)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:133)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:105)
at net.sf.jasperreports.engine.component.ComponentsEnvironment.findComponentBundles(ComponentsEnvironment.java:89)
at net.sf.jasperreports.engine.component.ComponentsEnvironment.getCachedComponentBundles(ComponentsEnvironment.java:78)
at net.sf.jasperreports.engine.component.ComponentsEnvironment.getComponentBundles(ComponentsEnvironment.java:66)
at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.getSchemaLocations(JRReportSaxParserFactory.java:76)
at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.configureParser(BaseSaxParserFactory.java:131)
at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.createParser(BaseSaxParserFactory.java:94)
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1342)
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1318)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:207)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:172)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:156)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:143)
at cartacobrancaiptu.Impressao.ImprimeModal(Impressao.java:27)
at cartacobrancaiptu.FrmPrincipal.jButton1ActionPerformed(FrmPrincipal.java:197)
at cartacobrancaiptu.FrmPrincipal.access$000(FrmPrincipal.java:22)
at cartacobrancaiptu.FrmPrincipal$1.actionPerformed(FrmPrincipal.java:53)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2713)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
    at java.awt.EventQueue.access$000(EventQueue.java:101)
    at java.awt.EventQueue$3.run(EventQueue.java:666)
    at java.awt.EventQueue$3.run(EventQueue.java:664)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:680)
    at java.awt.EventQueue$4.run(EventQueue.java:678)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1072)
    at java.awt.Component.show(Component.java:1651)
    at java.awt.Component.setVisible(Component.java:1603)
    at java.awt.Window.setVisible(Window.java:1013)
    at java.awt.Dialog.setVisible(Dialog.java:1003)
    at cartacobrancaiptu.FrmPrincipal$3.run(FrmPrincipal.java:255)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
    at java.awt.EventQueue.access$000(EventQueue.java:101)
    at java.awt.EventQueue$3.run(EventQueue.java:666)
    at java.awt.EventQueue$3.run(EventQueue.java:664)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)Caused by: java.lang.ClassNotFoundException: org.springframework.core.io.Resource
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 83 more[/code]

Depois de um dia de pesquisa, baixei o projeto jasper e adicionei a pasta lib em meu projeto, como algumas pessoas fizeram.
e rodou.