Project

General

Profile

Actions

bug #6111

closed

invalid SQL (MySQLSyntaxErrorException) during call to CdmEntityDaoBase.list()

Added by Andreas Kohlbecker over 6 years ago. Updated almost 6 years ago.

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

50%

Estimated time:
Severity:
critical
Found in Version:

Description

The Specimens Table in the chichorieae portal is no longer working due to a bug in the CdmEntityDaoBase.list() method.

The web service call to http://api.cybertaxonomy.org/cichorieae/portal/taxon/cd3c58dc-71a8-4e83-b730-53ccf8c97aad/associatedFieldUnits.json causes the cdmlib to throw an exception:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') order by this_.titleCache asc limit 30' at line 1
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
    at com.mysql.jdbc.Util.getInstance(Util.java:387)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:353)
    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:2116)
    at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1899)
    at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1875)
    at org.hibernate.loader.Loader.doQuery(Loader.java:919)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
    at org.hibernate.loader.Loader.doList(Loader.java:2611)
    at org.hibernate.loader.Loader.doList(Loader.java:2594)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2423)
    at org.hibernate.loader.Loader.list(Loader.java:2418)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109)
    at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1774)
    at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:363)
    at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.list(CdmEntityDaoBase.java:441)
    at eu.etaxonomy.cdm.api.service.OccurrenceServiceImpl.pageFieldUnitsByAssociatedTaxon(OccurrenceServiceImpl.java:377)
Actions #1

Updated by Andreas Müller about 6 years ago

  • Target version changed from Release 4.4 to Release 4.5
Actions #2

Updated by Andreas Müller about 6 years ago

  • Target version changed from Release 4.5 to Release 4.6
Actions #3

Updated by Andreas Müller almost 6 years ago

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

Updated by Andreas Müller almost 6 years ago

Check after release if this is fixed by d8607241

Actions #5

Updated by Andreas Müller almost 6 years ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

This seems to be fixed. I checked in TaxEditor that Lactuca perennis does not have any any associatedFieldUnits, so the empty result seems to be correct.
Please review.

Actions #6

Updated by Andreas Kohlbecker almost 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF