Solution to hibernate:unexpected end of subtree anomaly

Source: Internet
Author: User

Exception in Thread "awt-eventqueue-0" org.springframework.orm.hibernate3.HibernateQueryException:unexpected end of subtree [from Com.ge.healthcare.gehcit.ehrae.sv2.dto.SVTemplate WHERE ID in ()]; Nested exception is org.hibernate.hql.ast.QuerySyntaxError:unexpected end of subtree [from Sv2.dto.SVTemplate WHERE ID in ()]
org.hibernate.hql.ast.QuerySyntaxError:unexpected end of subtree [from Sv2.dto.SVTemplate WHERE ID in ()]
At Org.hibernate.hql.ast.ErrorCounter.throwQueryException (errorcounter.java:63)
At Org.hibernate.hql.ast.QueryTranslatorImpl.analyze (querytranslatorimpl.java:196)
At Org.hibernate.hql.ast.QueryTranslatorImpl.doCompile (querytranslatorimpl.java:130)
At Org.hibernate.hql.ast.QueryTranslatorImpl.compile (querytranslatorimpl.java:83)
At Org.hibernate.impl.SessionFactoryImpl.getQuery (sessionfactoryimpl.java:427)
At Org.hibernate.impl.SessionImpl.getQueries (sessionimpl.java:884)
At Org.hibernate.impl.SessionImpl.list (sessionimpl.java:834)
At Org.hibernate.impl.QueryImpl.list (queryimpl.java:74)
At Org.springframework.orm.hibernate3.hibernatetemplate$30.doinhibernate (hibernatetemplate.java:852)
At Org.springframework.orm.hibernate3.HibernateTemplate.execute (hibernatetemplate.java:365)
At Org.springframework.orm.hibernate3.HibernateTemplate.findByNamedParam (hibernatetemplate.java:843)

After debugging, it turns out that the problem is when calling Gethibernatetemplate (). Findbynamedparam (String query, string[] paramnames, object[] values), This exception occurs when the value in values is empty.

So check it out when you call.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.