Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

Import your projects and server settings

With the new Klocwork server installed and the portal up and running, you can import server settings and projects from your existing Klocwork installation.

When you import server settings from the existing source server, all global permission settings are imported along with the permission settings for only those projects that exist on the destination server. In other words, if you import Server A's settings to Server B, then you import a project from Server A to Server B, any permission settings that are specific to project A will not be carried over to Server B. To carry forward project A's project-specific permission settings, you must re-import the server settings after performing the import operation.

Important: In cases where a project contains custom settings, you must re-import your server settings after performing a project import.

Note also that when importing a projects_root that contains a large number of issues and builds, your new projects_root may increase in size.

To import your existing projects:

  1. In the Klocwork portal, click Klocwork Static Code Analysis and log in to the product as the Projects root admin user.
  2. Click the Projects tab.
    If this is your first time using the installation, click the Import settings or projects button.
    If you've already created a project or imported a project, click the Import button.
  3. In the Klocwork server connection dialog, specify the log in and connection information for your existing Klocwork installation (the installation from which you want to import). Specify:
    • the URL of the existing server, for example: http://server21:8082
    • your user name. Note: you must have Projects root admin rights in order connect to the server and import your projects.
    • your password (if required)
  4. Click Import server configuration to import the existing server's configuration settings. This includes authentication configuration settings, permissions, custom metrics, reports definitions, and e-mail subscription settings.
    Note: If you import authentication settings, the system may log you out as your credentials may no longer be valid. If this happens, log in using the Admin credentials you just imported.
  5. Click List Projects to see a list of projects in your existing projects_root.
  6. In the Choose projects to import dialog, select the project(s) that you want to import to your new projects_root.
  7. Click Import. The Import status dialog will display the status of the project import, while an import status message will appear at the top of the Projects tab.
    Any project that imported successfully will appear in your projects list.
    Note: During the import process, while projects are actively being imported, issue information in the Projects view may not accurately reflect the data in the source project. Information in the Projects view will be updated as soon as the import operation has completed. Check the import status indicator for progress information.
  8. Click Import server configuration again to import any project-specific configuration settings. This is a mandatory step, since any project-specific configuration settings will be lost if you do not re-import the server settings.
  9. For each imported project, click Permissions and check that the permissions are correct for each project.

It is important to verify the permissions for each project since at import time, permissions are merged between source server and destination server. You should repeat this process after each import operation, and you must be careful to re-import the server settings for each source server that you import from.

Note: If you are running Windows in a 32-bit environment and you previously modified the memory allocation file located at <old_Klocwork_install>/config/java_wrappers_memory.conf, verify that you still need those modifications and make the same changes to java_wrappers_memory.conf in the new installation.

Use the Web API to import your projects

You can use the Klocwork Web API to import your projects on the command line. The Web API requires Web API access permissions. By default, the Project admin role and the Projects root admin roles have access to the Web API. The following example shows a curl script to import a given project:

curl --data "action=import_project&user=myself&project=my_project&sourceURL=
http://oldserver:8080&sourceAdmin=user&sourcePassword=pwd" http://localhost.mycompany.com:8080/review/api

where:

  • project is the name of the project you want to import.
  • sourceURL is the URL of the existing, source Klocwork Server.
  • sourceAdmin is the user id of the source Klocwork Server administrator (must have Projects root admin access).
  • sourcePassword is the administrator's password.

To return a list of all projects in the source projects_root folder, run the following command:

curl --data "action=projects&user=myself&" http://localhost.mycompany.com:8080/review/api

You can also use the Web API to import your server configuration settings:

curl --data "action=import_server_configuration&user=myself&sourceURL=
http://oldserver:8080&sourceAdmin=user&sourcePassword=pwd" http://localhost.mycompany.com:8080/review/api

Typically these operations are scripted using a language such as Python. See the Klocwork Web API cookbook for examples of scripted curl calls using Python.

Import taxonomy file(s)

If you imported a custom taxonomy, for example, MISRA, in a previous release, you need to re-import the new taxonomy file to pick up changes. See What's new for a list of changes to the taxonomies. If you're using MISRA checkers, you'll also need to copy the misra.checkers.zip file from the <server_install>/taxonomies folder into the <projects_root>/plugins folder.