Forum: Building VoltDB Applications

Post: Trying to compile project, but failing

Trying to compile project, but failing
francis
Jul 23, 2012
I've been struggling to see what I've done wrong, the error isn't very descriptive to be honest.
I am trying to compile my DB and I am getting:

ERROR: [admin_upsert.class]: Failed to plan for stmt: updateStmt Here is my updateStmt:

public final SQLStmt updateStmt = new SQLStmt("UPDATE assets SET " + " type = ?," + " name = ?," + " url = ?," + " deleted = ?" + " WHERE assetID = ?;");
Not sure this helps, but here
francis
Jul 23, 2012
Not sure this helps, but here is what my log is giving me

2012-07-23 09:56:45,472 INFO [main] COMPILER: [procedures.modules.assets.admin_getAll]: Compiling Statement: SELECT * FROM assets WHERE deleted=0; 2012-07-23 09:56:45,484 INFO [main] COMPILER: [procedures.modules.assets.admin_search]: Compiling Statement: SELECT * FROM assets WHERE deleted=0 AND name LIKE ? LIMIT 25; 2012-07-23 09:56:45,509 INFO [main] COMPILER: [admin_upsert.class]: Compiling Statement: UPDATE assets SET type = ?, name = ?, url = ?, deleted = ? WHERE assetID = ?; 2012-07-23 09:56:45,510 ERROR [main] COMPILER: [admin_upsert.class]: Failed to plan for stmt: updateStmt 2012-07-23 09:56:45,511 ERROR [main] COMPILER: Failed to compile XML 2012-07-23 09:56:45,511 ERROR [main] COMPILER: Catalog compilation failed.
I found the issue, it appears
francis
Jul 23, 2012
I found the issue, it appears that I didn't define that table's partiion in my project.xml.
reproducer?
rbetts
Jul 23, 2012
I found the issue, it appears that I didn't define that table's partiion in my project.xml.


If you can post a simple reproduction, we'll file a story to improve the error message.
Ryan.
Sure.The above was placed
francis
Jul 23, 2012
Sure.
The above was placed into a procedure as you can see.
The table defined in my ddl.sql as:

CREATE TABLE assets ( assetID BIGINT UNIQUE NOT NULL, type TINYINT NOT NULL, name VARCHAR(100) NOT NULL, url VARCHAR(225) NOT NULL, deleted TINYINT DEFAULT '0' NOT NULL, CONSTRAINT IDX_assets_PK PRIMARY KEY (assetID) ); Adding the following to my project.xml solved the issue:

[partitions] ... [partition table='assets' column='assetID' /] ... ] (This forum is making my < and > brackets hide the content, I had to change them to square brackets)
I can file a ticket if you'd like.
Ah. Okay. Sounds like maybe
rbetts
Jul 23, 2012
Ah. Okay. Sounds like maybe the error message is caused by asking the planner to plan an UPDATE of a replicated table in a single partition procedure.
I filed https://issues.voltdb.com/browse/ENG-3443 to track/improve this.
Yep, that's correct. Thanks
francis
Jul 24, 2012
Yep, that's correct. Thanks Ryan.