org.hibernate.hql.ast.QuerySyntaxException: unexpected token: , near line 1, column 37 [select new java.lang.String('test1'), new java.lang.String('test2') from SomeMappedClass

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Hibernate JIRA by Steve Mayhew, 1 year ago
unexpected token: , near line 1, column 37 [select new java.lang.String('test1'), new java.lang.String('test2') from SomeMappedClass
via Hibernate JIRA by Steve Mayhew, 1 year ago
unexpected token: , near line 1, column 37 [select new java.lang.String('test1'), new java.lang.String('test2') from SomeMappedClass
via sourceforge.net by Unknown author, 2 years ago
unexpected token: . near line 1, column 17 [select c.entered.on from eg.domain.Cat c]
via Hibernate JIRA by Rhett Sutphin, 1 year ago
unexpected token: . near line 1, column 17 [select c.entered.on from eg.domain.Cat c]
via Hibernate JIRA by Rhett Sutphin, 1 year ago
unexpected token: . near line 1, column 17 [select c.entered.on from eg.domain.Cat c]
via Coderanch by sharaf navas, 1 year ago
unexpected token: on near line 1, column 89 [select distinct g.gpName from com.tt.notification.vo.EmpGroupVO eg inner join GroupVO g on g.gpId = eg.gpId where g.gpId not in (select empg.gpId from com.tt.notification.vo.EmpGroupVO empg where emp_id = 1)]
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: , near line 1, column 37 [select new java.lang.String('test1'), new java.lang.String('test2') from SomeMappedClass
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:244)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109)
at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:134)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:113)
at net.jvnet.dev.hqe.ThreadHQLQueryExecution.run(Unknown Source)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.