Skip Headers

# Using the TopLink Migration Tool From the Command Line

Previous

Next

To use the TopLink migration tool from the command line, you must do the following:

1. Ensure that the following is in your classpath:

   - `<``TOPLINK_HOME``>/jlib/antlr.jar`

   - `<``TOPLINK_HOME``>/jlib/ejb.jar`

   - `<``TOPLINK_HOME``>/jlib/toplink.jar`

   - `<``TOPLINK_HOME``>/jlib/cmpmigrator.jar`

   - `<``TOPLINK_HOME``>/jlib/toplinkmw.jar`

   - `<``TOPLINK_HOME``>/jlib/tlmwcore.jar`

   - `<``TOPLINK_HOME``>/config`

   - `<``ORACLE_HOME``>/lib/xmlparserv2.jar`

2. If you intend to migrate from plain XML files (rather than an EAR or JAR file), ensure that the domain classes are accessible and included in your classpath.

3. Make a backup copy of your original XML files.

4. Execute the TopLink migration tool as Example: Using the TopLink Migration Tool from the Command Line illustrates using the appropriate arguments listed in Table: TopLink Migration Tool Arguments.

   The usage information for the TopLink migration tool is:

       java -Dtoplink.ejbjar.schemavalidation=<true|false> -Dtoplink.migrationtool.generateWorkbenchProject=<true|false> -Dhttp.proxyHost=<proxyHost> -Dhttp.proxyPort=<proxyPort> oracle.toplink.tools.migration.TopLinkCMPMigrator -s<nativePM> -i<inputDir> -a<ear>|<jar> -x -o<outputDir> -v

   To identify the input files, you must specify one of `-a` or `-x`.

   For troubleshooting information, see "Troubleshooting Your Migration".

Using the TopLink Migration Tool from the Command Line

    java -Dhttp.proxyHost=www-proxy.us.oracle.com -Dhttp.proxyPort=80 oracle.toplink.tools.migration.TopLinkCMPMigrator -sWebLogic -iC:/mywork/in -aEmployee.ear -oC:/mywork/out -v

TopLink Migration Tool Arguments

Argument | Description
--- | ---
`toplink.ejbjar.schemavalidation` | The system property used to turn on schema validation if `ejb-jar.xml` uses XML Schema (XSD) instead of DTD. The default value is `false`.
`toplink.migrationtool.generateWorkbenchProject` | The system property used enable generation of the TopLink Workbench project. The default value is `true`.
`<``proxyHost``>` | The address of your local HTTP proxy host
`<``proxyHost``>` | The port number on which your local HTTP proxy host receives HTTP requests.
`-s <source>` | The name of the native persistence manager from which you are migrating. For BEA WebLogic, use the name `WebLogic`.
`-i <input-directory>` | Fully qualified path to the input directory that contains the BEA WebLogic `weblogic-ejb-jar.xml` and `weblogic-cmp-rdbms-jar.xml` files to migrate. Default: current working directory.
`-a <EAR-or-JAR>` | Fully qualified path to the archive file (either an EAR or JAR) that contains both the BEA WebLogic `weblogic-ejb-jar.xml` and `weblogic-cmp-rdbms-jar.xml` files to migrate.
`-x` | Tells the TopLink migration tool that the BEA WebLogic files in the input directory to migrate from are plain XML files (not in an archive file). If you use this option, ensure that the domain classes are accessible and included in your classpath.
`-o <output-directory` | The path to the directory into which the TopLink migration tool writes the new `orion-ejb-jar.xml`, `toplink-ejb-jar.xml`, and log files. The path may be absolute or relative to the current working directory. You must specify this argument value. Ensure that permissions are set on this directory to allow the TopLink migration tool to create files and subdirectories.
`-v` | Verbose mode. Tells the TopLink migration tool to log errors and diagnostic information to the console.