NullPointerException on extracting OneNote file

Hi

We are seeing a few NPEs in production while using the aspose note product. Sadly due to this we cannot provide the files that are causing this issue.

java.lang.NullPointerException - at com.aspose.note.i.b(Unknown Source)
~[aspose-note-17.11-jdk17.jar:17.11] - at com.aspose.note.i.a(Unknown Source)
~[aspose-note-17.11-jdk17.jar:17.11] - at com.aspose.note.i.c(Unknown Source)
~[aspose-note-17.11-jdk17.jar:17.11] - at com.aspose.note.o.a(Unknown Source)
~[aspose-note-17.11-jdk17.jar:17.11] - at com.aspose.note.Document.a(Unknown Source)
~[aspose-note-17.11-jdk17.jar:17.11] - at com.aspose.note.Document.(Unknown Source)
~[aspose-note-17.11-jdk17.jar:17.11] - at com.aspose.note.Document.(Unknown Source)
~[aspose-note-17.11-jdk17.jar:17.11] - at com.aspose.note.Document.(Unknown Source) ~[aspose-note-17.11-jdk17.jar:17.11]

The way we are invoking the library is as follows:

    try (TikaInputStream tis = TikaInputStream.get(sourceFile);
            FileOutputStream fos = new FileOutputStream(toFile)) {

		if(!AsposeLicenseConfig.getInstance().licensed()) {
			logger.info("Aspose license is not active");
		} else {
			logger.info("Aspose license is active");
		}
        Document doc = new Document(tis);
        fos.write(doc.getText().getBytes());
        fos.flush();
        return true;
    }

Are there any specific clues we can look at to help troubleshoot this?
What is the support for OneNote 2016? We are suspecting it might be due to support for some of the new file formats but we have no way to validate as all our tests in house passes with OneNote.

Current version of aspose we are running:

  • aspose note 17.11
  • Runs on ubuntu machines with the license file on it.

Any help here would be greatly appreciated.

Thanks
Krishnan

@keshi8086,

Could you please try it with the latest version of Aspose.Note for Java 18.3 and let us know if it helps? At present, only these versions of Microsoft OneNote are supported.

If the issue persists, we’ll be in need of your source file to look into this issue further. Please share that with us for further assistance from our end.

Thanks @kashif.iqbal

We have a license that expired in Dec 2017 so we were using the latest version that we can use on that license which was 17.11. Is it possible to receive full support even if we have the 18.3 version with that license?

Thanks
Krishnan

@keshi8086.

You may note the date in the tag while opening your license file in notepad. All the product versions, which are released before this date, can be used with this license. I am afraid that if you have expiry date Dec 2017, then you may not be able to use latest version of Aspose.Note.

Ok thanks - we’ll pursue renewing the license and try with the newer version.

You are welcome and please feel feel to write to us in case of any other query related to API.

This is still happening as of Aspose.Note for Java version 19.9

@nuix,

Please provide your source file and paste your sample code (runnable) to reproduce the issue on our end, we will check it soon.

PS. Please zip the document before attaching it.