Sateesh,
Can you check your sql statement:
032888c4 engine/schema/src/com/cloud/upgrade/dao/Upgrade421to430.java (Sateesh
Chodapuneedi 2014-01-15 01:38:34 +0530 83) updatePstmt =
conn.prepareStatement("UPDATE `cloud`.`service_offering` SET ram_size=? WHERE
id=?'");
I think that's breaking the db creation. Maybe an extra single quote towards
the end ?
And please make sure to test that:
mvn -P developer -pl developer -Ddeploydb
works before you commit,
thanks,
-sebastien
On Jan 15, 2014, at 1:17 PM, sebgoa <[email protected]> wrote:
> Hi, while testing 4.3 (with or without devcloud) I get a error in the
> database creation:
>
> mysql> show databases;
> +--------------------+
> | Database |
> +--------------------+
> | information_schema |
> | mysql |
> | performance_schema |
> | simulator |
> | test |
> +--------------------+
> 5 rows in set (0.00 sec)
>
> mysql> exit
> Bye
> sebimac:cloudstack sebgoa$ mvn -P developer -pl developer,tools/devcloud
> -Ddeploydb
> Listening for transport dt_socket at address: 53306
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] Apache CloudStack Developer Mode
> [INFO] Apache CloudStack DevCloud
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Apache CloudStack Developer Mode 4.3.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties
> (default) @ cloud-developer ---
> [WARNING] Ignoring missing properties file:
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/../utils/conf/db.properties.override
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.3:process (default) @
> cloud-developer ---
> [INFO]
> [INFO] --- maven-antrun-plugin:1.7:run (default) @ cloud-developer ---
> [INFO] Executing tasks
>
> main:
> [INFO] Executed tasks
> [INFO]
> [INFO] >>> exec-maven-plugin:1.2.1:java (create-schema) @ cloud-developer >>>
> [INFO]
> [INFO] <<< exec-maven-plugin:1.2.1:java (create-schema) @ cloud-developer <<<
> [INFO]
> [INFO] --- exec-maven-plugin:1.2.1:java (create-schema) @ cloud-developer ---
> log4j:WARN No appenders could be found for logger
> (org.springframework.core.env.StandardEnvironment).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more
> info.
> ========> WARNING: Provided file does not exist:
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/../utils/conf/db.properties.override
> ========> WARNING: Provided file does not exist:
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/developer-prefill.sql.override
> ========> Initializing database=cloud with host=localhost port=3306
> username=cloud password=cloud
> ============> Running query: drop database if exists `cloud`
> ============> Running query: create database `cloud`
> ============> Running query: GRANT ALL ON cloud.* to 'cloud'@`localhost`
> identified by 'cloud'
> ============> Running query: GRANT ALL ON cloud.* to 'cloud'@`%` identified
> by 'cloud'
> ========> Initializing database=cloud_usage with host=localhost port=3306
> username=cloud password=cloud
> ============> Running query: drop database if exists `cloud_usage`
> ============> Running query: create database `cloud_usage`
> ============> Running query: GRANT ALL ON cloud_usage.* to
> 'cloud'@`localhost` identified by 'cloud'
> ============> Running query: GRANT ALL ON cloud_usage.* to 'cloud'@`%`
> identified by 'cloud'
> ========> Initializing database=cloudbridge with host=localhost port=3306
> username=cloud password=cloud
> ============> Running query: drop database if exists `cloudbridge`
> ============> Running query: create database `cloudbridge`
> ============> Running query: GRANT ALL ON cloudbridge.* to
> 'cloud'@`localhost` identified by 'cloud'
> ============> Running query: GRANT ALL ON cloudbridge.* to 'cloud'@`%`
> identified by 'cloud'
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/create-schema.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/create-schema-premium.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/templates.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_schema.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_multipart.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_index.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_multipart_alter.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_bucketpolicy.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_policy_alter.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_offering.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/target/db/cloudbridge_offering_alter.sql
> ========> Processing SQL file at
> /Users/sebgoa/Documents/gitforks/cloudstack/developer/developer-prefill.sql
> ========> Processing upgrade: com.cloud.upgrade.DatabaseUpgradeChecker
> [WARNING]
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
> at java.lang.Thread.run(Thread.java:724)
> Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade
> the database
> at
> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:319)
> at
> com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:414)
> at com.cloud.upgrade.DatabaseCreator.main(DatabaseCreator.java:229)
> ... 6 more
> Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade
> ram_size of service offering for secondary storage vm.
> at
> com.cloud.upgrade.dao.Upgrade421to430.upgradeMemoryOfSsvmOffering(Upgrade421to430.java:93)
> at
> com.cloud.upgrade.dao.Upgrade421to430.performDataMigration(Upgrade421to430.java:66)
> at
> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:292)
> ... 8 more
> Caused by: 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 ''' at line 1
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> at com.mysql.jdbc.Util.getInstance(Util.java:386)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
> at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
> at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371)
> at
> com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355)
> at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
> at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
> at
> com.cloud.upgrade.dao.Upgrade421to430.upgradeMemoryOfSsvmOffering(Upgrade421to430.java:91)
> ... 10 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Apache CloudStack Developer Mode .................. FAILURE [1:32.571s]
> [INFO] Apache CloudStack DevCloud ........................ SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1:34.543s
> [INFO] Finished at: Wed Jan 15 13:15:18 CET 2014
> [INFO] Final Memory: 39M/359M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java
> (create-schema) on project cloud-developer: An exception occured while
> executing the Java class. null: InvocationTargetException: Unable to upgrade
> the database: Unable to upgrade ram_size of service offering for secondary
> storage vm. 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 '''
> at line 1 -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>
>
> It's a bit strange because I did not face this error yesterday,
>
> Any advice,
>
> -sebastien
>