JasperStarter和SQL Server错误找不到带句柄的已准备语句


JasperStarter and SQL Server error Could not find prepared statement with handle

我们正在尝试在基于PHP的应用程序上运行iReport。我们将Ubuntu Server与php5一起使用,并使用laravel框架和

我们正在运行SQL Server 2012数据库。

输入此后

jasperstarter myReport.jasper 
-f pdf 
-P parameter1=test 
-t generic 
-H <my databse server ip> 
-u <username>
-p <password>
-n <dbname>
--db-driver com.microsoft.sqlserver.jdbc.SQLServerDriver  
--db-url jdbc:sqlserver://<my databse server ip>:1433

我们得到一个空的pdf和

当我运行sqlProfiler:时,我们收到了这个错误

sql:

declare @p1 int
set @p1=1
exec sp_prepexec @p1 output,NULL,N'select top 10 * from mytable'
select @p1
exec sp_unprepare 1

错误:

Msg 8179, Level 16, State 6, Procedure sp_prepexec, Line 1
Could not find prepared statement with handle 1.

经过几天的痛苦,现在我已经解决了这个问题。

我不知道添加sqljdbc驱动程序时是否做错了。

我将驱动程序更改为jtds-jdbc驱动程序,它的工作方式很有魅力。

Tq