i\'m getting one error how to resolve this error i.e,
org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
at org.hibernate.dialect.TypeNam
For my case the type was missing, so setting qu.addEntity(MyBean.class); worked, in your case String.class might work
With me I was having trouble with an unmapped MySQL table column.
Column Type: text
Then I had to use addScalar():
Query query = em. createNativeQuery(originalQuery);
((SQLQuery) ((HibernateQuery) query).getHibernateQuery())
.addScalar("column1", new LongType())
.addScalar("column2", new IntegerType())
.addScalar("column3", new StringType());
List<Object[]> values = query.getResultList();