Neuron ESB User Network

The Service Bus for the Connected Business

I am trying to publish a message whenever a particular column in a table is changed. I  was first going to use Oracle's Advanced Queue (AQ) which is similar to MS SQL's SQL Service Broker (SSB). Upon finding there to be no Oracle specific adapters, I've had to improvise.

I've created a table and trigger in Oracle to be used as a queue. When the column is changed, a row is inserted into the queue table with the ID, old value and new value.

I'm trying to configure an ODBC adapter in Neuron to poll this table, but keep running into difficulties. I cannot seem to find any documentation on setting up and ODBC adapter.

I have created an Adapter Registration called "ODBC Adapter". I have created an ODBC DSN for my database. I have created an Adapter Endpoint using the ODBC Adapter in Publish mode. I am able to test the connection successfully in the adapter connection properties dialog.

With my current configuration, I get the following in my logs. The table exists and can be queried from SQL*PLUS using the same credentials assigned to the ODBC DSN.

2018-07-06 10:32:04.359-06:00 [148] DEBUG - Creating the '******ChangeEndpoint' Adapter Endpoint ...2018-07-06 10:32:04.359-06:00 [148] DEBUG - Preparing to run the '******ChangeEndpoint' Adapter Endpoint under the current service identity '' ...2018-07-06 10:32:04.359-06:00 [148] DEBUG - Loading the 'ODBC Adapter' Adapter assembly for the '******ChangeEndpoint' Adapter Endpoint ...
2018-07-06 10:32:04.374-06:00 [148] DEBUG - Configuring the '******ChangeEndpoint' Adapter Endpoint for MODE 'Publish' ...
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: ConnectionString = *******************
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: VerifyConnect = True
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: Transactional = None
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: IsolationLevelString = Serializable
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: TransactionTimeout = 60
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: ConnectionTimeout = 15
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: CommandTimeout = 30
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: EnforceTypedParams = True
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: SqlEnabled = False
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: SqlCheckingEnabled = False
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: SendTopic = ******Change
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: PollingInterval = 1
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: OdbcCommandType = TableDirect
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: SelectStatement =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: SelectParameters =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: UpdateDeleteStatement =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: UpdateDeleteParameters =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: TableDirectName = *****_QUEUE
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: ForXmlClause = False
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: RootNodeName = ******ChangeMessage
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: RootNodeNameSpace =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: RowNodeName = ******Change
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: GenerateSchema = False
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: LimitRows = -1
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: DeleteTable = True
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: PublishOnNoData = False
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: RenameSourceFileExtension = dbq
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: ErrorMode = Error
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: ErrorHandling = StopPollingOnError
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: QueryRootNodeName =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: QueryRowNodeName =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: QueryRootNodeNameSpace =
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: QueryGenerateSchema = False
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: QueryLimitRows = -1
2018-07-06 10:32:04.374-06:00 [148] INFO - Property: BatchSize = -1
2018-07-06 10:32:04.374-06:00 [148] DEBUG - Connecting the '******ChangeEndpoint' Adapter Endpoint using '******ChangePublisher' Party...
2018-07-06 10:32:06.374-06:00 [287] ERROR - A general publishing error occurred in the ODBC Adapter.

THE ADAPTER WILL NOW BE DISCONNECTED.
Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.

Stack Trace:
at System.Data.Common.DbCommandBuilder.BuildInformation(DataTable schemaTable)
at System.Data.Common.DbCommandBuilder.BuildCache(Boolean closeConnection, DataRow dataRow, Boolean useColumnsForParameterNames)
at System.Data.Common.DbCommandBuilder.GetDeleteCommand(DataRow dataRow, Boolean useColumnsForParameterNames)
at System.Data.Odbc.OdbcCommandBuilder.GetDeleteCommand()
at Neuron.Esb.Adapters.OdbcAdapter.GetXMLAndDelete(OdbcCommand command, OdbcCommand deleteCommand, String rootName, String rootNamespace, Boolean generateSchema, List`1 properties, Int32& rowsReturned)
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveByTableDirect()
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveFromDatasource()
at Neuron.Esb.Adapters.OdbcAdapter.TryReceive()

System.InvalidOperationException: Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.
at System.Data.Common.DbCommandBuilder.BuildInformation(DataTable schemaTable)
at System.Data.Common.DbCommandBuilder.BuildCache(Boolean closeConnection, DataRow dataRow, Boolean useColumnsForParameterNames)
at System.Data.Common.DbCommandBuilder.GetDeleteCommand(DataRow dataRow, Boolean useColumnsForParameterNames)
at System.Data.Odbc.OdbcCommandBuilder.GetDeleteCommand()
at Neuron.Esb.Adapters.OdbcAdapter.GetXMLAndDelete(OdbcCommand command, OdbcCommand deleteCommand, String rootName, String rootNamespace, Boolean generateSchema, List`1 properties, Int32& rowsReturned)
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveByTableDirect()
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveFromDatasource()
at Neuron.Esb.Adapters.OdbcAdapter.TryReceive()

I've tried setting the Delete Table property to false, which results in the following log:

2018-07-06 10:30:09.260-06:00 [291] ERROR - A general publishing error occurred in the ODBC Adapter.THE ADAPTER WILL NOW BE DISCONNECTED.
ERROR [42S02] [Oracle][ODBC][Ora]ORA-00903: invalid table name


Stack Trace:
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Neuron.Esb.Adapters.OdbcAdapter.ProcessAdapter(DataTable dt, OdbcDataAdapter adapter, String rootNamespace, Int32 limitRowsForOutput, Boolean generateSchema, Int32& rowsReturned)
at Neuron.Esb.Adapters.OdbcAdapter.GetXMLAndDelete(OdbcCommand command, OdbcCommand deleteCommand, String rootName, String rootNamespace, Boolean generateSchema, List`1 properties, Int32& rowsReturned)
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveByTableDirect()
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveFromDatasource()
at Neuron.Esb.Adapters.OdbcAdapter.TryReceive()

System.Data.Odbc.OdbcException (0x80131937): ERROR [42S02] [Oracle][ODBC][Ora]ORA-00903: invalid table name

at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Neuron.Esb.Adapters.OdbcAdapter.ProcessAdapter(DataTable dt, OdbcDataAdapter adapter, String rootNamespace, Int32 limitRowsForOutput, Boolean generateSchema, Int32& rowsReturned)
at Neuron.Esb.Adapters.OdbcAdapter.GetXMLAndDelete(OdbcCommand command, OdbcCommand deleteCommand, String rootName, String rootNamespace, Boolean generateSchema, List`1 properties, Int32& rowsReturned)
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveByTableDirect()
at Neuron.Esb.Adapters.OdbcAdapter.ReceiveFromDatasource()
at Neuron.Esb.Adapters.OdbcAdapter.TryReceive()

Tags: ODBC Adapter, TableDirect

Views: 311

Attachments:

Reply to This

Replies to This Discussion

excellent!

RSS

Neuron ESB Product Support Forums and Communities

Latest Activity

Anupama Nair posted a discussion

Marketo Adapter Invalid Token

Hi,We are using the Marketo adapter to push account updates to Marketo. It works well for some time then starts failing with Invalid Token unless restarted. Is there a configuration that can be done so it can auto refresh the token when required?Thanks!See More
Nov 6, 2023
Sayantini Basak posted a discussion

Maximum payload size(REST API) for requests interfacing to NeuronESB

I am new to Neuron ESB and in our current scenario,We need to process batch transactions comprising of ~1000 records and send them to Neuron ESB for further processing. I would like to understand what is the maximum size of payload that can be transferred using REST interface to Neuron ESB.See More
Jul 22, 2022
Profile IconRobert E Dunie and Sayantini Basak joined Neuron ESB User Network
Apr 28, 2022
Profile IconDayanand, Frederic C, Steffen Greve-Oksfeldt and 1 more joined Neuron ESB User Network
Mar 16, 2022
Profile IconCam Vong and Mitja Luznar joined Neuron ESB User Network
Jan 27, 2022
Profile IconWill Hitzges, Chad Parsons, michael larsen and 4 more joined Neuron ESB User Network
Jun 11, 2021
Anupama Nair posted a discussion

ODBC stored proc polling with temporary tables

We have set up an ODBC adapter to poll a stored proc.We found that if the stored proc has a temporary table defined the rows returned are always 0.Any idea why this would be and what we can do to get around it?See More
Dec 14, 2020
Prasanth Kharade is now a member of Neuron ESB User Network
Dec 30, 2019

Badge

Loading…

© 2024   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service