bug #9457
closedDistribution editor: Taxon filter broken due to invalid HQL in TaxonNodeServiceImpl.getUuidAndTitleCache()
100%
Description
to reproduce:
- http://api.cybertaxonomy.org/flora-cuba/app/distribution
- Enter any string into the Taxon filter:
10:25:27.241 [flora-cuba] [qtp527446182-11880] ERROR c.vaadin.server.DefaultErrorHandler - org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: cls near line 1, column 367 [SELECT new eu.etaxonomy.cdm.persistence.dto.SortableTaxon NodeQueryResult( tn.uuid, tn.id, t.titleCache, rank ) FROM eu.etaxonomy.cdm.model.taxon.TaxonNode tn INNER JOIN tn.taxon AS t INNER JOIN tn.classifica tion AS cls INNER JOIN t.name AS name LEFT OUTER JOIN name.rank AS rank WHERE t.titleCache LIKE :pattern OR t.titleCache LIKE :doubtfulPatternAND cls.u uid = :classificationUuid] at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74) at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:91) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:287) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:186) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:141) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:76) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:150) at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:302) at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:240) at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1907) at eu.etaxonomy.cdm.persistence.dao.hibernate.taxon.TaxonNodeDaoHibernateImpl.getUuidAndTitleCache(TaxonNodeDaoHibernateImpl.java:222) at eu.etaxonomy.cdm.api.service.TaxonNodeServiceImpl.getUuidAndTitleCache(TaxonNodeServiceImpl.java:196)
Related issues
Updated by Andreas Müller almost 3 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset cdmlib|e0e956a86c917a9f70f0acbbd03eaebc2a7535cc.
Updated by Andreas Kohlbecker almost 3 years ago
- Has duplicate bug #7254: Filter in vaadin distribution editor throws exception added
Updated by Andreas Müller almost 3 years ago
- Assignee changed from Andreas Müller to Andreas Kohlbecker
- Target version changed from cdmlib - Old Next Major Release to Release 5.20
Can you please review. I only fixed in theory, did not test.
Updated by Andreas Müller almost 3 years ago
By the way, please do not use the "cdmlib - Next Major Release" anymore. It is deprecated and will be closed soon, after tickets were moved to other milestones. Milestones to use for cdmlib tickets are "unassigned", "Reviewed next major" and current milestones.
Updated by Andreas Kohlbecker almost 3 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Andreas Kohlbecker to Andreas Müller
I aimed in testing the fix in the vaadin distribution editor itself ... the exception no longer occurs but no taxon records are returned at all. So I can't say if the commit really makes the service method functional again if only the exception is prevented.
I suggest that the method should be covered by tests if not yet done so far.
Updated by Andreas Müller almost 3 years ago
- Related to bug #9461: Filter in vaadin distribution editor does not work added
Updated by Andreas Müller almost 3 years ago
- Status changed from Feedback to Closed
- % Done changed from 50 to 100
I created a new ticket for the non-working filter: #9461 . So I think we can close this ticket.