Skip to content

DirectQuerySender query without parameters fails if parameters are defined in pipe #1098

@ricardovh

Description

Describe the bug
When using a DirectQuerySender with parameters defined, it fails with the following message if the query does not require any parameters:
got exception sending message: (SQLException) SQLState [99999], errorCode [17003]: Invalid column index

In the logging this is shown:
2020-09-25 14:50:35,954 DEBUG [http-bio-80-exec-5] [mid [testmessage0a7215b8-5269be6c_174c55049bd_-7ffe]] util.JdbcUtil - jdbc parameter [1] applying parameter [ID] value [null]

Executing the same query via Execute Query does not give any problems, so it really is something with the DirectQuerySender.

The reason the DirectQuerySender has parameters but can get a query that does not require any, is because it is part of an API where all url parameters are optional. To allow database optimization, the database query is generated to only use the url parameters that are actually provided, which might result in a query without any parameters.

Reporter
Ricardo

Category
Use following Tags to categorize your bug report

  • Frank Framework

To Reproduce
Steps to reproduce the behavior:

  1. Have an adapter with 1 DirectQuerySender and at least 1 parameter
  2. Send a query via Test a Pipeline
  3. Get error

Expected behavior
The query to be executed as is.

Screenshots
N/A

Environment:

  • Application server (f.e. Tomcat/WebSphere/JBOSS/Jetty): Tomcat
  • Browser [e.g. chrome, safari]: Chrome
  • Database: Oracle
  • IAF Version [e.g. 7.5 RC3, 7.6]: 7.6-20200925.120005

Additional context
N/A

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions