This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: 16 Jul 25, 18:24 Last Post By: dzeleznik Threads: [ Previous | Next ]
dzeleznik

Posts: 13
Registered: 6-Dec-2010
jAlbum 37.7 NPE when building from command line
Posted: 14 Jul 25, 22:22
 
  Click to reply to this thread Reply
Hi,

I've been using jAlbum successfully for years, building from the command line on Windows using Cygwin shell scripts to automate mass updates to my albums. However, I am now getting the following NPE from the command line using 37.7. When I revert back to 37.6 everything is fine, no NPE, etc. "Making" an album in the 37.7 gui works fine, it's only from the command line that I now get this error.

Here is the simple command line I use to build an album:

E:/JAlbum/jre64/bin/java.exe -Xmx2048M -jar E:/JAlbum/jalbum.jar -projectFile 'photo gallery.jap'


And here is the error I'm getting with 37.7:

java.lang.ExceptionInInitializerError
        at se.datadosen.jalbum.JAlbumUtilities.importProject(JAlbumUtilities.java:62)
        at se.datadosen.jalbum.AlbumProject.getProperties(AlbumProject.java:121)
        at se.datadosen.jalbum.AlbumProject.<init>(AlbumProject.java:94)
        at se.datadosen.jalbum.AlbumProject.<init>(AlbumProject.java:79)
        at se.datadosen.jalbum.JAlbumConsole.<init>(JAlbumConsole.java:70)
        at se.datadosen.jalbum.JAlbum.main(JAlbum.java:414)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at se.datadosen.jalbum.Main.main(Main.java:53)
Caused by: java.lang.NullPointerException: Cannot invoke "java.awt.Font.deriveFont(float)" because "se.datadosen.jalbum.JAlbumFrame.HEADER_FONT" is null
        at se.datadosen.jalbum.JAlbumFrame.<clinit>(JAlbumFrame.java:189)
        ... 9 more


For now, I'll stick with 37.6 which works for me.

Thanks!
vkamutzki

Posts: 2
Registered: 6-Jun-2014
Re: jAlbum 37.7 NPE when building from command line
Posted: 15 Jul 25, 00:53   in response to: dzeleznik in response to: dzeleznik
 
  Click to reply to this thread Reply
I am getting the same error from the command line with version 37.7 and 37.7.1 on a Windows 10 PC. I have tested with albums using Turtle, Neptune, and Split skins. jAlbum software and all skins have been fully reinstalled. Reverting to version 37.6 resolves the problem.
JeffTucker

Posts: 8,095
Registered: 31-Jan-2006
Re: jAlbum 37.7 NPE when building from command line
Posted: 15 Jul 25, 02:33   in response to: dzeleznik in response to: dzeleznik
 
  Click to reply to this thread Reply
While I agree that this error probably needs to be addressed, I would also like to comment that I used to handle the updating of multiple projects with shell script files that invoked the jAlbum command line. But I found that the multi-maker was more efficient. It allows for multi-threading, and steers clear of the "UI dependent" errors that crop up from time to time.
RobM

Posts: 3,944
Registered: 4-Aug-2006
Re: jAlbum 37.7 NPE when building from command line
Posted: 15 Jul 25, 16:02   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Link to your post warning of skin updates and multimaker as well as the command line.
https://jalbum.net/forum/thread.jspa?threadID=58293
davidekholm

Posts: 3,701
Registered: 18-Oct-2002
Re: jAlbum 37.7 NPE when building from command line
Posted: 16 Jul 25, 12:31   in response to: RobM in response to: RobM
Helpful
  Click to reply to this thread Reply
Do a core update via Tools->External tools->"jAlbum core update" to have this error fixed. The splash screen should now say 37.7.2
vkamutzki

Posts: 2
Registered: 6-Jun-2014
Re: jAlbum 37.7 NPE when building from command line
Posted: 16 Jul 25, 16:12   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
This update fixed the problem for me. Thanks!
davidekholm

Posts: 3,701
Registered: 18-Oct-2002
Re: jAlbum 37.7 NPE when building from command line
Posted: 16 Jul 25, 17:32   in response to: vkamutzki in response to: vkamutzki
 
  Click to reply to this thread Reply
You're welcome. Thanks for reporting.
dzeleznik

Posts: 13
Registered: 6-Dec-2010
Re: jAlbum 37.7 NPE when building from command line
Posted: 16 Jul 25, 18:22   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Core update to 37.7.2 fixed it for me as well, thanks!!

BTW, my shell scripts do much, much more than just invoke jAlbum to rebuild my 200+ galleries. As an example, before they are built I verify that my .jap files have a consistent look & feel: section layouts, typography, padding around thumbnails & images, etc. The scripts can run in test mode just listing the problematic gallery properties or can update the .jap files. For some custom look&feel changes that are not controllable via gallery properties, I have custom CSS that my scripts inject into the html after it's generated by jAlbum. While I know this bit can be done in skins such as Tiger, it is much more maintainable for me to have a global custom css that I can edit in one place and it's then added to the html head sections.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums