on 08-01-2006 9:52 AM
Hi
i am Java Developer. I must develop existing project. This is a web project which based on Cocoon. Wenn i fill up the fields and click submit an error occured, but the datas are saved in SAP-System.
An error occurred
Exception in ServerPagesGenerator.generate()
details from
source org.apache.cocoon.ProcessingException description org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate():
com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Trying to access row values in a table which does not
have any rows yet extra info
Original exception : com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Trying to access row values in a
table which does not have any rows yet
at com.sap.mw.jco.JCO$Record.checkRowCapacity(JCO.java:11347)
at com.sap.mw.jco.JCO$Record.getString(JCO.java:11756)
at com.sap.mw.jco.JCO$Record.getString(JCO.java:13051)
at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:258)
at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)
at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:395)
Can somebody help me to solve this problem. This is very urgent.
Thanks in advance,
Dami
check below link it may be useful to u to analysis this error:
https://media.sdn.sap.com/javadocs/NW04/SPS15/jc/com/sap/mw/jco/JCO.PoolManager.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you don't give the values for the import parameters.
Your code
public JCO.Function executeSapFunction(JCO.Function func) {
boolean hasToConnect = client == null;
if (connectToSap()) {
client.execute(func);
if (hasToConnect) this.closeConnectToSap();
return func;
}
else {
return null;
}
}
Add the black line to set the import parameters (of course you need to pass the value via the arguments of the method) :
public JCO.Function executeSapFunction(JCO.Function func) {
boolean hasToConnect = client == null;
if (connectToSap()) {
<b>func.getImportParameterList().setValue(<import parameter value>, <import parameter name>);</b>
client.execute(func);
if (hasToConnect) this.closeConnectToSap();
return func;
}
else {
return null;
}
}
Gopi
Could paste your Code here for the view ??
Thanks
Jack
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jack,
i think, this is the right code, which do you want. Is this code enough???
Thanks in advace,
Dami
public SapLeistungsabrechnung(String mandant, String userid,String password,String language,String hostname,String systemNo, String logPath) {
props = new java.util.Properties();
clearError();
if (mandant == null) {
errorId = 200;
}
else {
props.setProperty("jco.client.client",mandant);
}
if (hostname == null) {
errorId = 201;
}
else {
props.setProperty("jco.client.ashost",hostname);
}
if (userid == null) {
errorId = 203;
}
else {
props.setProperty("jco.client.user",userid);
}
if (password == null) {
errorId = 204;
}
else {
props.setProperty("jco.client.passwd",password);
}
if (language == null) {
language = "de";
}
props.setProperty("jco.client.lang",language);
if (systemNo == null) {
errorId = 202;
}
else {
props.setProperty("jco.client.sysnr",systemNo);
}
this.logPath = logPath;
}
public boolean connectToSap() {
boolean result = true;
if (client == null) {
try {
client = JCO.createClient(props);
client.connect();
repository = JCO.createRepository("TimeSystem", client);
System.out.println("Opened Connection to Sap " + " on host " + client.getASHost() + " system no. " + client.getSystemNumber() + " client " + client.getClient() );
}
catch (JCO.Exception jex) {
errorId = 206;
stack = jex.getClass().getName() + " " + jex.getMessage();
client = null;
result = false;
}
catch (Exception ex) {
errorId = 207;
stack = ex.getClass().getName() + " " + ex.getMessage();
client = null;
result = false;
}
}
else {
result = true;
}
return result;
}
public boolean closeConnectToSap() {
boolean result = true;
try {
// Client
if (client != null) {
client.disconnect();
client = null;
repository = null;
System.out.println("Closed Connection to Sap");
}
}
catch (JCO.Exception ex) {
errorId = 208;
stack = ex.getClass().getName() + " " + ex.getMessage();
result = false;
}
finally {
return result;
}
}
public JCO.Function getSapFunction(String functionName) {
boolean hasToConnect = client == null;
if (connectToSap()) {
// Get a function template from the repository
IFunctionTemplate ftemplate = repository.getFunctionTemplate(functionName);
System.out.println("got template " + functionName);
if (hasToConnect) this.closeConnectToSap();
// Create a function from the template
return new JCO.Function(ftemplate);
}
else {
return null;
}
}
public JCO.Function executeSapFunction(JCO.Function func) {
boolean hasToConnect = client == null;
if (connectToSap()) {
client.execute(func);
if (hasToConnect) this.closeConnectToSap();
return func;
}
else {
return null;
}
}
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.