You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Donald Woods (JIRA)" <ji...@apache.org> on 2010/04/07 21:22:33 UTC
[jira] Created: (OPENJPA-1615) CriteriaQuery test failures on MSSQL
CriteriaQuery test failures on MSSQL
------------------------------------
Key: OPENJPA-1615
URL: https://issues.apache.org/jira/browse/OPENJPA-1615
Project: OpenJPA
Issue Type: Bug
Components: jpa
Affects Versions: 2.0.0-beta3
Reporter: Donald Woods
Fix For: 2.0.1
Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
. . .
Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
. . .
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
<openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
. . .
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
. . .
NestedThrowables:
com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-1615) CriteriaQuery test failures on
MSSQL
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods reassigned OPENJPA-1615:
-------------------------------------
Assignee: Donald Woods
> CriteriaQuery test failures on MSSQL
> ------------------------------------
>
> Key: OPENJPA-1615
> URL: https://issues.apache.org/jira/browse/OPENJPA-1615
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.0.0-beta3
> Reporter: Donald Woods
> Assignee: Donald Woods
> Fix For: 2.0.1, 2.1.0
>
> Attachments: OPENJPA-1615-trunk-skiptests.patch
>
>
> Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
> 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
> junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
> java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
> at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
> . . .
> Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
> <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> NestedThrowables:
> com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (OPENJPA-1615) CriteriaQuery test failures on
MSSQL
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856997#action_12856997 ]
Pinaki Poddar commented on OPENJPA-1615:
----------------------------------------
TestTypesafeCriteria.testFunctionWithTwoArgument() is invalid for SQLServer because CriteriaQuery function() method should refer to a valid database function and MOD() is not a valid function for SQLServer.
> CriteriaQuery test failures on MSSQL
> ------------------------------------
>
> Key: OPENJPA-1615
> URL: https://issues.apache.org/jira/browse/OPENJPA-1615
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.0.0-beta3
> Reporter: Donald Woods
> Fix For: 2.0.1, 2.1.0
>
> Attachments: OPENJPA-1615-trunk-skiptests.patch
>
>
> Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
> 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
> junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
> java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
> at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
> . . .
> Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
> <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> NestedThrowables:
> com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (OPENJPA-1615) CriteriaQuery test failures on MSSQL
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1615:
----------------------------------
Assignee: (was: Donald Woods)
So, does runtime code need to be changed to fix this? There is a solution, that we should be using "%" instead of "MOD" when using MSSQL....
> CriteriaQuery test failures on MSSQL
> ------------------------------------
>
> Key: OPENJPA-1615
> URL: https://issues.apache.org/jira/browse/OPENJPA-1615
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.0.0-beta3
> Reporter: Donald Woods
> Fix For: 2.0.1, 2.1.0
>
> Attachments: OPENJPA-1615-trunk-skiptests.patch
>
>
> Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
> 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
> junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
> java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
> at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
> . . .
> Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
> <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> NestedThrowables:
> com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (OPENJPA-1615) CriteriaQuery test failures on
MSSQL
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854666#action_12854666 ]
Donald Woods commented on OPENJPA-1615:
---------------------------------------
Applied OPENJPA-1615-trunk-skiptests.patch to trunk (as r931648) and 2.0.x (as r931654) for now, so we can get past the test failures until this issue is fixed.
> CriteriaQuery test failures on MSSQL
> ------------------------------------
>
> Key: OPENJPA-1615
> URL: https://issues.apache.org/jira/browse/OPENJPA-1615
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.0.0-beta3
> Reporter: Donald Woods
> Fix For: 2.0.1, 2.1.0
>
> Attachments: OPENJPA-1615-trunk-skiptests.patch
>
>
> Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
> 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
> junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
> java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
> at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
> . . .
> Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
> <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> NestedThrowables:
> com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1615) CriteriaQuery test failures on MSSQL
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1615:
----------------------------------
Fix Version/s: (was: 2.0.1)
> CriteriaQuery test failures on MSSQL
> ------------------------------------
>
> Key: OPENJPA-1615
> URL: https://issues.apache.org/jira/browse/OPENJPA-1615
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.0.0-beta3
> Reporter: Donald Woods
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1615-trunk-skiptests.patch
>
>
> Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
> 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
> junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
> java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
> at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
> . . .
> Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
> <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> NestedThrowables:
> com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1615) CriteriaQuery test failures on MSSQL
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1615:
----------------------------------
Attachment: OPENJPA-1615-trunk-skiptests.patch
Patch that disables the 3 failing tests for now on MSSQL, until the real problems are fixed.
> CriteriaQuery test failures on MSSQL
> ------------------------------------
>
> Key: OPENJPA-1615
> URL: https://issues.apache.org/jira/browse/OPENJPA-1615
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.0.0-beta3
> Reporter: Donald Woods
> Fix For: 2.0.1
>
> Attachments: OPENJPA-1615-trunk-skiptests.patch
>
>
> Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
> 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
> junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
> java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
> at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
> . . .
> Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
> <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> NestedThrowables:
> com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1615) CriteriaQuery test failures on MSSQL
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1615:
----------------------------------
Fix Version/s: 2.1.0
> CriteriaQuery test failures on MSSQL
> ------------------------------------
>
> Key: OPENJPA-1615
> URL: https://issues.apache.org/jira/browse/OPENJPA-1615
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.0.0-beta3
> Reporter: Donald Woods
> Fix For: 2.0.1, 2.1.0
>
> Attachments: OPENJPA-1615-trunk-skiptests.patch
>
>
> Seeing 2 different testcase failures in TestTypesafeCriteria for MSSQL:
> 1) MSSQL doesn't support the MOD() function syntax but expects "%" instead, which is set in the SQLServerDictionary as "supportsModOperator = true", but CriteriaBuilderImpl and Expressions is ignoring this option when generating the JPQL, so the testFunctionWithTwoArgument() and testFunctionWithFunctionArgumentInOrderBy() tests fail -
> junit.framework.AssertionFailedError: CriteriaQuery corresponding to SELECT MOD(c.balanceOwed,10) FROM Customer c failed to execute
> java.lang.RuntimeException: SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeQueryAndCollectSQL(AbstractCriteriaTestCase.java:314)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.executeAndCompareSQL(AbstractCriteriaTestCase.java:164)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:141)
> at org.apache.openjpa.persistence.criteria.AbstractCriteriaTestCase.assertEquivalence(AbstractCriteriaTestCase.java:108)
> at org.apache.openjpa.persistence.criteria.TestTypesafeCriteria.testFunctionWithTwoArgument(TestTypesafeCriteria.java:908)
> . . .
> Caused by: <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'MOD' is not a recognized built-in function name. {prepstmnt 3164468 SELECT MOD(t0.balanceOwed, ?) FROM CR_CUST t0 [params=(int) 10]} [code=195, state=S00010]
> 2) There is a NVARCHAR to BigDecimal conversion failure in testBigDecimalConversion()-
> <openjpa-2.0.0-SNAPSHOT-runknown fatal general error> org.apache.openjpa.persistence.PersistenceException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Error converting data type nvarchar to decimal. {prepstmnt 17141330 SELECT (t0.accountNum * ?) FROM CR_CUST t0 WHERE (t0.id = ?) [params=(BigDecimal) 10.3259699999999998709654391859658062458038330078125, (long) 301]} [code=8114, state=S0005]
> . . .
> NestedThrowables:
> com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to decimal.
> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.