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


Permlink Replies: 38 - Pages: 3 [ 1 2 3 | Next ] - Last Post: 14 Nov 22, 19:32 Last Post By: MarkusD
MarkusD

Posts: 742
Registered: 13-Apr-2006
Failed to register class org.libraw.RawLibrary / 29.1
Posted: 1 Nov 22, 14:00
 
  Click to reply to this thread Reply
Hi,

even with jA 29.1 (on Windows 10) I get the same error as with the latest beta:
An unexpected error occurred. Please see detailed description below:
 
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
	at net.jalbum.util.WorkerPool.process(WorkerPool.java:91)
	at net.jalbum.util.WorkerPool.process(WorkerPool.java:69)
	at se.datadosen.jalbum.AlbumBean.registerVariables(AlbumBean.java:3132)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:1809)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:2025)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:2025)
	at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:3604)
	at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:3483)
	at se.datadosen.jalbum.JAlbumFrame$7.run(JAlbumFrame.java:1162)
Caused by: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.reportExecutionException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.get(Unknown Source)
	at net.jalbum.util.WorkerPool.process(WorkerPool.java:84)
	... 8 more
Caused by: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
	at se.datadosen.jalbum.AlbumBean.lambda$registerVariables$9(AlbumBean.java:3133)
	at net.jalbum.util.WorkerPool.lambda$process$1(WorkerPool.java:81)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
	at net.jalbum.jlibraw.LibRawImageReader.readInitial(LibRawImageReader.java:331)
	at net.jalbum.jlibraw.LibRawImageReader.getWidth(LibRawImageReader.java:80)
	at se.datadosen.util.FileFilters.getBasicImageInfo(FileFilters.java:575)
	at se.datadosen.jalbum.AlbumObjectImpl.getImageInfo(AlbumObjectImpl.java:311)
	at se.datadosen.jalbum.AlbumObjectImpl.getSize(AlbumObjectImpl.java:319)
	at se.datadosen.jalbum.AlbumBean.addFilteredImageSizes(AlbumBean.java:4263)
	at se.datadosen.jalbum.AlbumBean.registerVariables(AlbumBean.java:3075)
	at se.datadosen.jalbum.AlbumBean.lambda$registerVariables$8(AlbumBean.java:3135)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
	at java.base/java.util.concurrent.CountedCompleter.exec(Unknown Source)
	... 5 more
Caused by: java.lang.RuntimeException: Failed to register class org.libraw.RawLibrary
	at org.bridj.BridJ.register(BridJ.java:194)
	at org.libraw.RawLibrary.<clinit>(RawLibrary.java:25)
	... 18 more
Caused by: java.lang.ClassNotFoundException: org.libraw.RawLibrary
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Unknown Source)
	at java.base/java.lang.Class.forName(Unknown Source)
	at org.bridj.BridJ.register(BridJ.java:191)
	... 19 more


I deinstalled the version 29.0.2 and installed 29.1.

Attached is a list of files of "C:\Program Files\jAlbum".
davidekholm

Posts: 3,683
Registered: 18-Oct-2002
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 1 Nov 22, 17:20   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
That file list looks ok. Please also check the %APPDATA%\JAlbum location. Ensure that no "lib" or "ext" folders are laying around there. If so, delete them and restart jAlbum.
davidekholm

Posts: 3,683
Registered: 18-Oct-2002
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 1 Nov 22, 17:20   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
If this doesn't help, uninstall and ensure that no files are left under C:\Program\JAlbum, then reinstall.
MarkusD

Posts: 742
Registered: 13-Apr-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 1 Nov 22, 21:23   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
David, I deinstalled jAlbum 29.1 and deleted everything under "C:\Program Files\jAlbum" and "C:\Users\MDrück\AppData\Roaming\jAlbum". But the error persists.

I'm going back again to 29.0.2.

Just one thought. Not being able to process a couple of pictures (in my case maybe a handful, out of some thousands) and to stop the whole process is a bad experience. Ending up with an album with some failures would be an option to me. I don't know if this is something you as the developer would be acceptable. Yes, I understand, that a specific error could lead to an unusable album, and the only solution is to stop the whole process. I'm just thinking out loud.
davidekholm

Posts: 3,683
Registered: 18-Oct-2002
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 10:58   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
I agree in principle that it's a better experience to have a reduced gallery than no gallery at all. In this case, the error is truly unexpected and indicates some deeper issue that need to be addressed. I don't know it's its good to "mask" these types of "should never happen" errors.

Really frustrating as I can't reproduce this error on my Windows machine. Can you provide a minimal project that reproduces it (one image for instance)
JeffTucker

Posts: 8,055
Registered: 31-Jan-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 13:18   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Markus, I know your project is very large, which makes it difficult to track down the specific object or objects that are triggering the error, but if David is to have any hope of fixing it, that's what you're just going to have to do. You're not going to want to stick with 29.0.2 forever.

Start a new project, and copy the .jap file from the "real" project. Remember to change the image and output directories, so you don't overwrite your album. Now add just one folder from the real project, and make the album. If you get no error, delete that folder, and add another one from the real project, etc.

When you finally do get the error, start excluding half the objects/subfolders, until you can zero in on the object that's causing the crash. By excluding/including half, then half of half, and so on, you'll get to the "problem child" pretty quickly.

(BTW, I strongly advise updating to Windows 11 - it's quite an improvement over Windows 10.)
MarkusD

Posts: 742
Registered: 13-Apr-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 18:02   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Jeff, David, just a short note. I was able to find the cause of the problem and was able to fix it. I'll write later what I did.
MarkusD

Posts: 742
Registered: 13-Apr-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 18:35   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
Start a new project...
Sorry, my mistake. I did not mention that I already knew which object/picture caused the problem. I uploaded that picture in another thread and you, Jeff, and I thing Rob, confirmed that this picture worked well for you.

So what I did. I installed 29.1 on my notebook, with has a more or less 99% identical copy of all of my pictures from my main PC. The 1% which is missing are all the videos. Also on the notebook I received the same error. Then I look at the JA system settings and changed the Look and Feel to <Systemstandard>. I compiled the album again, this time no error. And also in the explore view I saw a thumbnail again.

The preview fails in explore mode with 29.1 in my album:


The preview is OK with 29.0.2


The preview fails in explore mode with 29.1 even in the sample album:


(BTW, I strongly advise updating to Windows 11 - it's quite an improvement over Windows 10.)
A agree. I use W11 on a test machine and several virtual machine. But my current PC is too old to migrate to W11. The problem is not to by a new PC but to install and configure all the software I need for my business. :-)

Thanks Jeff and David for your help.
JeffTucker

Posts: 8,055
Registered: 31-Jan-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 18:43   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
So which L&F causes the failure?!

ETA: And please attach the image again. I can't find the older post that included it, and I don't save all the downloaded stuff I get (I'd never be able to keep track of all of it).
MarkusD

Posts: 742
Registered: 13-Apr-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 18:59   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
So which L&F causes the failure?!
Good question. I saved the defaults.jap which caused the error. These are the entries regarding the L&F:
look=com.formdev.flatlaf.FlatDarkLaf
lookAndFeel=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
lookAndFeelName=Windows

What I did is, I changed the L&F to another one, quit JA, started JA, and choose "FlatLight", which results in:
look=com.formdev.flatlaf.FlatDarkLaf
lookAndFeel=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
lookAndFeelName=FlatLight

ETA: And please attach the image again. I can't find the older post that included it, and I don't save all the downloaded stuff I get (I'd never be able to keep track of all of it).
https://www.markus-drueck.de/JA/IMG_0293.CR2
JeffTucker

Posts: 8,055
Registered: 31-Jan-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 19:10   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Looks like some manual editing has been done, or maybe the defaults haven't been refreshed in far too long. Only one of those entries should be in there, to wit, lookAndFeelName. The others are obsolete.

Try opening jAlbum and then, without opening a project at all, choosing File, Save as Default. Then see what the file looks like.

(David, when did you start sorting the entries in the .jap files? I've been using a TomCee plugin to examine project files for many, many years, in part because it sorts the entries for display!)
MarkusD

Posts: 742
Registered: 13-Apr-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 19:20   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
Looks like some manual editing has been done, or maybe the defaults haven't been refreshed in far too long. Only one of those entries should be in there, to wit, lookAndFeelName. The others are obsolete.
Just a couple of days ago I used the tool "Config Manager.bsh". I don't remember what exactly I did. I saved a new configuration called "Test" but went back to the Standard config. Thats all.

Try opening jAlbum and then, without opening a project at all, choosing File, Save as Default. Then see what the file looks like.
Maybe its better do save all these files and folders as a ZIP:
"C:\Users\MDrück\AppData\Roaming\jAlbum\defaults"
"C:\Users\MDrück\AppData\Roaming\jAlbum\defaults.jap"
"C:\Users\MDrück\AppData\Roaming\jAlbum\configManager.properties"
"C:\Users\MDrück\AppData\Roaming\jAlbum\albumv25.rss"
"C:\Users\MDrück\AppData\Roaming\jAlbum\recent-projects.txt"
"C:\Users\MDrück\AppData\Roaming\jAlbum\accounts.xml"
"C:\Users\MDrück\AppData\Roaming\jAlbum\shares.xml"

then delete them and install JA again, so I get fresh values. After that I restore:
recent-projects.txt
accounts.xml
RobM

Posts: 3,936
Registered: 4-Aug-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 19:27   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
So which L&F causes the failure?!

ETA: And please attach the image again. I can't find the older post that included it, and I don't save all the downloaded stuff I get (I'd never be able to keep track of all of it).

It is in the General forum under release notes

Edited by: RobM on 2 Nov 2022, 18:31
Fixed paste error and poor eyesight errors ;)
MarkusD

Posts: 742
Registered: 13-Apr-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 20:20   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Attachment defaults.jap (2.9 KB)
I knew it. The error occurred again, processing the same picture I posted above.
An unexpected error occurred. Please see detailed description below:
 
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
	at net.jalbum.util.WorkerPool.process(WorkerPool.java:91)
	at net.jalbum.util.WorkerPool.process(WorkerPool.java:69)
	at se.datadosen.jalbum.AlbumBean.registerVariables(AlbumBean.java:3132)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:1809)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:2025)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:2025)
	at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:3604)
	at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:3483)
	at se.datadosen.jalbum.JAlbumFrame$7.run(JAlbumFrame.java:1162)
Caused by: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.reportExecutionException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.get(Unknown Source)
	at net.jalbum.util.WorkerPool.process(WorkerPool.java:84)
	... 8 more
Caused by: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
	at se.datadosen.jalbum.AlbumBean.lambda$registerVariables$9(AlbumBean.java:3133)
	at net.jalbum.util.WorkerPool.lambda$process$1(WorkerPool.java:81)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
	at net.jalbum.jlibraw.LibRawImageReader.readInitial(LibRawImageReader.java:331)
	at net.jalbum.jlibraw.LibRawImageReader.getWidth(LibRawImageReader.java:80)
	at se.datadosen.util.FileFilters.getBasicImageInfo(FileFilters.java:575)
	at se.datadosen.jalbum.AlbumObjectImpl.getImageInfo(AlbumObjectImpl.java:311)
	at se.datadosen.jalbum.AlbumObjectImpl.getSize(AlbumObjectImpl.java:319)
	at se.datadosen.jalbum.AlbumBean.addFilteredImageSizes(AlbumBean.java:4263)
	at se.datadosen.jalbum.AlbumBean.registerVariables(AlbumBean.java:3075)
	at se.datadosen.jalbum.AlbumBean.lambda$registerVariables$8(AlbumBean.java:3135)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
	at java.base/java.util.concurrent.CountedCompleter.exec(Unknown Source)
	... 5 more
Caused by: java.lang.RuntimeException: Failed to register class org.libraw.RawLibrary
	at org.bridj.BridJ.register(BridJ.java:194)
	at org.libraw.RawLibrary.<clinit>(RawLibrary.java:25)
	... 18 more
Caused by: java.lang.ClassNotFoundException: org.libraw.RawLibrary
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Unknown Source)
	at java.base/java.lang.Class.forName(Unknown Source)
	at org.bridj.BridJ.register(BridJ.java:191)
	... 19 more


Attached the "C:\Users\MDrück\AppData\Roaming\jAlbum\defaults.jap"
JeffTucker

Posts: 8,055
Registered: 31-Jan-2006
Re: Failed to register class org.libraw.RawLibrary / 29.1
Posted: 2 Nov 22, 20:33   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:

C:\Users\MDrück\AppData\Roaming\jAlbum\defaults
This shouldn't exist at all - delete it.
C:\Users\MDrück\AppData\Roaming\jAlbum\configManager.properties
This is from a 4-year-old RobM tool. For now, delete it, since it's not clear what it's doing. Let's get rid of needless complications.
Legend
Forum admins
Helpful Answer
Correct Answer

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