Excuse me for my poor english, i'm trying to use JTOpenLite to access my IBM i (6.1 an d 7.1).
I use JTOpenLite 8.2.
I have tested this code : figure 3b -> http://www.ibm.com/developerworks/ibmi/library/i-using-jtopen/index.html?ca=dat-
A DataStreamException occurs :
com.ibm.jtopenlite.DataStreamException: Bad return code on commandExchangeAttributes: 0x106
at com.ibm.jtopenlite.DataStreamException.badReturnCode(DataStreamException.java:127)
at com.ibm.jtopenlite.command.CommandConnection.getConnection(CommandConnection.java:151)
at com.ibm.jtopenlite.command.CommandConnection.getConnection(CommandConnection.java:100)
at com.ibm.jtopenlite.command.CommandConnection.getConnection(CommandConnection.java:80)
at com.ibm.jtopenlite.command.CommandConnection.getConnection(CommandConnection.java:68)
at com.ibm.jtopenlite.samples.CallCommand.main(CallCommand.java:16)
I tried with the example embedded with JTOpenLite : com.ibm.jtopenlite.samples.CallCommand and I have the same problem.
I don't have this problem with JDBC access through JTOpenLite, neither with CommandCall through jt400.
Thansk for your help.
Nathanael
I am unable to create this problem using my systems. Are you sure that the IBM i systems have the latest PTF fixpacks and PTFs? Do your IBM i systems have security software that may be blocking the JTOpen connection?
The following works for me.
jtopen> java -cp jtopenlite.jar com.ibm.jtopenlite.samples.CallCommand z1235p1 eberhard PASSWORD dsplibl
true; rc=0x0
Can you try running with -Dcom.ibm.jtopenlite.Trace.category=ALL to collect a trace. For my program, I collect the trace using the following.
jtopen> java -Dcom.ibm.jtopenlite.Trace.category=ALL -cp jtopenlite.jar com.ibm.jtopenlite.samples.CallCommand z1235p1 eberhard PASSWORD dsplibl
Please submit the trace and I will take a look.
I tried this on 2 IBM i systems : an older 6.1 not up to date, and a 7.1 with all the latest PTFs.
The result on the 7.2 system :
java -Dcom.ibm.jtopenlite.Trace.category=ALL -cp jtopenlite.jar com.ibm.jtopenlite.samples.CallCommand 10.3.1.1 NB PASSWORD dsplibl
Tracing jtopenlite : level 20140313
mar. juil. 22 17:39:49:395 CEST 2014 Data stream sent...
00 00 00 34 00 00 E0 09 00 00 00 00 00 00 00 00
00 00 70 03 00 00 00 0A 11 01 00 00 00 01 00 00
00 08 11 02 00 02 00 00 00 0E 11 03 00 00 01 47
5E BA 8B 1C
mar. juil. 22 17:39:49:679 CEST 2014 Data stream data received...
00 00 00 5E 00 00 E0 09 00 00 00 00 00 00 00 00
00 04 F0 03 00 00 00 00 00 00 00 0A 11 01 00 07
01 00 00 00 00 08 11 02 00 0A 00 00 00 0E 11 03
10 02 85 DC 45 B9 D6 75 00 00 00 07 11 19 03 00
00 00 1F 11 1F 00 00 00 00 F6 F3 F2 F8 F4 F5 61
D8 E4 E2 C5 D9 61 D8 E9 E2 D6 E2 C9 C7 D5
mar. juil. 22 17:39:49:755 CEST 2014 Data stream sent...
00 00 00 34 00 00 E0 09 00 00 00 00 00 00 00 00
00 00 70 03 00 00 00 0A 11 01 00 00 00 01 00 00
00 08 11 02 00 02 00 00 00 0E 11 03 00 00 01 47
5E BA 8C 7D
mar. juil. 22 17:39:49:962 CEST 2014 Data stream data received...
00 00 00 4C 00 00 E0 09 00 00 00 00 00 00 00 00
00 04 F0 03 00 00 00 00 00 00 00 0E 11 03 A1 EF
08 5D E0 1F C2 CD 00 00 00 07 11 19 03 00 00 00
1F 11 1F 00 00 00 00 F6 F3 F2 F8 F4 F5 61 D8 E4
E2 C5 D9 61 D8 E9 E2 D6 E2 C9 C7 D5
mar. juil. 22 17:39:49:977 CEST 2014 Data stream sent...
00 00 00 50 00 00 E0 09 00 00 00 00 00 00 00 00
00 01 70 04 03 00 00 00 0A 11 13 00 00 04 B0 00
00 00 1A 11 05 3E 91 3B A8 19 4F 9E 4E 04 7D A8
47 C7 73 F2 B0 1E D1 0C 26 00 00 00 10 11 04 D5
C2 40 40 40 40 40 40 40 40 00 00 00 07 11 28 01
mar. juil. 22 17:39:50:186 CEST 2014 Data stream data received...
00 00 01 28 00 00 E0 09 00 00 00 00 00 00 00 00
00 04 F0 04 00 00 00 00 00 00 00 0E 11 06 07 DE
07 16 11 27 32 00 00 00 00 0E 11 07 07 DE 07 16
11 25 11 00 00 00 00 08 11 09 00 00 00 00 00 08
11 0A 00 03 00 00 00 07 11 0E F3 00 00 00 0A 11
14 00 00 01 29 00 00 00 1A 11 1A 2A 53 B2 55 7E
1B FC 0C 74 3C A2 3E DC D0 DC 2B AC 51 43 AC 00
00 00 08 11 2A 00 01 00 00 00 B1 11 2B 00 00 FF
FF 00 00 01 29 00 00 00 00 00 02 F0 F1 00 00 00
07 C3 D7 C3 C1 F9 F8 F8 00 00 00 0A D8 C3 D7 C6
D4 E2 C7 40 40 40 00 00 00 0A D8 E2 E8 E2 40 40
40 40 40 40 00 00 00 1D C5 95 A5 89 99 96 95 94
85 95 A3 40 A5 81 99 89 81 82 93 85 40 99 85 94
96 A5 85 84 4B 00 00 00 0A 00 00 00 06 7D D3 C1
D5 C7 7D 00 00 00 41 C3 81 A4 A2 85 40 4B 40 4B
40 4B 40 4B 40 4B 40 7A 40 40 40 C5 95 A5 89 99
96 95 94 85 95 A3 40 A5 81 99 89 81 82 93 85 40
7D D3 C1 D5 C7 7D 40 88 81 A2 40 82 85 85 95 40
99 85 94 96 A5 85 84 4B
mar. juil. 22 17:39:50:397 CEST 2014 Data stream sent...
00 00 00 1C 01 00 E0 08 00 00 00 00 00 00 00 00
00 08 70 01 00 00 01 47 5E BA 8E FE
mar. juil. 22 17:39:50:647 CEST 2014 Data stream data received...
00 00 00 20 01 03 E0 08 00 00 00 00 00 00 00 00
00 0C F0 01 00 00 00 00 76 6E 9D 8C 54 DF 26 DA
mar. juil. 22 17:39:50:649 CEST 2014 Data stream sent...
00 00 00 40 02 00 E0 08 00 00 00 00 00 00 00 00
00 02 70 02 03 01 00 00 00 1A 11 05 88 AE D5 46
51 38 43 6E 43 12 28 EE B5 54 F0 52 6A 05 AD D4
00 00 00 10 11 04 D5 C2 40 40 40 40 40 40 40 40
mar. juil. 22 17:39:51:092 CEST 2014 Data stream data received...
00 00 00 37 02 00 E0 08 00 00 00 00 00 00 00 00
00 04 F0 02 00 00 00 00 00 00 00 1F 11 1F 00 00
00 00 F6 F3 F4 F0 F6 F9 61 D8 E4 E2 C5 D9 61 D8
E9 D9 C3 E2 D9 E5 E2
mar. juil. 22 17:39:51:094 CEST 2014 Data stream sent...
00 00 00 22 00 00 E0 08 00 00 00 00 00 00 00 00
00 0E 10 01 00 00 04 B0 F2 F9 F2 F4 00 00 00 01
00 00
mar. juil. 22 17:39:51:533 CEST 2014 Data stream data received...
00 00 00 24 00 00 E0 08 00 00 00 00 00 00 00 00
00 10 80 01 01 06
I don't have any security soft, no exit points, no firewall (LAN to LAN) ... the user profile used is an admin profils (SECOFR with ALLOBJ, *JOBCTL ...)
And it works using jt400 wich uses the same hosts servers on the i, with the same profile
thanks
Here is the error information from the trace.
Request ID: 0x1001 - Exchange Client/Server Attributes
Template:
Client CCSID: 1200 (0x000004B0)
Client NLV: 2924
Client Version: 1 (0x00000001)
Client Datastream Level: 0 (0x0000)
=======================================================
Request ID: 0x8001 - Exchange Client/Server Attributes Reply
Template:
Return Code: 0x0106 - NLV not Installed, Default to Primary NLV
Client NLV: <empty string=""><parse error:="" truncation="">
=======================================================</parse></empty>
Normally, the following is returned.
Request ID: 0x8001 - Exchange Client/Server Attributes Reply
Template:
Return Code: 0x0000 - Request Processed Successfully
Server CCSID: 37 (0x00000025)
Client NLV: 2924
Server Version: 459264 (0x00070200)
Server Datastream Level: 11 (0x000B)
=======================================================
It looks like jtopenlite is not handling the case where language 2924 is not installed on the server.
To help us better understand what is going on, can we get a trace when using the jt400.jar to call a program. Trace is enabled by defining the following JVM property: com.ibm.as400.access.Trace.category=ALL.
Thanks
same problem here.
Launching
java -Dcom.ibm.jtopenlite.Trace.category=ALL -cp jtopenlite.jar com.ibm.jtopenlite.samples.CallCommand 172.30.0.1 USER PASS DSPLIBL
Tracing jtopenlite : level 20130602
gio lug 31 17:49:55:730 CEST 2014 Data stream sent...
00 00 00 34 00 00 E0 09 00 00 00 00 00 00 00 00
00 00 70 03 00 00 00 0A 11 01 00 00 00 01 00 00
00 08 11 02 00 02 00 00 00 0E 11 03 00 00 01 47
8D 1D 07 98
gio lug 31 17:49:55:738 CEST 2014 Data stream data received...
00 00 00 5E 00 00 E0 09 00 00 00 00 00 00 00 00
00 04 F0 03 00 00 00 00 00 00 00 0A 11 01 00 05
04 00 00 00 00 08 11 02 00 03 00 00 00 0E 11 03
29 26 7C 57 79 68 A4 43 00 00 00 07 11 19 00 00
00 00 1F 11 1F 00 00 00 00 F2 F1 F7 F6 F9 F1 61
D8 E4 E2 C5 D9 61 D8 E9 E2 D6 E2 C9 C7 D5
gio lug 31 17:49:55:821 CEST 2014 Data stream sent...
00 00 00 34 00 00 E0 09 00 00 00 00 00 00 00 00
00 00 70 03 00 00 00 0A 11 01 00 00 00 01 00 00
00 08 11 02 00 02 00 00 00 0E 11 03 00 00 01 47
8D 1D 07 EF
gio lug 31 17:49:55:825 CEST 2014 Data stream data received...
00 00 00 4C 00 00 E0 09 00 00 00 00 00 00 00 00
00 04 F0 03 00 00 00 00 00 00 00 0E 11 03 37 A4
23 43 E3 FE 37 7C 00 00 00 07 11 19 00 00 00 00
1F 11 1F 00 00 00 00 F2 F1 F7 F6 F9 F1 61 D8 E4
E2 C5 D9 61 D8 E9 E2 D6 E2 C9 C7 D5
gio lug 31 17:49:55:833 CEST 2014 Data stream sent...
00 00 00 3D 00 00 E0 09 00 00 00 00 00 00 00 00
00 01 70 04 01 00 00 00 0A 11 13 00 00 04 B0 00
00 00 0E 11 05 C4 F1 CE 36 1D 0D A7 A2 00 00 00
10 11 04 C7 C9 C1 D5 C3 C1 D9 D3 D6 40
gio lug 31 17:49:55:838 CEST 2014 Data stream data received...
00 00 00 63 00 00 E0 09 00 00 00 00 00 00 00 00
00 04 F0 04 00 00 00 00 00 00 00 0E 11 06 07 DE
07 1F 11 31 08 00 00 00 00 0E 11 07 07 DE 07 1F
11 30 15 00 00 00 00 08 11 09 00 00 00 00 00 08
11 0A 00 0F 00 00 00 07 11 0E F3 00 00 00 0E 11
0B D1 38 56 C5 A3 68 47 FC 00 00 00 0A 11 14 00
00 01 18
gio lug 31 17:49:55:843 CEST 2014 Data stream sent...
00 00 00 1C 01 00 E0 08 00 00 00 00 00 00 00 00
00 08 70 01 00 00 01 47 8D 1D 08 04
gio lug 31 17:49:55:845 CEST 2014 Data stream data received...
00 00 00 20 01 00 E0 08 00 00 00 00 00 00 00 00
00 0C F0 01 00 00 00 00 F8 7A 79 EC 4F DF A2 C8
gio lug 31 17:49:55:848 CEST 2014 Data stream sent...
00 00 00 34 02 00 E0 08 00 00 00 00 00 00 00 00
00 02 70 02 01 01 00 00 00 0E 11 05 88 9F 0F 85
74 2A 6F 33 00 00 00 10 11 04 C7 C9 C1 D5 C3 C1
D9 D3 D6 40
gio lug 31 17:49:55:858 CEST 2014 Data stream data received...
00 00 00 37 02 00 E0 08 00 00 00 00 00 00 00 00
00 04 F0 02 00 00 00 00 00 00 00 1F 11 1F 00 00
00 00 F2 F1 F8 F4 F2 F6 61 D8 E4 E2 C5 D9 61 D8
E9 D9 C3 E2 D9 E5 E2
gio lug 31 17:49:55:861 CEST 2014 Data stream sent...
00 00 00 22 00 00 E0 08 00 00 00 00 00 00 00 00
00 0E 10 01 00 00 04 B0 F2 F9 F2 F4 00 00 00 01
00 00
gio lug 31 17:49:55:864 CEST 2014 Data stream data received...
00 00 00 24 00 00 E0 08 00 00 00 00 00 00 00 00
00 10 80 01 01 06
thanks for the support
I confirm I've installed the language 2924 but same error occurs. On 3 systems I do NOT have this error but on other 2 systems I DO HAVE this error.
Please help
For Nathanael's working toolbox trace, I see the following. In this case, the NLV 2928 is used and the server supports it.
Request ID: 0x1001 - Exchange Client/Server Attributes
Template:
Client CCSID: 13488 (0x000034B0)
Client NLV: 2928
Client Version: 1 (0x00000001)
Client Datastream Level: 0 (0x0000)
=======================================================
Request ID: 0x8001 - Exchange Client/Server Attributes Reply
Template:
Return Code: 0x0000 - Request Processed Successfully
Server CCSID: 297 (0x00000129)
Client NLV: 2928
Server Version: 393472 (0x00060100)
Server Datastream Level: 10 (0x000A)
=======================================================
For Giancarlo's failing jtopenlite trace I see the following.
Template:
Client CCSID: 1200 (0x000004B0)
Client NLV: 2924
Client Version: 1 (0x00000001)
Client Datastream Level: 0 (0x0000)
=======================================================
Request ID: 0x8001 - Exchange Client/Server Attributes Reply
Template:
Return Code: 0x0106 - NLV not Installed, Default to Primary NLV
Client NLV: <empty string=""><parse error:="" truncation="">
=======================================================</parse></empty>
I will continue investigating this.
jtopenlite was not handling the 0x0106 error returned from the command server. To fix the problem, Conv.java and CommandConnection.java have been updated. The fix just missed JTOpen 8.3 and will ship in JTOpen 8.4. For your convenience, I have attached an updated jtopenlite.jar file.
Here is the output of running the test program with a different secondary language.
~> java -Duser.language=es -Duser.region=PR -cp ~/jtopenlite.jar com.ibm.jtopenlite.samples.CallCommand SYSTEM USERID PASSWORD DSPLIBLX
Info: The NLV of the connection is 2931
Executing: DSPLIBLX
false; rc=0x400
CPD0030: No se ha encontrado el mandato DSPLIBLX en la biblioteca *LIBL.
CPF0001: Se ha encontrado un error en el mandato DSPLIBLX.
I coudn't find any attached file.
I will give you feed back after testing.
thank you for the support
The file is available from the bug's web page. Just search the page for "attachments" and you should find it.
It works fine.
Thanks for this very reactive support.
Fantastic support! Thank you very much! IT WORKS!