2017-01-23 3 views
0

Ich habe ein Projekt im Spring Web Modell-View-Controller (MVC) Framework. Die Version des Model-View-Controller-Framework (MVC) von Spring Web ist 3.2.8.hql.ast.QuerySyntaxException: Unerwartetes Token, das eine Abfrage ausführt

Ich habe eine Exception ausgeführt 1 Abfrage

 at weblogic.work.ExecuteThread.run(ExecuteThread.java:254) 
Caused By: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: app near line 1, column 106 [ select company.id from com.tdk.iot.domain.Application app where app.androidId is not null app.status in (:status) join app.firstSignatory.company as company where company.logo is not null ] 
     at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31) 
     at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24) 
     at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59) 
     at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258) 
     at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157) 
     at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) 
     at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77) 
     at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56) 
     at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) 
     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:1623) 
     at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:93) 
+1

Sind Sie 'und' zwischen dem ersten und dem zweiten Zustand fehlt in' where' Klausel? – VPK

+0

Bitte konvertieren zu antworten –

Antwort

0

Sie fehlen and in der where-Klausel Bedingungen

SELECT company.id 
FROM com.tdk.iot.domain.application app 
WHERE app.androidid IS NOT NULL AND app.status IN (:status) 
JOIN app.firstsignatory.company AS company 
WHERE company.logo IS NOT NULL