Pdf.kit for java 2.1.0.0 has null pointer exception over previous version

I have a simple piece of software that i wronte to test the pdf.kit prior to redeployment of our already written software.

The software used for the test is simple, it uses the Form object, creates a form from an existing good pfd, reads the fields, stores their names and values, if a field is unreadable, it quietly throws away the error and continues reading until the fields are all read. Then is closes the form object using the close() method.

The expected result is another form plus the field names and values in memory.

With the last version before 2.1.0.0 it worked correctly creating the second form.

With the 2.1.0.0 version, it seems to hang the process, and throws a null pointer exception. The process does not actually exit and ultimately my memory becomes full and i have to restart my machine.

Additionally, in a previous thread there was a discussion over the use of barcode fields and supporting those which i cannot address since i cannot test this new version of the kit.

Hello Jason,

It would be better if you could share the code that is generating this exception, so that we can test the issue at our end.

/*

This code usually crashes the new kit version on the close method, which throws the exception that i can catch down there.

The old kit did not crash on the close method

*/

public void garbage()
{
String path = "c:\\";
String fields[];
String datas[];
int fieldType = -1;

try
{
Form dataform = new Form(path+"test.pdf",path+"output.pdf");
fields = dataform.getFieldsNames();
datas = new String[fields.length];

for (int x=0; x<fields.length; x++)
{
datas[x] = new String();

try
{
datas[x] = dataform.getFieldValue(fields[x]);
}
catch (Exception e)
{
//exception stuff here
}

}
dataform.close();
}
catch (Exception e)
{
//exception stuff here
}

}

Hello Jason,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the issue, but I am unable to reproduce the problem. I have tested it using a simple Pdf file that contains some form fields. The input Pdf file that I have used is in attachment. I have tested it against Aspose.Pdf.Kit 2.1.0.0.

After much testing we found what might be a bug but im not going to be hasty and say this.

Our dev team has found that the kit seems to die on the Form.close() method with a null pointer exception and the error.

We can only replicate the problem on the Oracle Application server, but not on straight java, with the command line.

Since all we use is the oracle server here, i have made a solution to call the code that uses the kit from the commandline within a java runtime environment inside of the server container.

This worked

Hi,

Thanks for your reporting .

From the description for the problem, I guess it may be caused by the incompatibility between the standard SUN JRE and the Oracle JRE; and thanks for your effort to the solution which avoids the incompatibility.

Can you please tell us about the version of your Oracle, then we could investigate the problem more targeted and estimate if we could solve it inside our inner code.

Thanks,