Project

General

Profile

Actions

bug #9457

closed

Distribution editor: Taxon filter broken due to invalid HQL in TaxonNodeServiceImpl.getUuidAndTitleCache()

Added by Andreas Kohlbecker almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:

Description

to reproduce:

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

Related to EDIT - bug #9461: Filter in vaadin distribution editor does not workResolvedAndreas Müller

Actions
Has duplicate EDIT - bug #7254: Filter in vaadin distribution editor throws exceptionWorksformeAndreas Müller

Actions
Actions #1

Updated by Andreas Müller almost 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #2

Updated by Andreas Kohlbecker almost 2 years ago

  • Has duplicate bug #7254: Filter in vaadin distribution editor throws exception added
Actions #3

Updated by Andreas Müller almost 2 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.

Actions #4

Updated by Andreas Müller almost 2 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.

Actions #5

Updated by Andreas Kohlbecker almost 2 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.

Actions #6

Updated by Andreas Müller almost 2 years ago

  • Related to bug #9461: Filter in vaadin distribution editor does not work added
Actions #7

Updated by Andreas Müller almost 2 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.

Actions

Also available in: Atom PDF