[6692] Problem running migration tool
After I have successfully upgraded from 3.0.1 to build 6692 I struggle migrating from MySQL to Oracle database.
The migration tool immediately stops with this exception:
Exception in thread "main" java.lang.UnsupportedClassVersionError: jetbrains/buildServer/serverSide/DBMTool (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
That's my command line:
SET CP=hsqldb.jar;server.jar;openapi.jar;server-openapi.jar;dbunit-2.2.jar;common.jar;server-model.jar;log4j-1.2.12.jar;jdom.jar;mysql-connector-java-5.1.5-bin.jar;ojdbc14.jar
java -DTC.targetDriver=oracle.jdbc.driver.OracleDriver -DTC.sourceDriver=com.mysql.jdbc.Driver -Xmx512m -Dfile.encoding=utf-8 -cp %CP% jetbrains.buildServer.serverSide.DBMTool jdbc:mysql://localhost/buildserver myuser mypwd jdbc:oracle:thin:@versrv:1521:teamcity myuser mypwd
Any ideas?
Cheers, Christian
Please sign in to leave a comment.
OK, silly me ... I've solved the problem by pointing the path environment variable to a newer Java version.
The migration starts but fails with a NullPointerException exception:
Sat Feb 23 12:01:58 CET 2008 Connecting to the source database jdbc:mysql://localhost/buildserver
Sat Feb 23 12:01:59 CET 2008 Connecting to the target database jdbc:oracle:thin:@versrv:1521:teamcity
Sat Feb 23 12:02:02 CET 2008 Initializing schema...
TABLES to be converted: (41) [[agent, agent_build_type_access, agent_sources_version, build_checkout_rules, build_labels, build_queue, build_revisions, build_type_vcs_change, canceled_info, comments, compiler_output, deleted_build_types, downloaded_artifacts, failed_tests_output, history, ignored_tests, light_history, paused_build_types, personal_vcs_changes, personal_vcs_history, remember_me, remote_run_build_types, run_configuration_policy, running, server, server_property, statistics, tc_build_tags, test_info, test_names, user_blocks, user_notification_events, user_projects_order, user_projects_visibility, user_property, user_roles, user_watch_type, users, vcs_changes, vcs_history, vcs_root_versions]]
java.lang.NullPointerException
at jetbrains.buildServer.serverSide.impl.DatabaseUtil.dumpIndexes(DatabaseUtil.java:38)
at jetbrains.buildServer.serverSide.impl.DatabaseUtil.dumpSchema(DatabaseUtil.java:180)
at jetbrains.buildServer.serverSide.DBMTool.main(DBMTool.java:55)
Sat Feb 23 12:02:03 CET 2008 Exporting C:\Programme\TeamCity\webapps\ROOT\WEB-INF\lib\TC-export-1203764518952\targetSchema.sql
Sat Feb 23 12:02:03 CET 2008 Exporting data to TC-export-1203764518952
Sat Feb 23 12:02:04 CET 2008 Exporting C:\Programme\TeamCity\webapps\ROOT\WEB-INF\lib\TC-export-1203764518952\sourceSchema.sql
Sat Feb 23 12:02:24 CET 2008 Importing data from TC-export-1203764518952
org.dbunit.database.AmbiguousTableNameException: AQ$_SCHEDULES
at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:140)
at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:186)
at org.dbunit.operation.AbstractOperation.getOperationMetaData(AbstractOperation.java:59)
at org.dbunit.operation.AbstractBatchOperation.execute(AbstractBatchOperation.java:130)
at jetbrains.buildServer.serverSide.DBMTool.doImport(DBMTool.java:19)
at jetbrains.buildServer.serverSide.DBMTool.main(DBMTool.java:134)
Sat Feb 23 12:02:25 CET 2008 Exporting C:\Programme\TeamCity\webapps\ROOT\WEB-INF\lib\database.properties
Sat Feb 23 12:02:25 CET 2008 Exporting C:\Programme\TeamCity\webapps\ROOT\WEB-INF\lib\version.dat
Sat Feb 23 12:02:25 CET 2008 Done.
Any help would be greatly appreciated.
Cheers, Christian
Recreating the database user with fewer rights (connect, resource) solved the actual problem (AmbiguousTableNameException)...
Christian
Christian Schwarz wrote:
Congratulations, Christian.
We will be glad to get any additional feedback about your experience
with TC running on top of Oracle.
--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
So far, we didn't notice any issues. I'll let you know in the unlikely case this happen to change :)
Cheers, Christian