Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.11.1
-
None
Description
Current Situation
When using a native MS SQL JDBC Driver an error occurs with the Exception: MappingException: No Dialect mapping for JDBC type: -9
However, the error does not occur when using the deployed JTDS Driver.
11 08:19:45.855 com.sos.jitl.inventory.plugins.InitializeInventoryInstancePlugin [ERROR] - javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: -9 javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: -9 at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1419) at org.hibernate.Query.getResultList(Query.java:427) at com.sos.jitl.inventory.data.ProcessInitialInventoryUtil.getDbVersion(ProcessInitialInventoryUtil.java:352)
Desired Behavior
No error should occur when using native drivers.
Note
In the initial processing part of the InventoryPlugin the version of the DBMS is determined via a native SQL query select @@version.
However, the native function @@version has a return value of type NVARCHAR.
The deployed JTDS driver internally maps the return value to the generally known type VARCHAR properly before hibernate maps this type to the proper java type (String).
The MS SQL driver does not map NVARCHAR to VARCHAR and the currently used hibernate version is not able to map NVARCHAR to the correct java type.
Attachments
Issue Links
- is related to
-
JS-1707 JobScheduler should work with MS JDBC 6.0 and SQL Server 2016
- Released