Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: “Java Advanced Imaging (JAI) is required to read some TIFF files. Please install JAI” #89

Open
brandon-gallas opened this issue May 11, 2021 · 4 comments

Comments

@brandon-gallas
Copy link
Member

@kate-elfer, @qigongFDA

Java is up to date on the computer, but the error remains: “Java Advanced Imaging (JAI) is required to read some TIFF files. Please install JAI”
I installed/updated JAI, but am having difficulty with making sure it’s added to the correct path, which I believe is one of the following:

  1. C:\Program Files\MATLAB\R2019a\java…
  2. C:\000_GITHU\eeDAP\master\src\bf\matlab\bioformats_package.jar - which is the Dynamic Java Path
    Or if I’m even going down the right rabbit hole with this cascade of update problems.

If you can trouble shoot this then I’d appreciate your help. Otherwise I’m just doing the standard “google + trial&error the solution.”

Thanks,
Kate

@brandon-gallas
Copy link
Member Author

@qigongFDA,
Please see this issue that Kate is having with eeDAP and my thoughts. Let us know if you have seen this error before and have any advice.

@kate-elfer,
It seems to me that updates to java have caused the problem. After some googling and then looking in the repo I think the error may be coming from the “Bio-Formats” package. I noticed this function:
• Function name: bfUpgradeCheck
• Function description: Check for new version of Bio-Formats and update it if applicable
• Link to function: https://github.com/DIDSR/eeDAP/blob/e8fd4272b667004fb958e36a5fb567e31f127edb/utilities/View_WSI_information/bfmatlab/bfUpgradeCheck.m

Try this.

@brandon-gallas
Copy link
Member Author

a summary I’ve encountered two errors:

• From the eeDAP master branch, running Administrator_Input_Screen results in the following error:
o Error using bfGetReader (line 85)
Java exception occurred:
loci.formats.MissingLibraryException: Java Advanced Imaging (JAI) is required to read some TIFF files. Please install JAI from
https://jai.dev.java.net/
o Brandon had identified that a possible fix may be upgrading with the latest bioformats toolbox: Bio-Formats Downloads | Open Microscopy Environment (OME)
o Additionally the creators acknowledge there is an on-going issue with conflicting jars and JAI: MATLAB — Bio-Formats 6.1.0 documentation (openmicroscopy.org)
• In my test-branch, I’ve identified the following issues:
o The latest Matlab Toolbox off the OME website does not actually contain the most up to date version of bioformats_package.jar.
 The latest jar release is 6.6.1 but the Matlab Toolbox contains 5.1.2
o Running the Matlab version of the jar results in the Java Advanced Imaging error previously described
o Replacing the Matlab jar with the standalone development package results in the following error:
log4j:WARN No appenders could be found for logger (loci.formats.ClassList).
log4j:WARN Please initialize the log4j system properly.
ERROR: Java exception occurred:
loci.formats.FormatException: No IFDs found
o Typically, this error is a result of not having enough memory to handle to size of the image files, but I’ve maxed out both the Java Heap Memory (4,007MB) as well as included a java.opts file. With my current WSI at only 3.3GB, either of these actions should have been able to fix what I know of this issue.
• I have run eeDAP via a compiled version of the program using one of the laptops from the last data collection event in February 2020. However, similar to the eeDAP-01 Tower, when I plugged that computer into the internet to try to run a virtual demo it started throwing errors after auto-updates.

OME uses their own forums as a first-stop for troubleshooting. I’ve submitted these issues to the forums and am hopeful for a quick response. I’ll keep you informed of their responses.

If you have any other ideas or suggestions, I’d more than welcome them.

@kate-elfer
Copy link
Collaborator

kate-elfer commented Jun 24, 2021

Issue Resolution:

Issue: "Error using bfGetReader (line 85)
Java exception occurred:
loci.formats.MissingLibraryException: Java Advanced Imaging (JAI) is required to read some TIFF files. Please install JAI from
https://jai.dev.java.net/"

Steps to Resolution:

  1. Verify you have only one instance of Bioformats on your computer and are not in conflict with an older version
    • From OME Forum: What looks to be happening is a conflict with a previous version which has been installed. If you run the command javaclasspath do you see any other versions of bioformas_package in a different location?
  2. Verify Bioformats Toolbox is current with your MATLAB Software Requirements: https://www.openmicroscopy.org/bio-formats/downloads/
  3. If error continues, your MATLAB-associated Java Package may be incompatible with Bioformats Requirements.
    • Verify Java Version requirement on OME (above) and install the SDK (Software Developer Kit) version of the required Java Software. SDK is NOT the standard Java install.
    • Add the SDK Bioformats-compatible Version of Java to your JavaClassPath

Full discussion on the OME Forum


Issue:
log4j:WARN No appenders could be found for logger (loci.formats.ClassList).
log4j:WARN Please initialize the log4j system properly.
ERROR: Java exception occurred:
loci.formats.FormatException: No IFDs found

Steps to Resolution:

  1. Verify that the image being called can open in an image viewer outside of Matlab (ex: ImageJ, Leica Aperio Viewer)
  2. Prior instances of eeDAP were in conflict with my development version - resulting in a corrupted image being consistently called. Renaming the folder names and associated input file paths resolved the issue.
  • To expand: In the development-input file HERE the file path "C:\000_whole_slides\tissue40x-8B.ndpi" contained both the correct image, and a corrupted image (an image that would not open in an image viewer - step1 in this issue). This was likely an artifact from prior development stages, but it was saved as part of the full git-versioning.
  • In order for my development file NOT to call the corrupted file, I created a new file path: "C:\000_WSIs\tissue40x-8B.ndpi".
  • This issue likely only effects specific instances of eeDAP where a corrupted image file has become part of the file path.

@brandon-gallas
Copy link
Member Author

Great job.
Can I ask for just a little bit more info at the end?
Can you edit your previous comment and provide the "folder names and associated input file paths" before and after you renamed them? That might help me understand the conflict and resolution.

The rest of your explanation (and the link to the OME forum) seem clear enough to follow.

What a tough nut. You cracked it!
B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants