Skip to Content
0
Former Member
Feb 27, 2009 at 03:06 AM

SAPJCo3 JCoServer restart error

96 Views

Hello All,

I happened an error when I want to restart my JCoServer.

I used the SAPJCo3's sample code StepByStepServer.java. After I set the connection properties into the connectPorperties object. then I used step3SimpleTRfcServer() method to start JCoServer thread. After that I write a snippet code:

-


try {

Thread.sleep(1000);

} catch (InterruptedException e) {

e.printStackTrace();

}

server.stop();

while(server.getState() != JCoServerState.STOPPED){

try {

Thread.sleep(1000);

System.out.println("Stopping the server");

} catch (InterruptedException e) {

e.printStackTrace();

}

}

server.release();

server.removeThroughput();

-


Later on, I used step2SimpleServer() method to restart the JCoServer. but I happen an error:

Exception in thread "main" java.lang.NullPointerException

at java.util.Hashtable.get(Hashtable.java:336)

at com.sap.conn.jco.rt.DefaultServerManager.addServer(DefaultServerManager.java:130)

at com.sap.conn.jco.rt.DefaultServer.addListener(DefaultServer.java:251)

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

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

at StepByStepServer.step2SimpleServer(StepByStepServer.java:175)

at StepByStepServer.main(StepByStepServer.java:311)

Because I can't read the source code of JCo3, I don't know how to restart the JCoServer.

Could everybody pleased tell me how to solve the issue

Edited by: Augustus Octavianus on Feb 27, 2009 4:06 AM

Edited by: Augustus Octavianus on Feb 27, 2009 4:16 AM

Edited by: Augustus Octavianus on Feb 27, 2009 4:16 AM