My company domain is of the format *mycomany.in*
I have changed my project's package from *com*.mycompany -> *in*.mycompany to keep it consistent with my company's domain.
After the migration, hibernate update queries are failing saying
{noformat} unexpected token: in antlr.NoViableAltException: unexpected token: in {noformat}
The actual query that ran was of this format
{noformat} update Entity e set e.prop = ?1 where e.id = ?2 {noformat}
Here is the cleaned log
{noformat} QueryTranslatorImpl: parse() - HQL: update in.mycompany.domain.Entity e set e.prop = ?1 where e.id = ?2 ErrorCounter: line 1:8: unexpected token: in {noformat}
This +error occurs only for update+ statement, but +not for select+ for some reason.
This error occurs in +org.hibernate.hql.internal.ast.QueryTranslatorImpl+ in the following section.
{code:java} private HqlParser parse(boolean filter) throws TokenStreamException, RecognitionException { // Parse the query string into an HQL AST. final HqlParser parser = HqlParser.getInstance( hql ); parser.setFilter( filter );
LOG.debugf( "parse() - HQL: %s", hql ); parser.statement(); .... } {code} |
|