This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes No Dialect mapping for JDBC type: -101 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No Dialect mapping for JDBC type: -101" Watch "No Dialect mapping for JDBC type: -101" New topic
Author

No Dialect mapping for JDBC type: -101

Partha Rai
Greenhorn

Joined: Apr 08, 2014
Posts: 1
0 down vote favorite


I am firing following query

Transaction tx3 = session.beginTransaction();
Query query3 = session.createSQLQuery("SELECT SYSTIMESTAMP FROM DUAL");
Object x = (Object)query3.uniqueResult(); //line 3
System.out.println(x);
tx3.commit();

while executing line 3 i am getting following error

exceptiontsorg.hibernate.MappingException: No Dialect mapping for JDBC type: -101

I am getting same exception with the following query also

/* String dateQuery = "select to_timestamp_tz(to_char(TO_DATE('19700101000000','YYYYMMDDHH24MISS') ,'mm/ddyyyy hh24:mi:ss'),'mm/ddyyyy hh24:mi:ss TZH:TZM')"+
"at time zone 'america/los_angeles' from dual";
Query dateQueryTZ = session.createSQLQuery(dateQuery);*/

Can any one tell me how to fix this and get the timestamp value. Please tell me if any alternative are there for the above query.

Thanks in advance Partha
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

Welcome to the Ranch!

Can you post the contents of your persistence.xml file? Perhaps your Hibernate dialect is not set correctly for Oracle database.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No Dialect mapping for JDBC type: -101
 
Similar Threads
Prepared Statement and Date class
SQLException Cursor Closed
Unable to Convert in Timestamp
Peculiar Problem while parsing xml file
Prepared Statement and Date class - Problem still exists