cancel
Showing results for 
Search instead for 
Did you mean: 

Error calling receiving JDBC adapter

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

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

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

bhavesh_kantilal
Active Contributor
0 Kudos

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

former_member187339
Active Contributor
0 Kudos

Hi,

Try mentioning <b>TABLE </b>as <b>table</b>

Regards

Suraj

Former Member
0 Kudos

Hi Jason,

Your structure needs to be in this format:

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Regards

Vijaya