Observations
Users observe errors in the JOC Cockpit log about an "Invalid parameter index".
- Such errors occur when navigating in the JOC Cockpit or when executing specific jobs, e.g. the
/sos/dailyplan/CreateDailyPlan
job.
Explanations
- This error is due to a bug in the jTDS JDBC Driver when using a "top" expression. At the time of writing this bug seems not be resolved.
- This error occurs with SQL Server 2012 and later.
Resolution
- Adjust the SQL Server dialect setting in your hibernate configuration file to SQL Server 2012
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
should be<property name="hibernate.dialect">org.hibernate.dialect.SQLServer2012Dialect</property>
- The resolution has to be applied to
./resources/joc/jobscheduler.hibernate.cfg.xml
./resources/joc/reporting.hibernate.cfg.xml
- The JOC Cockpit installer specifies the default dialect
org.hibernate.dialect.SQLServerDialect
, therefore any changes have to be manually applied.
References