Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1075 closed defect (fixed)

Lowess normalization fails on trunk but works on latest 2.7-stable

Reported by: Jari Häkkinen Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.8
Component: core Version: trunk
Keywords: Cc:


Running trunk version lowess on my development machine creates the below stack trace whereas 2.7-stable lowess on the same machine works.

Version info: BASE 2.8.0pre (build #4311; schema #61) and BASE 2.7.2pre (build #4354; schema #55)

22:27:16,593 ERROR jobqueue:519 - Exception while executing job: Job[id=128; name=Run plugin: Normalization: Lowess]
net.sf.basedb.core.BaseException: Unknown column 'raw.block' in 'field list'
        at net.sf.basedb.core.InternalJobQueue$
Caused by: net.sf.basedb.core.BaseException: Unknown column 'raw.block' in 'field list'
        at net.sf.basedb.core.QueryExecutor.getFutureResult(
        at net.sf.basedb.core.QueryExecutor.executeQuery(
        at net.sf.basedb.core.AbstractSqlQuery.iterate(
        at net.sf.basedb.core.DynamicQuery.iterate(
        at net.sf.basedb.plugins.LowessNormalization.normalize(
        at net.sf.basedb.core.PluginExecutionRequest.invoke(
        at net.sf.basedb.core.InternalJobQueue$
        ... 1 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'raw.block' in 'field list'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
        at java.lang.reflect.Constructor.newInstance(
        at com.mysql.jdbc.Util.handleNewInstance(
        at com.mysql.jdbc.Util.getInstance(
        at com.mysql.jdbc.SQLError.createSQLException(
        at com.mysql.jdbc.SQLError.createSQLException(
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(
        at com.mysql.jdbc.MysqlIO.sendCommand(
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
        at com.mysql.jdbc.ConnectionImpl.execSQL(
        at com.mysql.jdbc.PreparedStatement.executeInternal(
        at com.mysql.jdbc.PreparedStatement.executeQuery(
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(
        at net.sf.basedb.core.QueryExecutor$
        at net.sf.basedb.core.QueryExecutor$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$
        ... 1 more

Change History (4)

comment:1 by Nicklas Nordborg, 16 years ago

Component: corepluginscore
Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

I get the same error. Looking at the SQL, it seems like the table containing the raw data is never joined into the query:

  `spt`.`position` AS `position`, 
  `spt`.`ch1` AS `ch1`, 
  `spt`.`ch2` AS `ch2`, 
  `raw`.`block` AS `block`, 
  0 AS `present` 
FROM `base2dynamic`.`D1Spot` `spt` 
  `spt`.`cube` = 2 
  AND `spt`.`layer` = 1 
  AND ((`spt`.`ch1` > 0.0) AND (`spt`.`ch2` > 0.0)) 
  AND (`spt`.`column` = ?) 
  `raw`.`block` ASC

This is probably caused by the fix to #1016, which suffered from joining the same table multiple times.

There are other bugs that leads to this one:

  1. The DynamicQuery.isReadOnly() method is not implemented correctly. Once the query has been built it is not allowed to modify it by adding more restrictions, joins, etc. unless reset() is called.
  2. The Lowess plug-in should not work as it is now. Just after it has created the query, it calls count() on it. After that, more restrictions and other query elements are added. This should never have been allowed, but works because of (1).

comment:2 by Nicklas Nordborg, 16 years ago

The same problem exists in the Median-ratio normalization plug-in.

comment:3 by Nicklas Nordborg, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [4358]) Fixes #1075: Lowess normaliztion fails on trunk but works on latest 2.7-stable

comment:4 by Jari Häkkinen, 16 years ago

Summary: Lowess normaliztion fails on trunk but works on latest 2.7-stableLowess normalization fails on trunk but works on latest 2.7-stable
Note: See TracTickets for help on using tickets.