on 06-14-2007 10:27 AM
Hi all,
While trying to do JDBC lookup in a file - to file scenario, i m getting the following error:
Put value [Exception during processing the payload.Problem when calling an adapter by using communication channel LookupReciever (Party: , Service: Sheetal_BS, Object ID: 9bf6e3ebda8b3f8593f29cea8eacd994) XI AF API call failed. Module exception: 'Error ACK handling failed: java.lang.NullPointerException'. Cause Exception: (No information available). com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel LookupReciever (Party: , Service: Sheetal_BS, Object ID: 9bf6e3ebda8b3f8593f29cea8eacd994) XI AF API call failed. 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)
Please help me out!!
Thanks,
Shabari
Hi shabari,
Error should be in your query in the user defined function.Please check for the quotes in the select statement because you ight miss the single quotes.Here is my code.
//write your code here
String Query = " ";
Channel channel = null;
DataBaseAccessor accessor = null;
DataBaseResult resultSet = null;
//Build the Query String
Query = "Select role from login where username ='" + username[0] + "' and password ='" + password[0] +"'" ;
try{
//Determine a channel as created in the configuration
channel = LookupService.getChannel("JLU_BUSS","JLU_chan");
// Get a system accessor for a channel.As the call is being made to the database an database accessor is obtained.
accessor = LookupService.getDataBaseAccessor(channel);
// Execute the Query and get the values in the resultSet.
resultSet = accessor.execute(Query);
for(Iterator rows = resultSet.getRows();rows.hasNext();)
{
Map rowMap = (Map)rows.next();
result.addValue((String)rowMap.get("role"));
}
}
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.
HI shabari,
Please chk yr look up code and verify that you have given the correct JDBC Com Channel name and the channel is defined to handle sync call
I think you have either not defined the CC or its not defined sync
Regards
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.