cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC adapters

Former Member
0 Kudos

We are encountering a stranger error with JDBC adapter. When we are using JDBC receiver to insert rows in XI, it works fine.. But we are running into problems when we change the colums in the DB table.. We get column not found error.. And actually when the name of DB table was changed and mapping changed accordingly, it worked.

Anybody encountered this issue before? we are testing against sybase db.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you change the DB Name there is no change in the structure of message, where as if you change any column the message struture will change.That is why you got the error "<i>column not found</i> ".

You have to change Datatype and Messagetype according to the new DB structure.

regards

Mahesh

Former Member
0 Kudos

We added a new column to the Data type and by extension to the Message type. Do I need to re-activate the message type?

My output payload contains the new column name.. But still the JDBC adapter fails giving invalid column name...

Former Member
0 Kudos

Hi ,

Try deactivating and again activating the JDBC adapter .. this might work.

Shree

bhavesh_kantilal
Active Contributor
0 Kudos

Hi ,

Normally it is not needed. But, just try actiavting it again and checking it.

Also, activate your adapter.

Regards,

Bhavesh

moorthy
Active Contributor
0 Kudos

SSG,

Once you change the Message Type , you need to reactivate/create Mapping once again and activate the same. Because Strcuture change in the Message type will lead to mapping error.

Hope this helps,

Moorthy

Former Member
0 Kudos

I haven't had a chance to test this yet... But I will keep you posted, once i re-activate the adapter and test it again.

ChadRichardson
Participant
0 Kudos

If you are changing the structure of a database table that you previously had mapped, you will need to stop the corresponding adapter and restart it before XI will pickup the new structure.

We've seen this many times. XI must somewhere cache the current table structure and doesn't refresh it until next start up.

Hope this helps,

Chad

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

hi SSG,

<i>But we are running into problems when we change the colums in the DB table.. We get column not found error</i>

The names you give for your Datatype for insertion in the JDBC receiver adapter should match exactly with coulumn name of the table you are trying to insert to.

the reason is that , the content of the JDBC adapter is converted into a SQL query by the coresponding Driver.

Consider this example,

<i><root>

<StatementName1>

<dbTableName action=”INSERT”>

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2new</col2>

</access>

</dbTableName>

</StatementName1>

</root></i>

This is converted into, <b>insert into realDbTableName(col1,col2) values(val1,val2new)</b>

So, if you change the column name in the Database, the corresponding change has to be made in the Datatype for JDBC else, the column will not be indentified when trying the insertion.

Regards,

Bhavesh