Foros del Web » Programación para mayores de 30 ;) » Java »

Jasper Reports y .jar

Estas en el tema de Jasper Reports y .jar en el foro de Java en Foros del Web. Holaa! Hice una aplicación en java y utilizo jasper reports. Mi aplicación se conecta a una BD para ello utilizo JDBC además lee .gif del ...
  #1 (permalink)  
Antiguo 04/12/2006, 12:03
 
Fecha de Ingreso: octubre-2006
Mensajes: 8
Antigüedad: 17 años, 6 meses
Puntos: 0
Jasper Reports y .jar

Holaa!
Hice una aplicación en java y utilizo jasper reports. Mi aplicación se conecta a una BD para ello utilizo JDBC además lee .gif del Disco Duro para las imágenes de la ventana principal y muestra reportes.

Necesito que la aplicación se ejecute en diversas máquinas, que estan en red. EL inconveniente q tengo es que Generé un .JAR y y me corre super bien en algunas máquinas, peeeero en otras Sale un error al momento de generar los reportes y buenooo no se que podrá ser.. que tanto hay q configurar...

Este es el error que me sale:

C:\Documents and Settings\Administrador\Escritorio\Verinom_Ultimo\d ist>java -jar veri.jar
java.io.IOException: CreateProcess: javac -classpath veri.jar "C:\Documents and
Settings\Administrador\Escritorio\Verinom_Ultimo\d ist\verRptErrores_116471621751
5_714424.java" error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler .compileClasses(JRJ
avacCompiler.java:62)
at net.sf.jasperreports.engine.design.JRAbstractClass Compiler.compileUni
ts(JRAbstractClassCompiler.java:67)
at net.sf.jasperreports.engine.design.JRAbstractCompi ler.compileReport(J
RAbstractCompiler.java:190)
at net.sf.jasperreports.engine.design.JRDefaultCompil er.compileReport(JR
DefaultCompiler.java:104)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReport(Jasper
CompileManager.java:211)
at Verinom.MMostrar_Errores(Verinom.java:789)
at Verinom.actionPerformed(Verinom.java:342)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown 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.mouseRe leased(Unknown Sour
ce)
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(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn 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.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

NESTED BY :
java.io.IOException: CreateProcess: javac -classpath veri.jar "C:\Documents and
Settings\Administrador\Escritorio\Verinom_Ultimo\d ist\verRptErrores_116471621751
5_714424.java" error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler .compileClasses(JRJ
avacCompiler.java:62)
at net.sf.jasperreports.engine.design.JRAbstractClass Compiler.compileUni
ts(JRAbstractClassCompiler.java:67)
at net.sf.jasperreports.engine.design.JRAbstractCompi ler.compileReport(J
RAbstractCompiler.java:190)
at net.sf.jasperreports.engine.design.JRDefaultCompil er.compileReport(JR
DefaultCompiler.java:104)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReport(Jasper
CompileManager.java:211)
at Verinom.MMostrar_Errores(Verinom.java:789)
at Verinom.actionPerformed(Verinom.java:342)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown 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.mouseRe leased(Unknown Sour
ce)
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(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn 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.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

NESTED BY :
net.sf.jasperreports.engine.JRException: Error compiling report java source file
s : C:\Documents and Settings\Administrador\Escritorio\Verinom_Ultimo\d ist\verRp
tErrores_1164716217515_714424.java
at net.sf.jasperreports.engine.design.JRJavacCompiler .compileClasses(JRJ
avacCompiler.java:93)
at net.sf.jasperreports.engine.design.JRAbstractClass Compiler.compileUni
ts(JRAbstractClassCompiler.java:67)
at net.sf.jasperreports.engine.design.JRAbstractCompi ler.compileReport(J
RAbstractCompiler.java:190)
at net.sf.jasperreports.engine.design.JRDefaultCompil er.compileReport(JR
DefaultCompiler.java:104)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReport(Jasper
CompileManager.java:211)
at Verinom.MMostrar_Errores(Verinom.java:789)
at Verinom.actionPerformed(Verinom.java:342)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown 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.mouseRe leased(Unknown Sour
ce)
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(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn 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.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarch y(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.io.IOException: CreateProcess: javac -classpath veri.jar "C:\Doc
uments and Settings\Administrador\Escritorio\Verinom_Ultimo\d ist\verRptErrores_1
164716217515_714424.java" error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler .compileClasses(JRJ
avacCompiler.java:62)
... 30 more


NO ENTIENDO POR QUé EN UNAS MáQUINAS SE EJECUTA PERFECTAMENTE Y EN OTRAS REVIENTA ESE ERROR? LA VARIABLE DE ENTORNO CLASSPATH TIENE LOS VALORES IDENTICOS COMO ESTAN EN LAS MAQUINAS QUE Sí FUNCIONA.
  #2 (permalink)  
Antiguo 04/12/2006, 18:00
 
Fecha de Ingreso: octubre-2003
Mensajes: 3.578
Antigüedad: 20 años, 6 meses
Puntos: 51
Le esta dando un problema al compilar la clase que te hace el report, pero no te dice cual. Habria que averiguar cual es ese error, intentando que genere mas logs etc.

El error de tipo 2 parece ser que es "fichero no encontrado", asi que prueba a ejecutar el comando a pelo javac -classpath veri.jar "C:\Documents and
Settings\Administrador\Escritorio\Verinom_Ultimo\d ist\verRptErrores_116471621751
5_714424.java"

y comprueba si realmente existe ese fichero .java en el directorio que te dan. El espacio entre "d" y "ist" en "\d ist\" es muy sospechoso, aunque podria ser cosa del copy/paste.
  #3 (permalink)  
Antiguo 03/03/2007, 22:14
 
Fecha de Ingreso: marzo-2007
Mensajes: 1
Antigüedad: 17 años, 1 mes
Puntos: 0
Re: Jasper Reports y .jar

A mi me pasaba exactamente igual... en un pc no se quejaba y en otro si.

La diferencia... la ruta al jdk de java, en la que me petaba habia espacios (Documents and Settings/...)

La solución... mover la carpeta del jdk a otra en la que no haya espacios en su ruta : C:\java\jdk\ y actualizar las variables de entorno para que apunten a esta nueva ruta.

Un saludo.
  #4 (permalink)  
Antiguo 04/03/2007, 05:19
 
Fecha de Ingreso: octubre-2003
Mensajes: 3.578
Antigüedad: 20 años, 6 meses
Puntos: 51
Re: Jasper Reports y .jar

ummmmm
"Error=2" en windows creo que es "comando no encontrado" así que te saldría, por ejemplo, si java no esta en el PATH o si, como dice dummy18, no lo encuentra por que el path tiene espacios por en medio.
  #5 (permalink)  
Antiguo 13/08/2008, 10:19
 
Fecha de Ingreso: agosto-2008
Mensajes: 1
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Jasper Reports y .jar

Alquien que tenga algun tutorial de como realizar operaciones matematicas con el Jasper Report
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:33.