cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Lookup for Update/Insert

Former Member
0 Kudos

Hi,

we're using the Mapping-Lookup-feature for select-statements - it works very fine.

If we use an insert- or update-statement instead, we get an exception.

The defined update-statement is executed and the result is saved in the database.

Although an exception is thrown.

We have installed SP13 and are using the oracle.jdbc.driver.OracleDriver, jdbc:oracle:thin:@dbserver:port:SID.

public tstDBUpdate(String a,Container container)

{

Channel channel = null;

DataBaseAccessor accessor = null;

DataBaseResult resultSet = null;

String QueryUpdateTable = "UPDATE <ourtable> SET STATUS='a' WHERE MSGID = '" + glMsgId + "'";

try {

channel = LookupService.getChannel("XISendungsVerwaltung_Entw","DBLookUpService");

accessor = LookupService.getDataBaseAccessor(channel);

resultSet = accessor.execute(QueryUpdateTable);

}

catch(Exception ex){

return(ex.getMessage());

}

}

Exception during processing the payload.Problem when calling an adapter by using communication channel DBLookUpService (Party: , Service: XISendungsVerwaltung_Entw, Object ID: bb40ab6101fe3a4f824a3901bceed877) XI AF API call failed. Module exception: (No information available). Cause Exception: &apos;Error processing request in sax parser: Error when executing statement for table/stored proc. &apos;table&apos; (structure &apos;statement&apos;): java.sql.SQLException: ORA-00900: invalid SQL statement

&apos;.

com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel DBLookUpService (Party: , Service: XISendungsVerwaltung_Entw, Object ID: bb40ab6101fe3a4f824a3901bceed877) XI AF API call failed. Module exception: (No information available). Cause Exception: &apos;Error processing request in sax parser: Error when executing statement for table/stored proc. &apos;table&apos; (structure &apos;statement&apos;): java.sql.SQLException: ORA-00900: invalid SQL statement

&apos;.

at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:131)

at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)

at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)

at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)

at com.sap.aii.ib.server.hmi.HmiServiceImpl.invokeMethod(HmiServiceImpl.java:132)

at com.sap.aii.ib.server.hmi.HmiServer.process(HmiServer.java:237)

at com.sap.aii.ib.web.hmi.HmiServlet.processRequestByHmiServer(HmiServlet.java:290)

at com.sap.aii.ib.web.hmi.HmiServlet.processRequestByHmiServer(HmiServlet.java:205)

at com.sap.aii.ib.web.hmi.workers.InternalClient.doWork(InternalClient.java:73)

at com.sap.aii.ib.web.hmi.HmiServlet.doWork(HmiServlet.java:563)

at com.sap.aii.ib.web.hmi.HmiServlet.doPost(HmiServlet.java:699)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)

Root Cause:

com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: (No information available). Cause Exception: &apos;Error processing request in sax parser: Error when executing statement for table/stored proc. &apos;table&apos; (structure &apos;statement&apos;): java.sql.SQLException: ORA-00900: invalid SQL statement

&apos;.

at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214)

at com.sap.aii.af.service.api.AdapterAccess.execute(AdapterAccess.java:283)

at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:123)

at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)

at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)

at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)

at com.sap.aii.ib.server.hmi.HmiServiceImpl.invokeMethod(HmiServiceImpl.java:132)

at com.sap.aii.ib.server.hmi.HmiServer.process(HmiServer.java:237)

at com.sap.aii.ib.web.hmi.HmiServlet.processRequestByHmiServer(HmiServlet.java:290)

at com.sap.aii.ib.web.hmi.HmiServlet.processRequestByHmiServer(HmiServlet.java:205)

at com.sap.aii.ib.web.hmi.workers.InternalClient.doWork(InternalClient.java:73)

at com.sap.aii.ib.web.hmi.HmiServlet.doWork(HmiServlet.java:563)

at com.sap.aii.ib.web.hmi.HmiServlet.doPost(HmiServlet.java:699)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)

Any ideas?

Thanks and Regards,

Martin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Martin

ORA-00900 means

" Cause: The statement is not recognized as a valid SQL statement."

Try to check the whole string QueryUpdateTable.

You can create a simple function

public String tstDBUpdate(String a,Container container)

{

String QueryUpdateTable = "UPDATE <ourtable> SET STATUS='a' WHERE MSGID = '" + glMsgId + "'";

return QueryUpdateTable;

}

and use this function instead of your one in the mapping. Then you'll see full SQL statements in result document.

You can try to execute these statements manually or it might be that the reason will be obvious after that.

Best regards,

Dmitry Yankovsky

Former Member
0 Kudos

Hi Dmitry,

thanks for your response.

I checked the sql-statements with sqlplus. But they are ok.

The sql-statements work also in the mapping.

I can see the changes in the database.

The only incorrect thing is the exception, which is thrown after executing the sql-statement.

So I cannot detect the real result of the operation, f.e. "update_count".

Best regards

Martin

Answers (0)