grzegorz
2nd September 2016, 12:15
Does anybody know exact meaning of return codes in functon zipfile.build / zipfile.create?
I'm getting a value "-10" and zip file is not created. I'm quite sure that files to be zipped exist, there is enough space etc.
res = zipfile.create( "c:\work\testfile.zip" , "c:\work\testfile.txt" )
| res = -10 !
Of course I have a Windows server, file and directory exist on server.
JaapJD
2nd September 2016, 14:03
Do you have Java installed on server and did you deploy the Java applications as shown in ttadv2570m300?
grzegorz
2nd September 2016, 14:27
Yes, I have. In ttadv2570m300 I have three items, all have been deployed but none of them seems to be related with zipfile creation. Should I have a special Java application for file compression there?
JaapJD
2nd September 2016, 14:44
Programmers manual says: Java methodes in domain com.infor.ln.dom.zip are used for the implementation. Those are in ttrpidom-utilities.javaapp.
Check if there is written something in $BSE/tmp/bshell.[.<host>].<pid> file during execution of zip.create.
grzegorz
2nd September 2016, 16:00
Thank you for your suggestions. In my instalation (ES 10.5) there is no additional file with ttrpidom-utilities.javaapp.
In ttadv270 table I found a record for it and it is marked as "expired", and the file itself, which should be located in $BSE\tools\tt...\bttrpi\ is not present.
My server is a sandbox, so I can play aroud. I set the additional file as NOT expired, took the javaapp file from older instalation and deployed it.
No change, still getting result "-10" with zipfile.build / zipfile.create.
And here is what I found in bshell.<pid> file:
B:0000000:::(00008):*** Error (suppressed): Incorrect use of streams API in process 8 (tkprc0444m00c) while in bshell function seq.close ***
B:0000001:::(00008): Stream id 5 is not open or has been closed
B:0000002:::(00008): Action taken: Error is ignored
B:0000003:::(00008):Stack trace (package combination '105cz000'):
B:0000004:::(00008): wyslij_i_uruchom() at itkkdrwzorce0:4904 (in object otkprc0444m00c)
B:0000005:::(00008): on.choice.wykonaj() at ptkprc0444m00c0:81 (in object otkprc0444m00c)
B:0000006:::(00008): frmcmd.executefunction() (in object ottstpstandard)
B:0000007:::(00008): frmcmd.execute() (in object ottstpstandard)
B:0000008:::(00008): frmcmd.handleexecution() (in object ottstpstandard)
B:0000009:::(00008): frmcmd.start() (in object ottstpstandard)
B:0000010:::(00008): cmdhnd.handleformcommand(65) (in object ottstpstandard)
B:0000011:::(00008): cmdhnd.handlecommand(65) (in object ottstpstandard)
B:0000012:::(00008): tc.handleformcommand(2147483220) (in object ottstpstandard)
B:0000013:::(00008): tc.dispatch.message(^0000000002554618) (in object ottstpstandard)
B:0000014:::(00008): g.execute.bms() (in object ottstpstandard)
B:0000015:::(00008): evthnd.handlebucketmessage(^00000000025545E0) (in object ottstpstandard)
B:0000016:::(00008): evthnd.handleevents() (in object ottstpstandard)
B:0000017:::(00008): std_main() (in object ottstpstandard)
B:0000018:::(00008): main() (in object otkprc0444m00c)
B:0000019:::(00008):End Stack trace
JaapJD
2nd September 2016, 16:17
Sorry, in 10.5 they seem to have been moved to ttrpiln-utils-api.javaapp.
The messages is your trace file are not related to the zip functions. What is added to the trace file if you activate "Debug Java VM Int"?
grzegorz
2nd September 2016, 16:28
Unfortunately, nothing interesting. Just a lines with "J:0000089:::(-0001):destroyJavaStructsOfProces"
JaapJD
2nd September 2016, 16:42
And with increased trace level?
grzegorz
2nd September 2016, 16:47
Also nothing that would help. I will play with it and let you know when I find something helpful. Thank you again.
bhushanchanda
2nd September 2016, 16:56
Hi,
It might be a permission issue as well(According to this (http://answers.microsoft.com/en-us/windows/forum/windows_7-security/system-error-code-5-access-is-denied/0d027ec1-553d-47cd-9be3-d9eed71013e5?auth=1) and this (http://kb.winzip.com/kb/entry/143/)) You can check by creating the input file and zip file in your BSE/tmp folder.
e.g.
res = zipfile.create("${BSE}/tmp/new1.zip" , "${BSE}/tmp/my_1235.txt" )