cancel
Showing results for 
Search instead for 
Did you mean: 

Restarting JCO Server ?

Former Member
0 Kudos

Hello!

We are on JCO 3.0.9 and IDOC library 3.0.7.

Since the first JCO 3.x release we are unable to make the restarting of the server work properly.

When we get a network problem, we disconnect via:

server.stop();

and then wait in a loop until server.getState() is JCoServerState.STOPPED.

Then we call:

server.release();

and (to prevent getting NullPointerException upon restart)

StandaloneServerFactory.get().deleted(serverName);

However, when we want to restart the server we first get (9 times in a row with 10seconds between retries - so 90sec total):

com.sap.conn.jco.JCoRuntimeException: (136) JCO_ERROR_ILLEGAL_STATE: JCo server is currently running. Current server state is DEAD

        at com.sap.conn.jco.rt.DefaultServer.start(DefaultServer.java:744)

        at com.sap.conn.idoc.jco.rt.DefaultJCoIDocServer.start(DefaultJCoIDocServer.java:177)

And interestingly in next retry we get this:

com.sap.conn.jco.JCoRuntimeException: (136) JCO_ERROR_ILLEGAL_STATE: JCo server is currently running. Current server state is ALIVE

        at com.sap.conn.jco.rt.DefaultServer.start(DefaultServer.java:744)

        at com.sap.conn.idoc.jco.rt.DefaultJCoIDocServer.start(DefaultJCoIDocServer.java:177)

And after this, the server can not be started again (everytime we retry calling server.start() we get the "Current server state is ALIVE" error).

Are we doing something wrong ? What is the correct way to restart the JCO Server (after network problems, etc) ?

Accepted Solutions (0)

Answers (4)

Answers (4)

hemanth2
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tadej,

By the way new JCo 3.0.11 also has been released. You can plan a future upgrade as well.

Regards,
Hemanth

SAP AGS

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tadej,

you don't have to take care for restarts when using a JCoServer. This is handled by the JCo runtime internally.

Best regards,

Markus

sealcw
Explorer
0 Kudos

Hi,

we had a similar problem with JCo 3.0.9.

In transaction SMGW, we found several conversation IDs that belong to a gateway - JConnector connection in which there are no longer any activities: state=disconnected.

(see SAP note 1791529)

Is fixed with JCo 3.0.10 - SAP note: 1748457 - SAP Java Connector Release 3.0.10

Hope this helps.

Regards

  Christian

Former Member
0 Kudos

Hi Tadej,

Is it necessary to perform these steps?  I've read (as well as observed for other situations) that the JCo will manage the reconnection automatically.

FWIW, I've been seeing some other anomalies with the DEAD server state, and the inability for the server to stop.  It just stays in STOPPING. :*|