在执行这个方法时:
public List<Sendnews> selectSNbyUid(int id) {
String sql = "select * from Sendnews s where s.isdel not in (1,2) and s.newid in (select n.newid from News n where n.uid=? and n.ispublic=1 and n.isdel not in(1,2))";
return getHibernateTemplate().find(sql, id);
}
报如下错误:
org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: * near line 1, column 8 [select * from com.oa.pojo.Sendnews s where s.isdel not in (1,2) and s.newid in (select n.newid from com.oa.pojo.News n where n.uid=? and n.ispublic=1 and
n.isdel not in(1,2))];
后来发现报这个错的都是因为hql语句中有非法字符,比如次语句中的*
分享到:
相关推荐
org.springframework.orm-3.0.4.RELEASE.jar org.springframework.oxm-3.0.4.RELEASE.jar org.springframework.spring-library-3.0.4.RELEASE.libd org.springframework.test-3.0.4.RELEASE.jar org.spring...
NULL 博文链接:https://hw1287789687.iteye.com/blog/1967701
org.springframework.orm-3.0.0.M1.jar
Class'org.springframework.orm.hibernate3.LocalSessionFactoryBean'not found 解决办法
org.springframework.orm.jar.zip
org.springframework.orm-3.1.RELEASE.jar org.springframework.oxm-3.1.RELEASE.jar org.springframework.spring-library-3.1.RELEASE.libd org.springframework.test-3.1.RELEASE.jar org.springframework....
org.springframework.orm-3.1.0.M2
org.springframework.beans-3.0.0.M4.jar
org.springframework.orm-3.0.0.M4.jar
org.springframework.orm-3.0.0.RELEASE.jar org.springframework.oxm-3.0.0.RELEASE.jar org.springframework.test-3.0.0.RELEASE.jar org.springframework.transaction-3.0.0.RELEASE.jar org.springframework.web...
org.springframework.orm-3.0.0.RELEASE org.springframework.oxm-3.0.0.RELEASE org.springframework.spring-library-3.0.0.RELEASE org.springframework.test-3.0.0.RELEASE org.springframework.transaction-...
org.springframework.orm-3.0.5.RELEASE.jar org.springframework.oxm-3.0.5.RELEASE.jar org.springframework.test-3.0.5.RELEASE.jar org.springframework.transaction-3.0.5.RELEASE.jar org.springframework.web...
org.springframework.orm-3.1.1.RELEASE org.springframework.oxm-3.1.1.RELEASE org.springframework.test-3.1.1.RELEASE org.springframework.transaction-3.1.1.RELEASE org.springframework.web.portlet-3.1.1....
org.springframework.instrument-3.0.5.RELEASE.jar,org.springframework.jdbc-3.0.5.RELEASE.jar,org.springframework.jms-3.0.5.RELEASE.jar,org.springframework.orm-3.0.5.RELEASE.jar,org.springframework....
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <value>classpath:SqlMapConfig.xml <bean id="dao" class="org.springframework.orm.ibatis....
org.springframework.orm-3.1.0.RELEASE.jar org.springframework.oxm-3.1.0.RELEASE.jar org.springframework.test-3.1.0.RELEASE.jar org.springframework.transaction-3.1.0.RELEASE.jar org.springframework.web...
org.springframework.orm-3.0.1.jar
org.springframework.orm-3.0.2.RELEASE org.springframework.oxm-3.0.2.RELEASE org.springframework.spring-library-3.0.2.RELEASE org.springframework.test-3.0.2.RELEASE org.springframework.transaction-...
spring-hibernate3.jar包,直接导入路径即可,解决Class 'org.springframework.orm.hibernate3.LocalSessionFactoryBean' not found这个错误
org.springframework.orm-3.0.0.M4.jar: 整合第三方的ORM框架,如hibernate,ibatis,jdo,以及spring的JPA实现 org.springframework.transaction-3.0.0.M4.jar: 为JDBC、Hibernate、JDO、JPA等提供的一致的声明式和...