Procedure or function expects parameter Error calling a Sql Server stored procedure

251 views
Skip to first unread message

Harsha Perera

unread,
Dec 8, 2015, 6:56:49 PM12/8/15
to dbfit
Hi,

I get the following error and stack trace  when calling a Sql Server stored procedure using DBFit:
java.lang.Error: com.microsoft.sqlserver.jdbc.SQLServerException: Procedure or function 'execute_catalog_package' expects parameter '@FolderName', which was not supplied.
at dbfit.fixture.DbObjectExecutionFixture.doRows(DbObjectExecutionFixture.java:85)
at fit.Fixture.doTable(Fixture.java:156)
at fitlibrary.traverse.AlienTraverseHandler.doTable(AlienTraverseHandler.java:18)
at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:99)
at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:87)
at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:69)
at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:34)
at fitlibrary.DoFixture.interpretTables(DoFixture.java:42)
at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:26)
at fit.Fixture.doTables(Fixture.java:81)
at fit.FitServer.process(FitServer.java:81)
at fit.FitServer.run(FitServer.java:56)
at fit.FitServer.main(FitServer.java:41)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Procedure or function 'execute_catalog_package' expects parameter '@FolderName', which was not supplied.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:332)
at dbfit.fixture.StatementExecution.run(StatementExecution.java:75)
at dbfit.fixture.DbObjectExecutionFixture.doRows(DbObjectExecutionFixture.java:66)

The DBFit code used to call the stored procedure is as follows:
!path lib/*.jar

!|dbfit.SqlServerTest|


!|Connect|jdbc:sqlserver://<db-Name>;encrypt=false;integratedSecurity=true|


|execute procedure|SSISDB.custom.execute_catalog_package|
|@FolderName|@ProjectName|@PackageName|execution_id?|@LoggingLevel|@Use32BitRunTime|@ReferenceID|@ObjectType |
|'DEV'|'DWS-BI-BestPractice-SSIS'|'STG002 - Import Penelope Catchment.dtsx'|523|'Basic'|0|NULL|50|

The signature of the procedure that is called is as follows:

Create Procedure custom.execute_catalog_package

  @FolderName nvarchar(128)

 ,@ProjectName nvarchar(128)

 ,@PackageName nvarchar(260)

 ,@ExecutionID bigint Output

 ,@LoggingLevel varchar(16) = 'Basic'

 ,@Use32BitRunTime bit = 0

 ,@ReferenceID bigint = NULL

 ,@ObjectType smallint = 50

As


I have specified the parameter FolderName and supplied the value for it.


What could be causing this error?


Best Regards

Harsha

Mark Matten

unread,
Dec 10, 2015, 6:29:20 PM12/10/15
to dbfit

Harsha Perera

unread,
Dec 10, 2015, 7:44:27 PM12/10/15
to dbfit
I get the same error.

What are the steps that we need to follow in order to debug/step through the DBFit code in our environment? 

If we can do this then we can should be able to isolate the problem.

We are using WIndows as the platform and as you may have seen we are using the MS JDBC driver to connect to SQL Server from DBFit.

Mark Matten

unread,
Dec 11, 2015, 3:02:50 AM12/11/15
to dbfit
If you're using Eclipse then you can follow the debugging instructions in this doc:

https://github.com/dbfit/dbfit/blob/master/CONTRIBUTING.md

Reply all
Reply to author
Forward
0 new messages