Move the MashZone NextGen repository to MySQL

Procedure

  1. If you are using your LDAP Directory as the MashZone NextGen User Repository, make sure that at least one user in your LDAP Directory has administrator privileges for MashZone NextGen before you move the MashZone NextGen Repository. For details, see the chapter Start MashZone NextGen with an initial administrator user.

    When the MashZone NextGen User Repository is your LDAP Directory, the default administrator account (Administrator user) is disabled.

  2. If you are hosting the MashZone NextGen Repository in a new database, create the database following the official MySQL documentation. Keep the following points in mind:

    Make sure this database is supported by MashZone NextGen. See Additional MashZone NextGen System and Software Requirements for details.

    If you want MashZone NextGen to support international characters in meta-data for artifacts, set the character encoding and collation to UTF-8 when you create the database. See documentation for your database for specific instructions.

    For medium or larger MySQL databases that will host the MashZone NextGen Repository, you should increase the maximum allowed packet size, which defaults to 1MB, for the database.

  3. Start the database that will become host to the MashZone NextGen Repository, if it is not already up.
  4. Replace the JAR for the MashZone NextGen Repository:
    1. Remove the MashZoneNG-install/apache-tomcat/mashzone/WEB-INF/lib/jackbe-presto-rds-postgresql-derby.jar JAR file for each MashZone NextGen Server that uses this MashZone NextGen Repository. You can delete this JAR or simply move it to a folder that is not in the classpath for the application server that hosts MashZone NextGenMashZone NextGen.
    2. Copy this JAR file:

      MashZoneNG-install/prestorepository/jackbe-presto-rds-oracle-mysql-mssql.jar

      To the web-apps-home/mashzone/WEB-INF/lib folder.

  5. Copy the MySQL JDBC driver jar file to MashZoneNG-install/apache-tomcat/lib.
  6. Open the MashZoneNG-install/apache-tomcat/conf/context.xml configuration file in the text editor of your choice.
  7. For the MashZone NextGen Repository, edit the <Resource> element with an ID of MashzoneNextGenRepository and:
    1. Update the JDBC driver, URL and credential properties:

      name="MashzoneNextGenRepository" auth="Container" type="javax.sql.DataSource" maxTotal="200" maxIdle="30" maxWaitMillis="10000" username="app" password="app" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://host-name/databasename" />

      For MySQL databases, it is recommended including the database name in data source URLs. If this information is omitted, testing the data source fails and may also cause errors with access to stored procedures.

      The JTA managed property must be false.

    2. If needed, update optional properties. See the official Tomcat Datasource Properties for a complete list of optional properties and information on defaults.

      Some common properties you may need to set include:

      validationQuery = select 1 from dual

      Common tuning properties for connections pools. See Tuning the MashZone NextGen Repository Connection Pool.

  8. Start the MashZone NextGen Server to apply these changes. This also starts the MashZone Server.

    If the MashZone NextGen Server does not start up successfully, see Troubleshooting Connections to the MashZone NextGen Repository for suggestions.

Note

Depending on your local MySQL settings, MashZone NextGen may display an error message, such as "Error: Packet for query is too large (xxx > yyy)". In this case, a file (for example, the JDBC driver library) was uploaded to MashZone NextGen that exceeds the size of the max_allowd_packet parameter in the MySQL configuration. After setting an appropriate value in the mysql.cnf file, this error should no longer occur. For details, please refer the corresponding MySQL documentation.