把new去掉也不行啊public static void main(String[] args) { Session session=HibernateSessionFactory.getSessionFactory().getCurrentSession(); Transaction tx=session.beginTransaction(); List<Object[]> objs=session.createSQLQuery("select s.xh,s.xm,s.zymc,p.prizeOption,p.schoolYear from jxj_PrizeInfo p,t_main s where p.studentID=s.xh").list(); tx.commit(); }然后就报错了Exception in thread "main" org.hibernate.MappingException: No Dialect mapping for JDBC type: -9 at org.hibernate.dialect.TypeNames.get(TypeNames.java:76) at org.hibernate.dialect.TypeNames.get(TypeNames.java:99) at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:592) at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:696)
Session session=HibernateSessionFactory.getSessionFactory().getCurrentSession();
Transaction tx=session.beginTransaction();
List<Object[]> objs=session.createSQLQuery("select s.xh,s.xm,s.zymc,p.prizeOption,p.schoolYear from jxj_PrizeInfo p,t_main s where p.studentID=s.xh").list();
tx.commit();
}然后就报错了Exception in thread "main" org.hibernate.MappingException: No Dialect mapping for JDBC type: -9
at org.hibernate.dialect.TypeNames.get(TypeNames.java:76)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:99)
at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:592)
at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:696)