cancel
Showing results for 
Search instead for 
Did you mean: 

StackOverflowError at SimpleSessionRefProvider.getCurrentSessionReference

Former Member
0 Kudos

When I execute these lines of code:


34: connection.connect();
35: JCoFunction function = connection.getFunction(Z_A_PROVIDE_TCURX);
36: if(function == null) {
37:      throw new RuntimeException(Z_A_PROVIDE_TCURX + " not found in SAP.");
38: }     
39: connection.executeFunction(function, false);

I keep getting the following Error:

java.lang.StackOverflowError
	at com.sap.conn.jco.rt.SimpleSessionRefProvider.getCurrentSessionReference(SimpleSessionRefProvider.java:22)
	at com.sap.conn.jco.rt.DefaultJCoRuntime.getRuntimeContext(DefaultJCoRuntime.java:159)
	at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1168)
	at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1156)
	at com.sap.conn.jco.rt.AbapFunction.execute(AbapFunction.java:302)
	at de.firstdata.dao.sap.impl.JcoConnection.executeFunction(JcoConnection.java:110)
	at de.firstdata.dao.sap.impl.JcoConnection$$FastClassByCGLIB$$ea6a3f2f.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
	at de.firstdata.dao.sap.impl.JcoConnection$$EnhancerByCGLIB$$60d0829.executeFunction(<generated>)
	at de.firstdata.dao.sap.impl.JcoCurrencyManager.getCurrencyDecimalPlaces(JcoCurrencyManager.java:39)

Does someone know what's going on here?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

de.firstdata.dao.sap.impl.JcoConnection.executeFunction(JcoConnection.java:110)

is the more interesting part to look at.

Which JCo version/patch level are you using?

What is your setting for -Xss?

Is there any thread switching in your application?

Did you register an own SessionReferenceProvider?

Former Member
0 Kudos

I solved the Problem with switching from the IBM JDK 1.5 SR10 to IBM JDK 1.5 SR3.

But regarding to your questions, here are my answers:

- I am using the Jco 3.0.3 for Intel. I do not use the -XSS setting, for what is that good for?

- The current code is running within a scheduler thread.

- I did not register an own SessionReferenceProvider.

Former Member
0 Kudos

The first thing you should do, is always to upgrade to the latest JCo patch level. This is currently 3.0.5.

The -Xss command line option is for setting the maximum stack size (which would be interesting on StackOverflowErrors).

Answers (0)