Tag Archives: JCO

bug-JAVA call SAP function Connect to SAP gateway failed

Problem: com. SAP. Conn. Jco. JCoException: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
Recently, my colleague made a mistake in the following figure when he called SAP system function with Java. Later, my colleague asked for my assistance. I used its code to run the machine and report the same error. Finally, the problem is solved by searching and trying in many ways.
Summarize the processing methods:
1. First, check whether the code has been written and whether the JAR package and DLL file have been added. Ping/Telnet can try to check whether the network is normal.
2, adjust the JDK version, you can use 1.7/1.8 try it;
3, modify the computer user name, not including Chinese, (after the modification, please shut down, and then start, sometimes restart is really unreliable).

Finally, I successfully solved the problem by modifying the computer name, and ran on JDK1.7 and 1.8 without any problem.