I am using Symfony 2.6 with SQLSRV and below is simple job creation code:
$job = new Job('myapp:test', array('test-arg'));
$em->persist($job);
$em->flush($job);
and this is throwing following error:
[2015-01-04 16:13:42] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\DBALException: "An exception occurred while executing 'INSERT INTO jms_jobs (state, queue, priority, createdAt, startedAt, checkedAt, executeAfter, closedAt, command, args, output, errorOutput, exitCode, maxRuntime, maxRetries, stackTrace, runtime, memoryUsage, memoryUsageReal, originalJob_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["pending", "default", 0, "2015-01-04 16:13:42.000000", null, null, "2015-01-04 16:13:41.000000", null, "myapp:test", "[\"test-arg\"]", null, null, null, 0, 0, "N;", null, null, null, null]: SQLSTATE [42000, 257]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query." at XXXX\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php line 119 {"exception":"[object](Doctrine\DBAL\DBALException%28code: 0%29: An exception occurred while executing 'INSERT INTO jms_jobs %28state, queue, priority, createdAt, startedAt, checkedAt, executeAfter, closedAt, command, args, output, errorOutput, exitCode, maxRuntime, maxRetries, stackTrace, runtime, memoryUsage, memoryUsageReal, originalJob_id%29 VALUES %28?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?%29' with params ["pending", "default", 0, "2015-01-04 16:13:42.000000", null, null, "2015-01-04 16:13:41.000000", null, "myapp:test", "[\"test-arg\"]", null, null, null, 0, 0, "N;", null, null, null, null]:nnSQLSTATE [42000, 257]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Implicit conversion from data type nvarchar to varbinary%28max) is not allowed. Use the CONVERT function to run this query. at XXXX\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:119, Doctrine\DBAL\Driver\SQLSrv\SQLSrvException(code: 0): SQLSTATE [42000, 257]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query. at XXXX\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\SQLSrv\SQLSrvException.php:42)"} []
I am using Symfony 2.6 with SQLSRV and below is simple job creation code:
and this is throwing following error:
[2015-01-04 16:13:42] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\DBALException: "An exception occurred while executing 'INSERT INTO jms_jobs (state, queue, priority, createdAt, startedAt, checkedAt, executeAfter, closedAt, command, args, output, errorOutput, exitCode, maxRuntime, maxRetries, stackTrace, runtime, memoryUsage, memoryUsageReal, originalJob_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["pending", "default", 0, "2015-01-04 16:13:42.000000", null, null, "2015-01-04 16:13:41.000000", null, "myapp:test", "[\"test-arg\"]", null, null, null, 0, 0, "N;", null, null, null, null]: SQLSTATE [42000, 257]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query." at XXXX\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php line 119 {"exception":"[object](Doctrine\DBAL\DBALException%28code: 0%29: An exception occurred while executing 'INSERT INTO jms_jobs %28state, queue, priority, createdAt, startedAt, checkedAt, executeAfter, closedAt, command, args, output, errorOutput, exitCode, maxRuntime, maxRetries, stackTrace, runtime, memoryUsage, memoryUsageReal, originalJob_id%29 VALUES %28?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?%29' with params ["pending", "default", 0, "2015-01-04 16:13:42.000000", null, null, "2015-01-04 16:13:41.000000", null, "myapp:test", "[\"test-arg\"]", null, null, null, 0, 0, "N;", null, null, null, null]:nnSQLSTATE [42000, 257]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Implicit conversion from data type nvarchar to varbinary%28max) is not allowed. Use the CONVERT function to run this query. at XXXX\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:119, Doctrine\DBAL\Driver\SQLSrv\SQLSrvException(code: 0): SQLSTATE [42000, 257]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query. at XXXX\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\SQLSrv\SQLSrvException.php:42)"} []