cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Error

Former Member
0 Kudos

<b>My scenario is sending data from Proxy to JDBC. While testing this scenario I am getting no error in SXMB_MONI at XI ....nd also getting the sucessfull message also

but on checking RWB i saw..</b>

Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ERS' (structure 'insert'): java.sql.SQLException: ORA-00928: missing SELECT keyword

<b>I am inserting the value in Table but i don't know why it is saying that "SELECT Keyword missing."</b>

Receiver Structure of Table also seems to be o.k to me..

Regards.,

Accepted Solutions (0)

Answers (10)

Answers (10)

Former Member
0 Kudos

Hi Guys,

Finally i resolved ..

Since for the sender data type(and hence msg type,and also i was using that for proxy generation) i was not using the namespace but was using the namespace for receiver side..

At the time of message mapping message types were also mapped..but since no namespace was coming from Sender Message ..so it was throwing the error in RWB..

Hope it will help others also..

Regards,

Former Member
0 Kudos

Hi Guys,

Finally i resolved ..

Since for the sender data type(and hence msg type,and also i was using that for proxy generation) i was not using the namespace but was using the namespace for receiver side..

At the time of message mapping message types were also mapped..but since no namespace was coming from Sender Message ..so it was throwing the error in RWB..

Hope it will help others also..

Regards,

Former Member
0 Kudos

Any Suggestions..?

Former Member
0 Kudos

Anil,

As you correctly pointed out on checking that particular communication channel i found out that <b>no data is being passed through the Communication channel</b> for this scenario ( but for another scenario also i am using the same communication channel, there it is passing the data ) but i can see the data in SXMB_MONI of XI.

Don't know where is the issue..?

Regards,

Former Member
0 Kudos

anil,

I did what you have said...but how it will help me..?where can i see extra info..

regrads,

former_member189418
Participant
0 Kudos

In the runtime work bench message monitoring select the message and view its details....it will display the query there.

Former Member
0 Kudos

I checked again my action attribute is mapped with INSERT(constant) and to me structure seems o.k..

Any suggestions..

Regards,

former_member189418
Participant
0 Kudos

Hi Santosh,

Can u plz check the query that is generated by the adapter in the Runtime Workbench. u can do this by configuring the additional parameter for the JDBC adapter.

Additional parameter:logSQLStatement

Value: true

Anil

ranjit_deshmukh
Active Participant
0 Kudos

please post your mapping text preview here here so that it will be clear

what r u assigning to 'access'

please refer

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

for clarification

in it the last example

<root>

<stmt>

<Customers action="SQL_DML">

<access> UPDATE Customers SET CompanyName=’$NAME$’, Address=’$ADDRESS$' WHERE CustomerID='$KEYFIELD$’

</access>

<key>

<NAME>Company</NAME>

<ADDRESS>Street 3 </ADDRESS>

<KEYFIELD>CO</KEYFIELD>

</key>

</Customers>

</stmt>

</root>

helped me in my last project.

Ranjit

Former Member
0 Kudos

Just cross check your JDBC message fromat, it should have an attribute

action and map the constant "SELECT" in it,

Thanks

Farooq.

Former Member
0 Kudos

if you want to chek current XML message that is Adapter (JDBC) is trying to parse..then just go to Communication Channel Monitoring-->Select your Adapter type, name and Sender.

Then chek the details of the message and content of the Message.

Thanks

Farooq.

prabhu_s2
Active Contributor
0 Kudos

is the DB Action node is defined as attribute?

aashish_sinha
Active Contributor
0 Kudos

Hi,

try using you xslt like this. and also check if you are able to insert the data directly to the table at database to see the structure and follow like this for your xsl...

<StatementName4>

<dbTableName action=”SELECT”>

<table>realDbTableName</table>

<access>

<col1/>

<col2/>

<col3/>

</access>

<key1>

<col2>val2old</col2>

<col4>val4</col4>

</key1>

<key2>

<col2>val2old2</col2>

</key2>

</dbTableName>

</StatementName4>

action=SELECT

Statements with this action cause existing table values to be selected. Therefore, the statement corresponds to an SQL SELECT statement.

The <access> block contains the column names to be selected, a <key> element contains the columns whose values must be identical with the specified value to get the new column values. The name of the <key> element is arbitrary. Column values within a <key> element are combined with a logical AND; different <key> elements are combined with a logical OR.

A statement with the action SELECT must have exactly one <access> element. The number of <key> elements with arbitrary names is not restricted.

The corresponding SQL statement for StatementName4 in the example above is as follows:

SELECT col1,col2,col3 FROM dbTableName WHERE ((col2=’val2old’ AND col4=’val4’) OR (col2=’val2old2’))

If there is no <key> element, or if there is a <key> element but it is empty, then no condition is specified and the entire table is to be selected. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.

The response document contains the result of the action in XML format as follows:

<row>

<column1>value11</column1>

<column2>value12</column2>

...

</row>

...

<row>

<column1>valueN1</column1>

<column2>valueN2</column2>

...

</row>

Hope this will help you.

Regards

Aashish Sinha

PS : reward points if helpful