cancel
Showing results for 
Search instead for 
Did you mean: 

BD Lookup Error _ Not using the COmmunication channel!

Senthilprakash1
Participant
0 Kudos

Dear all,

I Tried to do DB Lookup as told in this blog by siva

/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

I used the below code.

I am not Getting any error, the mapping is successfully ACTIVATED. But in the Receiver field i am Getting Null as output , the DB lookup which i have mentioned is not connecting to the Database and executing and fetching the query. Just inthe receiver field its througing the Null valuse. The Required Value is not fetched by using the communication channel.

I am getting the above error when i try to TEST THE MAPPING in IR.

Below is the code i used.

SERVER:XI 3.0

SP:18

RECEIVER DATABSE: MSQL SERVER 2000

-


CODE----


-

//write your code here

String Query = "";

Channel channel = null;

DataBaseAccessor accessor = null;

DataBaseResult resultSet = null;

Query = "Select cir_id from circle where cir_sap = 'IDBL'";

try{

channel = LookupService.getChannel("<Business Service/System Name>","JDBC_channel_receiver Communication channel");

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

}

}

catch(Exception ex){

result.addValue(ex.getMessage());

}

finally{

try{

if (accessor!= null) accessor.close();

}

catch(Exception ex){

result.addValue(ex.getMessage());

}

}

*

-


END CODE----


Please help me out.

I am getting output as null. But in database value is there for cir_id where cir_sap='IDBL'.

Regards,

Prakash

Accepted Solutions (0)

Answers (2)

Answers (2)

Senthilprakash1
Participant
0 Kudos

I am closing this thread and reopining it with proper subject as i am not getting any response to my querry !

Regards,

PRakash

Former Member
0 Kudos

try to test the interface by ecexuting it....

then see in sxmb_moni and CC monitor...

Senthilprakash1
Participant
0 Kudos

As i told before i have tested the interface, its not showing any error, its Activated and throwing Null as output.

Its not fetching the value from database. In CC Monitoring also the adapter is in Green Status. No error over there. Its throwing the output as Null (Default value in the code.)

Below is the connection parameter i have used:

DRIVER:com.microsoft.jdbc.sqlserver.SQLServerDriver

CONNECTION : jdbc:microsoft:sqlserver://<IP>:1433;DatabaseName=test_db

But in the blog

/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

If u can see properly, he has mentioed some extra parameters in the JDBC Connection Parameters.

But the screenshot is not proper so i am not able to see the querry he has used in Connection parameters.

Please help

Could anyone tell how to write the Select statement in Connection Parameter for Adapter as given (Partialy in screenshot in BLOG)?

Regards,

Prakash

Edited by: senthilprakash selvaraj on Jul 1, 2008 7:33 AM