Free Support Forum -

TIFF to Image conversion issue in Java

null pointer error . its saying error in this line-

This Topic is created by atirtahir3 using the Email to Topic plugin.


Thank you for your inquiry.
It seems that storage path/directory is not configured properly. Please debug this line and see what path you are getting (does it return a valid path?).
Furthermore, you can see how we are setting the storage path here.

i gave the path to my local correctly. now its showing -
[Fatal Error] :1:1: Content is not allowed in prolog.

while passing the document …
.Conversion.convertToPdfAsFilePath(“D:/New folder/BSWordSample1.docx”);

here is the error coming saying -[Fatal Error] :1:1: Content is not allowed in prolog

i dont know what is thaT


Do you face this error for a particular file or for all the (different) source files?

ok so it seems the license part is giving error… when i uncommented it , the error was gone.
in Mainclass-

now the error is -Exception in thread “main” java.lang.VerifyError: Bad type on operand stack


How you are applying the license? You can easily apply it by following this article.

public static final Path licensePath = getProjectBaseDir().resolve(“C:/Users/681120/Downloads/GroupDocs.Conversion-for-Java-master/License”);

    public static void applyLicense()
		License lic=new License();

this is how i am doing. but same error is coming.

where i am doing wrong???:persevere:


Please try this way:

public static final Path licensePath = getProjectBaseDir().resolve("GroupDocs.Total.Java.lic");

In applyLicense method:

// Setup license
License lic = new License();

and in getProjectBaseDir method:

public static Path getProjectBaseDir() {
Properties props = new Properties();
try {
		InputStream i = Utilities.class.getResourceAsStream("/");
	} catch (IOException x) {
		throw new RuntimeException(x);
return FileSystems.getDefault().getPath(props.getProperty("project.basedir"));


(Utilities is the class name)

Finally, in your file:

Moreover, you can evaluate our sample GitHub project.

1 Like

ok did the same…seems that error resolved… but the error-
now the error is -Exception in thread “main” java.lang.VerifyError: Bad type on operand stack

what is it?

Exception: Can’t find file: C:\Users\681120\Desktop\GroupDocs.Conversion-for-Java-master\Examples\GroupDocs.Conversion.Examples.Java\GroupDocs.Total.Java.lic.

i am running out of deadline :disappointed_relieved:


It is clearly a path/directory issue. In order to further investigate it at our end, we need a simple console project (using that issue could be reproduced) from you. Or you can explore our example project.

where is this “GroupDocs.Total.Java.lic” located in ur project?

[Fatal Error] :1:1: Content is not allowed in prolog.
this error keep coming


In base directory (D:\GroupDocs.Conversion-for-Java\Examples\GroupDocs.Conversion.Examples.Java). For better elaboration, see this screenshot and observe the directory path - License Path.JPG (18.2 KB)

is there any chance fault in License file?

I am not having this file… mine looks like this…
Untitled.png (2.7 KB)