ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Back to topics

Discuss Administration

DB Upgrade Script error from 4.1.3 to 5.0 (another one)

You need to be logged in to post messages

DB Upgrade Script error from 4.1.3 to 5.0 (another one)

2/15/2008 7:06 PM EST

(concursive svn trunk 25313 with mysql db)
on the classic

sh ./bin/upgrade_v41-50.sh

I get back

...
upgradedb:
[upgradeDatabase] java.io.FileNotFoundException: /opt/centric/source/branch-50-community/src/sql/mysql/upgrade/upgrade_v41-42.txt (No such file or directory)
[upgradeDatabase] at java.io.FileInputStream.open(Native Method)
[upgradeDatabase] at java.io.FileInputStream.<init>(FileInputStream.java:106)
....

but ok, I'll try myself and get the sql files from centric 5.0.4 war as suggested in another topic (but please, include them directly in the SVN trunk... they're missing from long time and should't be that hard work: will make our life a *bit* easier)

just to be sure, I replaced the whole directories "init","upgrade" and "mysql" with the ones from the war file

then I've restored the db dump and I've launched the upgrade procedure again

the error reported is:

[upgradeDatabase] Object Mappings loaded successfully....

[upgradeDatabase] Element name: actionStepAccountTypes
[upgradeDatabase] Adding primary key...
[upgradeDatabase] Inserting into clone
[upgradeDatabase] Dropping dbTable
[upgradeDatabase] Creating dbTable
[upgradeDatabase] com.mysql.jdbc.exceptions.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 'step_id,type_id,entered,modified)' at line 1
[upgradeDatabase] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
[upgradeDatabase] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
[upgradeDatabase] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
[upgradeDatabase] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
[upgradeDatabase] at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
[upgradeDatabase] at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1355)
[upgradeDatabase] at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1270)
[upgradeDatabase] at org.aspcfs.utils.DatabaseTable.create(Unknown Source)
[upgradeDatabase] at org.aspcfs.utils.DatabaseSchemaUtils.addPrimaryKey(Unknown Source)
[upgradeDatabase] at org.aspcfs.utils.DatabaseSchemaUtils.addPrimaryKey(Unknown Source)
[upgradeDatabase] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[upgradeDatabase] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[upgradeDatabase] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[upgradeDatabase] at java.lang.reflect.Method.invoke(Method.java:585)
[upgradeDatabase] at bsh.Reflect.invokeOnMethod(Unknown Source)
[upgradeDatabase] at bsh.Reflect.invokeStaticMethod(Unknown Source)
[upgradeDatabase] at bsh.Name.invokeMethod(Unknown Source)
[upgradeDatabase] at bsh.BSHMethodInvocation.eval(Unknown Source)
[upgradeDatabase] at bsh.BSHPrimaryExpression.eval(Unknown Source)
[upgradeDatabase] at bsh.BSHPrimaryExpression.eval(Unknown Source)
[upgradeDatabase] at bsh.Interpreter.eval(Unknown Source)
[upgradeDatabase] at bsh.Interpreter.source(Unknown Source)
[upgradeDatabase] at bsh.Interpreter.source(Unknown Source)
[upgradeDatabase] at org.aspcfs.ant.tasks.UpgradeDatabaseTask.executeScript(Unknown Source)
[upgradeDatabase] at org.aspcfs.ant.tasks.UpgradeDatabaseTask.execute(Unknown Source)
[upgradeDatabase] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[upgradeDatabase] at org.apache.tools.ant.Task.perform(Task.java:364)
[upgradeDatabase] at org.apache.tools.ant.Target.execute(Target.java:341)
[upgradeDatabase] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[upgradeDatabase] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[upgradeDatabase] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[upgradeDatabase] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[upgradeDatabase] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[upgradeDatabase] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[upgradeDatabase] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[upgradeDatabase] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[upgradeDatabase] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[upgradeDatabase] java.sql.SQLException: 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 'step_id,type_id,entered,modified)' at line 1
[upgradeDatabase] at org.aspcfs.utils.DatabaseSchemaUtils.addPrimaryKey(Unknown Source)
[upgradeDatabase] at org.aspcfs.utils.DatabaseSchemaUtils.addPrimaryKey(Unknown Source)
[upgradeDatabase] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[upgradeDatabase] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[upgradeDatabase] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[upgradeDatabase] at java.lang.reflect.Method.invoke(Method.java:585)
[upgradeDatabase] at bsh.Reflect.invokeOnMethod(Unknown Source)
[upgradeDatabase] at bsh.Reflect.invokeStaticMethod(Unknown Source)
[upgradeDatabase] at bsh.Name.invokeMethod(Unknown Source)
[upgradeDatabase] at bsh.BSHMethodInvocation.eval(Unknown Source)
[upgradeDatabase] at bsh.BSHPrimaryExpression.eval(Unknown Source)
[upgradeDatabase] at bsh.BSHPrimaryExpression.eval(Unknown Source)
[upgradeDatabase] at bsh.Interpreter.eval(Unknown Source)
[upgradeDatabase] at bsh.Interpreter.source(Unknown Source)
[upgradeDatabase] at bsh.Interpreter.source(Unknown Source)
[upgradeDatabase] at org.aspcfs.ant.tasks.UpgradeDatabaseTask.executeScript(Unknown Source)
[upgradeDatabase] at org.aspcfs.ant.tasks.UpgradeDatabaseTask.execute(Unknown Source)
[upgradeDatabase] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[upgradeDatabase] at org.apache.tools.ant.Task.perform(Task.java:364)
[upgradeDatabase] at org.apache.tools.ant.Target.execute(Target.java:341)
[upgradeDatabase] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[upgradeDatabase] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[upgradeDatabase] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[upgradeDatabase] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[upgradeDatabase] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[upgradeDatabase] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[upgradeDatabase] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[upgradeDatabase] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[upgradeDatabase] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

BUILD FAILED
/opt/centric/source/branch-50-community/build.xml:1683: Script Error: Sourced file: /opt/centric/source/branch-50-community/src/sql/upgrade/2007-03-16-script01-ananth.bsh : Method Invocation DatabaseSchemaUtils.addPrimaryKey

Total time: 9 seconds
...
Execute ant upgradedb.help manually
...
Add any necessary default permissions manually using the application

Any hint?
Thanks for your patience

1. 3/3/2008 4:53 AM EST

Still no ideas?

Looks to me like a syntax error in the SQL statement but I'm not comfortable with beanshell scripts...

Nobody have this problem?

2. 3/6/2008 11:24 AM EST

Claudio Tranchina wrote:
Still no ideas?

Looks to me like a syntax error in the SQL statement but I'm not comfortable with beanshell scripts...

Nobody have this problem?

Yes, I'm actually facing the same problem. ;-(


2 results found