Issue with Save Options

Hi Team ,

we are getting the following error when call to this one.

new OoxmlSaveOptions();

java.lang.IllegalAccessError: tried to access a method com.aspose.cells.SaveOptions.()v from com.aspose.cells.OoxmlSaveOptions.

what is cause for this one.

Thanks,
Kumar.

Hi,

It appears to be Aspose.Cells exception.

Please try the latest version:
Aspose.Cells
for Java v7.1.0.3



If the problem still occurs, then please provide your complete test code to replicate this problem and the source xls/xlsx files.

We will look into it and update you asap.

hi Team,

please find the code.

Workbook writeWorkbook = new Workbook();
SaveOptions opt = new OoxmlSaveOptions();
if(format.indexOf(“2003”)!=-1)
{
isAsposeSupport=asposeUtil.isAsposeSuport(processID);
opt = new XlsSaveOptions();
}
OutputStream outExcel = response.getOutputStream();
if((“1”.equals(flag)||“2”.equals(flag)) && isAsposeSupport)
{
try{
if(!isNull(processID) && !isNull(user_id) && !isNull(format))
{
fileName=reportName+""+user_id+""+processID+"_"+flag;
if(format.indexOf(“2003”)!=-1)
{
fileName+=".xls";
response.setContentType(“application/vnd.ms-excel; charset=UTF-8”);
((XlsSaveOptions)opt).setSaveFormat(SaveFormat.EXCEL_97_TO_2003);
}
else
{
fileName+=".xlsx";
response.setContentType(“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8”);
((OoxmlSaveOptions)opt).setSaveFormat(SaveFormat.XLSX);

}
response.setHeader(“content-disposition”, “inline; filename=”" +fileName+ “”");
gcsv.genearateClob(processID,writeWorkbook,user_id,format,flag,logPath,opt);
writeWorkbook.save(outExcel,opt);
outExcel.close();
}

}
error:
java.lang.IllegalAccessError: tried to access method
com.aspose.cells.SaveOptions.()V from class
com.aspose.cells.OoxmlSaveOptions


help on this.urgent issue.


Thanks,
kumar.

Hi,

We have logged this issue in our database. Development team will look into it and advise.

Please also test the issue with the latest version:
Aspose.Cells
for Java v7.1.0.3
and provide me your feedback

This issue has been logged as CELLSJAVA-40128.

Hi Team,

SaveOptions class has private constructor. the jvm of server does not allow to call the constructor form OoxmlSaveOptions().

if i use the following code in jsp

SaveOptions save = new OoxmlSaveOtpions();

or
SaveOptions save = new xlsSaveOtpions();

the generated .class contains the

code like this.

Object obj = new OoxmlSaveOtpions();

Object obj = new xlsSaveOtpions();

i think this informtion will help you to resolve the issue.


thanks,
kumar.

Hi,

It is very strange that such kind of code gives exception.

In fact we think you have used such kind of code successfully with our laest fix Aspose.Cells for Java v7.1.0.3 (at your another post).

And we also tested your jsp code here and found no issue.

Please check your server environment and configurations, such as making sure there is only one aspose.cells library be loaded by the server.

We think maybe there are more than one aspose.cells libraries have been loaded by your server and that caused such kind of issue.

Hi Team,

Thanks for your response,

give some note on following things.

1. i hava loaded the aspose cells 7.1.0.3. in class path and extracted in same location . Is there any issue with this one. this working well in my server.

2. if i load jars files two time from different locations. the classloader get confusion which jar file to be used. in this case the application is down and gives the complete error like duplicate definition of jar file found.

3. if i load the jar from one location and extract the jars in different location both are mention in class path then also application is down and getting duplicate definition found for classes.

please look into this one http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4183590

thanks,
kumar


Hi Team ,


we are getting different error in oc4j server.

java.lang.SecurityException: class “com.aspose.cells.SaveOptions”'s
signer information does not match signer information of other classes in
the same package

.
what is cause for this one.

tahnks,
kumar

Hi,

We cannot find the issue with OC4J server. We think the most possible reason for such kind of issue is that there are more than one library for aspose.cells has been loaded. Also please make sure you have not modified the jar of aspose.cells.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan