cancel
Showing results for 
Search instead for 
Did you mean: 

jdbc lookup problem

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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());

}

}

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Amit,

I have rechecked my CC configurations. These r Ok.

What do u mean by " channel is defined to handle sync call"?

For lookup, is there anything required except creating the receiver CC

Any more comments??

Thanks,

Shabari

Former Member
0 Kudos

Hi ,

Make sure you have given correct Communication channel and business system name and the communication channel is active ( green in adapter monitor). Also put try catch in your lookup code .

Thanks ,

Suvarna

Award pts if it helps .