cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC receiver adapter - SQLException: [SQL0104]

Former Member
0 Kudos

Hello,

I am using JDBC Receiver adapater and connecting to AS400. The statement is generated using UDF. When receiver get the statment it looks like as follows.

select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in (' 100090') and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)

I get following error. When I ran above sql in a separate java class that runs fine. Also I ran above sql in the AS400 and it works file. I am not sure what is the issue when running on XI. Please let me know.

Unable to execute statement for table or stored procedure. 'LawsonCustomer' (Structure 'Statement') due to java.sql.SQLException: [SQL0104] Token 100090 was not valid. Valid tokens: ,.

MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException: [SQL0104] Token 100090 was not valid. Valid tokens: ,.

Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException: [SQL0104] Token 100090 was not valid. Valid tokens: ,.

Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException: [SQL0104] Token 100090 was not valid. Valid tokens: ,.. Setting message to status failed.

Returning synchronous error message to calling application: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException: [SQL0104] Token 100090 was not valid. Valid tokens: ,..

Thank you,

Balaji

Accepted Solutions (1)

Accepted Solutions (1)

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Are you using stored procedure if so,, See that in the data type the parameters you have declared is Attribute and pass the Type and true for the Attribute.

Regards

Agasthuri Doss

Former Member
0 Kudos

Agasthuri,

Thank you for the reply, I am not using stored proce. I am using UDF to generate sql statement.

Thank you,

Balaji

justin_santhanam
Active Contributor
0 Kudos

Balaji,

Can u please confirm whether your UDF and comm.channel looks like the below image. You know this is the usual way I'll write code to connect to AS/400 for my interafces.It works pretty good.

Comm.channel http://www.flickr.com/photo_zoom.gne?id=1419518182&size=o

UDF -http://www.flickr.com/photo_zoom.gne?id=1419518186&size=o

raj.

Former Member
0 Kudos

Raj,

Thank you for the reply, I have almost same configuration in the communication channel except <i><b>KeyTags Mnadatory</b></i> is not checked. Unchecked this option because there is no key involved in the query.

Also conflict resolution set to error, you have Redo.

Also UDF has following select satement.

select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <b>(' 100090')</b> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)

As you see bold has some leading empty space. This another difference.

Other than this every thing lokks same.

Thank you,

Balaji

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Balaji,

What is this <b>'LawsonCustomer'</b> I couldn't able to see in your select statement. Is this is the table. Did u tried by giving apostrophe '' as mentioned in the other thread.

raj.

Former Member
0 Kudos

Raj,

Yes I gave postrophe '' as mentioned in the other thread.

LawsonCustomer is one of the the element in XML structure. The xml message structure looks like as follows.

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:http://freemanco.com/xi/Get_Customer" targetNamespace="urn:http://freemanco.com/xi/Get_Customer">

<xsd:complexType name="Cma_Customer_Select_Request">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

98a58fa0687d11dcca07000c296184a2

</xsd:appinfo>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="Statement">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

d669121049e911dcaa6d0015c543a10b

</xsd:appinfo>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

<xsd:element name="LawsonCustomer">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

d669121149e911dc997c0015c543a10b

</xsd:appinfo>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

<xsd:element name="access" type="xsd:string">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

d669121349e911dc87c50015c543a10b

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

</xsd:sequence>

<xsd:attribute name="action" type="xsd:string" use="required">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

d669121249e911dcbbe40015c543a10b

</xsd:appinfo>

</xsd:annotation>

</xsd:attribute>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

Thank you,

Balaji