1

I have a play framework application [version 1.2.7]. when I try to get data in a non-jpa Entity form I get this exception

play.exceptions.JavaExecutionException: org.hibernate.MappingException: No Dialect mapping for JDBC type: 16
	at play.mvc.ActionInvoker.invoke(ActionInvoker.java:237)
	at Invocation.HTTP Request(Play!)
Caused by: javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: 16
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1389)
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1317)
	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:255)

my code is as follows

 List lst = JPA.em().createNativeQuery(myQuery)
                .setParameter("p", searchPhrase)
                .getResultList();

I want to use native query and get all extract all data but I dont want to be limited to getting it as an Jpa Entity.

any help will be appreciated.

1
  • Can you paste persistance.xml, please? Commented Oct 22, 2014 at 14:12

1 Answer 1

3

If I'm not wrong the JDBC type 16 is BOOLEAN (look atjava.sql.Types). Your problem might be caused by use of wrong hibernate.dialect which doesn't know BOOLEAN types which occur in one of tables you are trying to select. Check hibernate.dialect property in your persistence.xml or hibernate.cfg.xml.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks very much , I changed the boolean type into int and everything works now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.