on 11-14-2008 3:38 PM
Hi All,
This is my scenario...
SAP - IDOC(WINVE03 - Inventory) to MS-SqlServer 2000.
I followed this blog:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
which help me a lot....
but.. when test the interfase it shows a null...
the resultSet.getRows() is empty... so the "for" is never executed.
the communication channel Monitoring says this.
Success Receiver JDBC adapter: processing started; QoS required: BestEffort
Success JDBC adapter receiver channel svr_Dgmo_pilog0205_jdbc_client2: processing started; party , service SERVICE_OF_TEST
Success Database request processed successfully
channel is ok... the database has data...
regards.
check the query if possible? try to run the query on db and see if any results returned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure that the "for" loop is never executed ? Maybe you could add some piece of debug code in order to see what happens exactly (using the XI debug message framework in mappings), like :
for(Iterator rows = resultSet.getRows();rows.hasNext();){
HERE, add a print debug message so you know where for gets executed
Map rowMap = (Map)rows.next();
HERE, add a print debug message to get the return value from (String)rowMap.get("URole")
result.addValue((String)rowMap.get("URole"));
}
According to lookup API specs, if rowMap.get("URole") contains a SQL NULL value, a null java object will be returned, so the (String) cast would return "null" in this case ...
Rgds
Chris
Hi,
well, i think have found the problem...
result.addValue((String)rowMap.get("id")); trigger a exception(ex)......
so... put the exception in the result and it gave me a NULL... something like this...
result.addValue("EX" + ex);
and result is EXnull...
that means than my query doesn't return a valid row from the SQL... why??? if it has data???????? and the query is ok (execute this on the data base and works)...
Regards and Thanks.
mmm may be this could help us...
in SQL server... the field ID is PK, type numeric, and autoincrement...
the return of lookup says ... "java.lang.ClassCastException"...
but if I change this field by "LOTE" it bring to me the value correctly...
it looks good for now.
result.addValue((String)rowMap.get("id")) => java.lang.ClassCastException
result.addValue((String)rowMap.get("lote")) => ok
Regards
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.