on 06-15-2006 9:25 AM
When sending a message to a receiving JDBC adapter connected to an Informix database I get the following error in the adapter trace:
- 2006-06-15 18:04:17 EST: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ximaterialmaster' (structure 'statements'): java.lang.NullPointerException
The payload that is being sent to the JDBC adapter is:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_jdbc_test00 xmlns:ns0="http://asics.com.au/wm">
<statements>
<ximaterialmaster action="INSERT">
<TABLE>ximaterialmaster</TABLE>
<access>
<ximmdocno>0000000000001094</ximmdocno>
<ximmitemno>001</ximmitemno>
<ximmmaterialno>TN600.1907</ximmmaterialno>
<ximmsize>test</ximmsize>
<ximmscheddate>test</ximmscheddate>
<ximmquantity>test</ximmquantity>
<ximmorderno>test</ximmorderno>
<ximmorderdate>order</ximmorderdate>
</access>
</ximaterialmaster>
</statements>
</ns0:mt_jdbc_test00>
I have run a insert statement successfully on the database when logging in manually:
INSERT INTO ximaterialmaster
(ximmdocno, ximmitemno, ximmmaterialno, ximmsize, ximmscheddate, ximmquantity, ximmorderno, ximmorderdate)
VALUES ('0000000000001094', '001', 'TN600.1907', 'test', 'test',
'test', 'test', 'order');
My settings for the JDBC adapter are:
JDBC Driver: com.informix.jdbc.IfxDriver
Transport Protocol: JDBC 2.0
Message Protocol: XML SQL Format
Connection String: jdbc:informix-sqli://192.168.10.1:1526:informixserver=instance1
I am running XI 7.0 (Netweaver 2004S).
Before sending a message, the JDBC adapter seems to connect to the database fine.
Does anybody have any suggestions of things I can try to resolve this problem? Thanks in advance for any assistance you can provide.
Regards,
Jason
Hi,
The tablename being passed <b>ximaterialmaster</b>. Pass it in CAPITALS and it will work fine.
Likewise, make all the column names also in CAPITALS if it still does not work.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK problem is resolved.
The issue was a missing database name (dbname) in the connection string:
jdbc:informix-sqli://192.168.10.1:1526/dbname:informixserver=instance1
To trace from a "NullPointer exception in the SAXParser" was not easy. In the end to resolve it, I changed my XML to send to a SQL_DML direct call using the insert statement that I had tested manually. When I did this, I got an error in the adapter saying "SQL Exception: No database selected" or something along those lines. After specifying the database name in the connection string, I reran both tests and they worked successfully.
I had to change all the table field names back to lowercase - when I had them as uppercase I got an SQL error saying the fields were unknown.
An example of my working XML SQL is:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_jdbc_test00 xmlns:ns0="http://customer.com.au/wm">
<StatementName1>
<dbTableName action="INSERT">
<table>XIMATERIALMASTER</table>
<access>
<ximmdocno>0000000000001129</ximmdocno>
<ximmitemno>Test</ximmitemno>
<ximmmaterialno>TN600.5091</ximmmaterialno>
<ximmsize>Test</ximmsize>
<ximmscheddate>Test</ximmscheddate>
<ximmquantity>Test</ximmquantity>
<ximmorderno>Test</ximmorderno>
<ximmorderdate>Test</ximmorderdate>
</access>
</dbTableName>
</StatementName1>
</ns0:mt_jdbc_test00>
Thank you all for your assistance.
Regards,
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your responses.
I have tried all the suggestions without success:
. Putting the table name in capitals (XIMATERIALMASTER)
. Putting the column names in capitals
. Putting the <TABLE> tag in lower case.
I have also tried changing the highest level from <statements> to <StatementName1> and the first tablename tag to <dbTableName action="INSERT"> - specifying the proper table name in the <table> tag.
Any further suggestions?
Regards,
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jason,
Might sound reptitive , but can you create the Target Datatype in exactly the same format as in the online SAP help.
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Keep column name in CAPITALS, Pass all the Data in CAPITALS ,and check for the Log entry in the JDBC adapter after making all these changes. Does it have the same entry?
Might sound stupid, but I have faced issues, when I passed some data in Small letters and others in CAPS. Just try to make it all CAPS and test the mapping and check it.
Hopefully, it should work.
Regards,
Bhavesh
Hi,
Try mentioning <b>TABLE </b>as <b>table</b>
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jason,
Your structure needs to be in this format:
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Regards
Vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.