on 06-09-2008 11:58 AM
In my scenario i am using DB LOOK UPS IN UDF...
i am executing a select query with where clause..
i refered the below blogs..
Lookupu2019s in XI made simpler
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2219] [original link is broken] [original link is broken] [original link is broken];
i used JDBC receiver adapter only..
In a Bys System / Bys Serveice..
i am getting error , when i tested in Test mapping..
com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel DBase_CC (Party: , Service: BD1, Object ID: 0dcb4ab2b9533d6c8b7e77e0c32f3fc1) XI AF API call failed. Module exception: Error ACK handling failed: java.lang.NullPointerException. Cause Exception: (No information available).
Regards
AjayP
This error occurs in your message mapping when your mapping doesnt produce a target element that has been mapped. Check your message mapping. If there are more than one occurrence in the target , then a value has to be present in runtime for each of the occurrence.
regards
chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
At first glance it seems it can get the channel or the accessor, anyway
in order to see where the problem raised out, I would put some trace code in the UDF:
Channel channel = null;
DataBaseAccessor accessor = null;
String Query =" ";
DataBaseResult resultSet = null;
//trace
AbstractTrace trace;
Query = "Select USRID from GODB.BATCHTABLES where BID = '" + BID[0] + "' and SESSIONID = '" + SESSIONID[0] +"' and GROUPID = '" + GROUPID[0] +"'";
try{
//trace istance
trace = container.getTrace();
//trace to display query
trace.addInfo("Query string:" + Query);
channel = LookupService.getChannel("BD1","DBase_CC");
//trace to check if the channel exsits
if(channel == null){
trace.addInfo("Cannot find the channel");
}
accessor = LookupService.getDataBaseAccessor(channel);
//trace to check if the accessor exsits
if(accessor == null){
trace.addInfo("Accessor object null");
}
resultSet = accessor.execute(Query);
//trace to check if the resulset exsits
if(resultSet == null){
trace.addInfo("Resulset null");
}
for(Iterator rows = resultSet.getRows();rows.hasNext();)
{
Map rowMap = (Map)rows.next();
result.addValue((String)rowMap.get("USRID"));
}
}
catch(Exception ex){
result.addValue(ex.getMessage());
}
finally{
try{
if (accessor!=null) accessor.close();
}
catch(Exception e){
result.addValue(e.getMessage());
}
}.
Then set the trace level to "All", and test it.
Another useful thing to do is to go to CC monitoring and see if there is further log info.
Regards,
Emiliano
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Emiliano & Ajay,
I am having the same requirement but my problem is i have the scenario RFC - SOAP and i need to query the DB for a particular filed in the SOAP structure as source and get the response back from the DB and map it to the target field in the RFC structure in the response mapping.
Is it possible to do it with out defining the DB structure in XI? any help or suggestions would be appreciated
Thanks,
Srini
Hi Srini,
it is possible to do that by following the weblog
[Lookupu2019s in XI made simpler|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2219] [original link is broken] [original link is broken] [original link is broken];
first of all you need to create a JDBC channel towards the DB.
When you map the response of the WebService, you need
to implement an UDF to get the channel for having the connection to the DB and make the query.
Regards,
Emiliano
Hi Emiliano,
Thanks for the quick reply and i have followed the web blog and i am getting the following error.
Problem when calling an adapter by using communication channel CC_JDBC_Reciver (Party: , Service: Srini_DEV, Object ID: d961bebff36a35bd9bd199e79be91a7b) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'jdbc:microsoft:sqlserver://XXX:1443;DatabaseName=WEBSERVICES01': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver'
any help would be appreciated
Thanks,
Srini
Edited by: srinivas kapu on Jun 9, 2008 8:16 AM
Edited by: srinivas kapu on Jun 9, 2008 8:17 AM
Edited by: srinivas kapu on Jun 9, 2008 8:18 AM
thats the JDBC driver,did you install the drivers using SDM properly?
also have a look at the following
the error details is :
Module exception: 'Error ACK handling failed: java.lang.NullPointerException'. Cause Exception: (No information available).
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.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java(Compiled Code))
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java(Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java(Inlined Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java(Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java(Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java(Compiled Code))
at com.sap.engine.services.httpserver.server.Client.handle(Client.java(Inlined Compiled Code))
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java(Compiled Code))
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java(Compiled Code))
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java(Compiled Code))
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java(Compiled Code))
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java(Compiled Code))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is timeout issue is never easy to solve.
For starters, have a look in your listener.ora file on the server where the database resides. See if you have the following parameters in your file:
CONNECT_TIMEOUT_LISTENER and CONNECT_TIMEOUT, if you set them both to 0 it will wait indefinately. Also have a look at network congestion at the time the timeouts occur.
http://en.allexperts.com/q/Oracle-1451/Solve-Time-problems.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My UDF has 3 input fields :-
the code which i used is :
Channel channel = null;
DataBaseAccessor accessor = null;
String Query =" ";
DataBaseResult resultSet = null;
Query = "Select USRID from GODB.BATCHTABLES where BID = '" + BID[0] + "' and SESSIONID = '" + SESSIONID[0] +"' and GROUPID = '" + GROUPID[0] +"'";
try{
channel = LookupService.getChannel("BD1","DBase_CC");
accessor = LookupService.getDataBaseAccessor(channel);
resultSet = accessor.execute(Query);
for(Iterator rows = resultSet.getRows();rows.hasNext();)
{
Map rowMap = (Map)rows.next();
result.addValue((String)rowMap.get("USRID"));
}
}
catch(Exception ex){
result.addValue(ex.getMessage());
}
finally{
try{
if (accessor!=null) accessor.close();
}
catch(Exception e){
result.addValue(e.getMessage());
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.