2
SELECT GROUP_CONCAT(VALUE) FROM store_variant_option_value  
WHERE store_variant_id = '1461' GROUP BY store_variant_id

I want to run this query in java code but getting java

dialect exception

Tried everything from native sql to hibernate named query and findByquery.

dhS
  • 3,739
  • 5
  • 26
  • 55
A.G
  • 489
  • 1
  • 6
  • 17
  • 2
    please show the proper code along with the stacktrace – SpringLearner Sep 02 '16 at 09:14
  • String sql = "SELECT GROUP_CONCAT(VALUE) FROM store_variant_option_value " + "WHERE store_variant_id = ? GROUP BY store_variant_id "; this.generalTraits = getBaseDao().findByNativeSql(sql, 0,0, this.storeVariantId); – A.G Sep 02 '16 at 10:14
  • result = {org.springframework.orm.hibernate3.HibernateSystemException@18368}Method threw 'org.springframework.orm.hibernate3.HibernateSystemException' exception. detailMessage = {java.lang.String@18540}"No Dialect mapping for JDBC type: -1" cause = {org.hibernate.MappingException@18541}"org.hibernate.MappingException: No Dialect mapping for JDBC type: -1" stackTrace = {java.lang.StackTraceElement[84]@18370} suppressedExceptions = {java.util.Collections$UnmodifiableRandomAccessList@18542} size = 0 – A.G Sep 02 '16 at 10:15
  • please show us the hibernate xml file – SpringLearner Sep 02 '16 at 10:39

0 Answers0