ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产精品久久久男人的天堂,国产精品乱看,久久国产精品一区二区三区http://www.aygfsteel.com/cmzy/category/33006.htmlŒD‹æ¢¦˜q½æœˆçš„JAVA博客 http://www.zy232.cn/zh-cnFri, 25 Jul 2008 02:14:11 GMTFri, 25 Jul 2008 02:14:11 GMT60计划写一个MyEclipse6.5开发Spring应用的简单教½E?/title><link>http://www.aygfsteel.com/cmzy/articles/214724.html</link><dc:creator>ŒD‹æ¢¦˜q½æœˆ</dc:creator><author>ŒD‹æ¢¦˜q½æœˆ</author><pubDate>Mon, 14 Jul 2008 06:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/cmzy/articles/214724.html</guid><wfw:comment>http://www.aygfsteel.com/cmzy/comments/214724.html</wfw:comment><comments>http://www.aygfsteel.com/cmzy/articles/214724.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/cmzy/comments/commentRss/214724.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/cmzy/services/trackbacks/214724.html</trackback:ping><description><![CDATA[     摘要:    计划写一个MyEclipse6.5开发Spring应用的简单教½E‹ã€‚面向初学者,目录暂时定如下。已¾lå®Œæˆäº†½W¬ä¸€ç« å’Œ½W¬äºŒç« çš„一部分ã€? Normal 0 7.8 ¼‚?0 2 false false false MicrosoftInternetExplorer4 /* Style Definitions ...  <a href='http://www.aygfsteel.com/cmzy/articles/214724.html'>阅读全文</a><img src ="http://www.aygfsteel.com/cmzy/aggbug/214724.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/cmzy/" target="_blank">ŒD‹æ¢¦˜q½æœˆ</a> 2008-07-14 14:26 <a href="http://www.aygfsteel.com/cmzy/articles/214724.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Hibernate unexpected end of subtree异常解决办法http://www.aygfsteel.com/cmzy/articles/213799.htmlŒD‹æ¢¦˜q½æœˆŒD‹æ¢¦˜q½æœˆWed, 09 Jul 2008 14:18:00 GMThttp://www.aygfsteel.com/cmzy/articles/213799.htmlhttp://www.aygfsteel.com/cmzy/comments/213799.htmlhttp://www.aygfsteel.com/cmzy/articles/213799.html#Feedback0http://www.aygfsteel.com/cmzy/comments/commentRss/213799.htmlhttp://www.aygfsteel.com/cmzy/services/trackbacks/213799.html HQL查询语句åQšfrom Course course where course.name like '%计算æœ?' order by course.date desc  异常åQ?br />
[org.hibernate.hql.PARSER] - <AST>:0:0: unexpected end of subtree 2008-05-06
18:36:04,062 ERROR [org.hibernate.hql.PARSER] -  Invalid path: 'course.name'
2008-05-06 18:36:04,062 ERROR [org.hibernate.hql.PARSER] - <AST>:0:0: unexpected end of subtree
2008-05-06 18:36:04,062 ERROR [org.hibernate.hql.PARSER] -  left-hand operand of a binary operator was null
2008-05-06 18:36:04,093 ERROR [org.hibernate.hql.PARSER] -  Invalid path: 'course.date'
2008-05-06 18:36:04,125 ERROR [com.vod.dao.CourseDAO] - find all failed org.springframework.orm.hibernate3.HibernateQueryException: unexpected end of subtree [where course.name like '%计算æœ?' order by course.date desc ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [where course.name like '%计算æœ?' order by course.date desc ]Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [where course.name like '%计算æœ?' order by course.date desc ] at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59) at
org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:225) at
org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:158) at
org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) at
org.hibernate.engine.query.HQLQueryPlan.<init>
(HQLQueryPlan.java:75) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:15……

问题解决了:语句写错了!åQï¼š
 1   public List findByHql(String hql){    
 2         log.debug("finding all Course instances");     
 3         try {
 4            String queryString = "from Course course " +hql+" ";
 5            System.out.println("\n\n"+queryString+"\n\n");
 6            return getHibernateTemplate().find(queryString);
 7         } catch (RuntimeException re) {
 8            log.error("find all failed", re);
 9            throw re;
10         } 
11 }

写成了:
 1 public List findByHql(String hql){
 2      log.debug("finding all Course instances");
 3      try {
 4          String queryString = "from Course course " +hql+" ";
 5          System.out.println("\n\n"+queryString+"\n\n");
 6          return getHibernateTemplate().find(hql);//ž®Þp¿™é‡Œï¼çœŸæ˜¯éƒé—·
 7       } catch (RuntimeException re) {
 8          log.error("find all failed", re);
 9          throw re;
10       } 
11 }




ŒD‹æ¢¦˜q½æœˆ 2008-07-09 22:18 发表评论
]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º ÒËÁ¼ÏØ| ½­ÓÀÏØ| ͬµÂÏØ| ÑôÔ­ÏØ| ¶«Ïç×å×ÔÖÎÏØ| »ª°²ÏØ| ÈýºÓÊÐ| èëÄÏÏØ| ÍпËÑ·ÏØ| ͬ½­ÊÐ| ò£ÉÏÏØ| ÔÀÑôÏØ| äüÄÏÏØ| ÆÑ³ÇÏØ| ¶îÃôÏØ| Îå¼ÒÇþÊÐ| »ªÆºÏØ| êùÎªÏØ| ¹âÔóÏØ| ÏɾÓÏØ| ´ïÖÝÊÐ| ÓñÃÅÊÐ| Èʲ¼ÏØ| Û©³ÇÏØ| Æû³µ| ÃÀ¹ÃÏØ| »³Ô¶ÏØ| Çú¾¸ÊÐ| ³Â°Í¶û»¢Æì| Óý¶ù| üɽÊÐ| ÓÀÄþÏØ| ÏìË®ÏØ| ³çÖÝÊÐ| ¸·¿µÊÐ| ÓÚ¶¼ÏØ| Í¼Ä¾Êæ¿ËÊÐ| ²©¿Í| Ä®ºÓÏØ| ÓàÒ¦ÊÐ| ³¤µºÏØ|