ccavanaugh / jgnash

jGnash Personal Finance
http://ccavanaugh.github.io/jgnash/
Other
139 stars 80 forks source link

Error with Account Register #74

Closed lukebakken closed 5 years ago

lukebakken commented 5 years ago

Expected Behavior

Actual Behavior

After calculation is run, a popup is shown with the following:

java.lang.IllegalArgumentException: Width (-7) and height (-10) cannot be <= 0
    at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1016)
    at java.awt.image.BufferedImage.<init>(BufferedImage.java:324)
    at net.sf.jasperreports.engine.print.JRPrinterAWT.printPageToImage(JRPrinterAWT.java:275)
    at net.sf.jasperreports.engine.JasperPrintManager.printToImage(JasperPrintManager.java:293)
    at net.sf.jasperreports.engine.JasperPrintManager.printPageToImage(JasperPrintManager.java:449)
    at jgnash.uifx.report.jasper.JasperViewerDialogController.refresh(JasperViewerDialogController.java:434)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$5(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:748)

Steps to Reproduce the Problem

See above.

Specifications

lbakken@shostakovich ~
$ java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
openjdk version "1.8.0_202"
OpenJDK Runtime Environment (build 1.8.0_202-b26)
OpenJDK 64-Bit Server VM (build 25.202-b26, mixed mode)
ccavanaugh commented 5 years ago

Please test against the Beta release located Here This appears to be a Jasper bug.

The Beta no longers uses Jasper. There were no file format changes with the Beta release, so it's possible to switch between versions.

You may also try switching to landscape for you page layout.

lukebakken commented 5 years ago

Thanks @ccavanaugh, I'll test it out when I get back home later today.

lukebakken commented 5 years ago

Bummer, looks like I need newer Java -

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: jGnashFx has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

I could install a newer JRE but it won't come by default with JavaFX on Arch Linux. I think I remember that you use Arch - any suggestions?

ccavanaugh commented 5 years ago

This new release will download JavaFX for you and put the necessary bits in the lib directory of jGnash.

You will need Java 11 and I am using the OpenJDK 11 release in aur.

lukebakken commented 5 years ago

Awesome, I will give it a try with Java 11

lukebakken commented 5 years ago

Works as expected with Java 11 and 3.0.0-b1.

Just FYI, running bin/jgnash works and brings up the FX interface, while bin/jgnash-fx errors: jgnash-fx.txt