Aspose - Error Converting Document

Hi,


I am having an issue converting a document to PDF on a unix server through sql. I can’t run any .sh file from within sql. If I run /local/home/example/example/aspose/script/convert.sh sitting on the unix server, the document is converted correctly.

When I run the following through sql I get an exit code 127 error.

CALL dbms_java.set_output(500);
set serveroutput on size 1000000;

declare
DOC VARCHAR2(6000);
ER VARCHAR2(6000);
l_re varchar2(6000);
l_pls varchar2(6000);
begin
dbms_output.put_Line(‘see if we can convert a document’);

        core_host_command.hostCommand(p_command        => '/local/home/example/example/aspose/script/getlist.sh'
                                      p_return_message => l_re,
                                      p_plsql_error    => l_pls);

dbms_output.put_line(substr('l_re '||l_re,1,255));
dbms_output.put_line(substr('l_pls '||l_pls,1,255));
end;
/

I tried changing the sql to have the command as ‘ksh/local/home/example/example/aspose/scripts/convert.sh’ and ‘/usr/bin/ksh /local/home/example/example/aspose/scripts/convert.sh’ but none seem to work, I don’t know if I am calling the shell script correctly.

When I run the sql script I get the following error: l_re <>127<>

Any help on why this exitCode is appearing or if I am calling the shell script incorrectly would be greatly appreciated.

Thanks.

Hi Anthony,


Thanks for contacting support.

Can you please share which API you are using so that we can further look into this matter. We are sorry for this inconvenience.

Hi,


I am using Aspose.Words for Java.

Thanks.

Hi Anthony,

Can you please share your input Word document and Aspose.Words related code you are using to convert to PDF?

Best Regards,