cancel
Showing results for 
Search instead for 
Did you mean: 

Error in starting SAP GUI as part of an Java RFC call from a PC

Former Member
0 Kudos

Hi,

We are on the 4.6C version of SAP and have the latest basis kernel patches that allow an RFC connection to start the SAP GUI. The program that I am running externally is java using the 3.0.1 JCo. The OS of the PC I am using is Windows XP. The SAPGUI version is 7.10 patch level 11.

The program seems to be working properly as the command prompt window goes grey as if there is another window being opened but then I get back this error message and I do not see the GUI.

The message I am getting back is:

Exception in thread "main" com.sap.conn.jco.JCoException:(136) JCO_ERROR_ILLEGAL_STATE:Launching SAP GUI failed, though it was requested(error message:Communication with SAPGUI timed out)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.startSAPGui(MiddlewareJavaRfc.java:1853)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1285)

at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:661)

at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:103)

at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:171)

at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:44)

at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:160)

at com.sap.conn.jco.rt.RfcDestination.initializ(RfcDestination.java:766)

at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:794)

at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:32)

at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:865)

at GISToSAPWO_Test.get_wo_call(GISToSAPWo.java:91)

at GISToSAPWO_Test.main(GISToSAPWO_Test.java:206)

I have been all over trying to find the solution to this and have come up empty. Any help will be greatly appreciated. If this is the wrong forum for this please let me know and I will re-post.

Thank you in advance for any information you can pass on about the issue,

Mark

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Mark Shirkey,

Please clarify the below items:

1) Is your external Java application is the one trying to invoke the SAP GUI?

2) If yes to " 1) " What is the java code that you are trying to invoke the SAP GUI ? Can you post your java code here?

3) Is this problem occurs only in particular PC where you have installed windows XP or in all the PC's?

4) What is the application trying to do?? Is this just open a SAP GUI logon or it will pass the user id and passsword too to the SAP GUI?

5) What is the purpose of your external Java appication that is calling the SAP GUI?

Thanks,

Greetson Shunmugasundaram

Answers (2)

Answers (2)

Former Member
0 Kudos

One of our User faced similar issue while trying to sign in to Bex Analyzer.The issue got resolved after uninstalling and reinstalling SAP GUI.

Former Member
0 Kudos

Hi Greetson,

Thank you in advance for your response. It is greatly appreciated.

1) In a way yes. I am using the connection setting USE_SAPGUI = 1. This is suppose to start the GUI prior to starting the RFC's program run. If this is not correct please let me know.

2) The code is part of the JCo and the RFC library from what I have read. If this is not correct please let me know.

3) I am only testing from my PC at this moment. I have re-installed my SAP GUI and am now at patch level 13 on 7.10.

4) The application passes in the connection information which includes username and password along with the parameters for the RFC call. I would like the SAP GUI to open without the user having to re-enter his/her username and password. I thought that once the RFC is called using the dialog users credentials that the GUI would then open using the connection. I have used the java pooled connection method and it still does not open the GUI.

5) The purpose is to pass Equipment objects, Functional Location objects and Leak Id objects to an RFC to open a list screen from IW39, List Maintenance Order transaction, for display of each at one pass, as well as open Excel with data from classification for the Leak Id's.

Hope this sheds some light on the problem I am having. Please let me know if more information is needed.

Best regards,

Mark