Skip Headers
Oracle® Communications Network Integrity Developer's Guide
Release 7.1

E23701-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

28 Tips and Tricks

This chapter provides tips and tricks for working with processors, Design Studio, compiling, and building in Oracle Communications Network Integrity.

Processors

The following sections provide tips and tricks for working with processors:

Creating Processors

It is recommended to create a Processor from Action Editor (in the Processors tab). This way, the newly created Processor is automatically added to the Action. A processor not associated with any Action is an orphaned Processor. In general an orphaned processor results in a warning message, unless it is an orphaned SNMP Processor. In this case the processor results in an error message. Creating the Processor from Action Editor eliminates the possibility of orphaned Processors in a Network Integrity project.

Specifying Context Parameters before Creating Implementation Class

When creating a new processor, it is a good practice to properly configure the Context Parameters before saving the Processor. This way Design Studio properly generates the skeleton implementation Java class for the Processor with the correct input and output parameters. If the input and output context parameters are modified later, the generated Interface changes, but Design Studio does not automatically update the implementation class. The user must manually update the implementation class to comply with the changed interface.

Working in Design Studio

The following sections provides tips and tricks for working in Design Studio:

About Package Explorer View and Navigator View

These two views are useful for browsing all cartridge artifacts created by you or generated by Design Studio. There are also a few operations that are only accessible from these two views.

To open the Package Explorer View, select the menu item Window, then Show View, then Package Explorer.

To open the Navigator View, select the menu item Window, then Show View, then Other, then open General, and select Navigator.

About Error Log View

If there are problems with the project, but there is no Error Problem Marker, you may examine the Error Log View. This view reports problems and events from Eclipse plug-ins, including the Design Studio plug-ins.

To open the Error Log View, select the menu item Window then Show View then Other, then open General and select Error Log.

Error Log View shows events as they happen, and some of the displayed events may have occurred hour ago. It is usually a good idea to clear all logs first, and then do a Clean and Build to recreate a problem.

To clear the logs, click the Clear Log View icon on the tool bar. The icon is to the left of the Delete icon (red X).

Opening with the Wrong Editor

Sometimes, when you open an item in the cartridge project, the item is displayed using an editor that is not the default editor (for example, XML Editor instead of a Discovery Action Editor).

To reset the open behavior, go to the Package Explorer or the Navigator View. Then, open the tree for your project, and open the model folder. Find the item that you want to correct, and right-click it to bring up its context menu. From this menu, select Open With then Default Editor, and the open behavior is reset to default.

Compile or Build Problems

The following sections provides tips and tricks for working in Design Studio:

About Java Errors in the Generated Controller Class

Compile errors in the generated Controller class of an Action usually mean that there are errors in the configuration of the Processor table of that Action. Look for a Studio Error on an Action or Processor involved in the processor chain. Correct the error, then save all files and perform a clean operation to regenerate all generated files.

Renaming or Deleting Actions and Processors

When renaming an Action or a Processor, Design Studio only renames and refactors the generated Java source code. Likewise, when deleting an Action or a Processor, Design Studio only deletes the generated Java source code. These changes result in errors remaining in the processor implementation code and they must be corrected manually.

Adding External Libraries to a Java Build Path

To add an external library to the project for use by a processor, you must first copy the JAR file into the lib directory of the cartridge project. Then, you must add an entry for this library into the project's Java Build Path. This can only be done in the Package Explorer or the Navigator View.

From either view, right-click the project and select Properties. In the Properties dialog, select Java Build Path in the left side, and select the Libraries tab. Now you can select Add External Jars to add your libraries.

About ”Missing Required Library” Errors for External Libraries

You have copied the required library JAR files into the lib directory of your cartridge project, and you have added these libraries into your project's Java Build Path. If you are still getting missing required library errors, refresh your cartridge project to cause Design Studio to notice the added library.

To refresh your project, go to the menu Windows then Show View then open Package Explorer then right-click your project, and select Refresh. Follow this with a Clean and Build of the project.

Error Marker on Cartridge but not on any Entities

If there is an error marker on the cartridge itself, but there are no error marker on any cartridge entities (Actions, Processors, Model Collections, and so on), then try checking the cartridge project using the Package Explorer View or the Navigator View. Sometimes the error markers are on some generated artifacts instead.

If there are no error markers on anything else, then try a Refresh and Rebuild operation. Go into Package Explorer or Navigator view, right-click the top-level project, and select Refresh. Then, choose the menu Project, then Clean, and choose to clean and rebuild all projects.

Unsealing a Sealed Cartridge

You may encounter build problems if you unseal a sealed cartridge in your workspace. The error logs may indicate that some dependent JAR files are missing from the workspace. The main cause for this is that the sealed cartridge may not have included any source code, and that a Clean operation may delete the JAR file, and then is not able to recreate it. The solution is to delete the unsealed cartridge, and re-import the sealed cartridge.

Cartridge Failing to Build After Being Imported

In some cases, Design Studio may not be able to build a cartridge successfully immediately after it is imported. The Problem View shows problem markers against Design Studio entities or JAVA classes.

To successfully build the cartridge:

  1. Ensure all design time cartridge dependencies are satisfied and that all dependent cartridges exist in the workspace and are building successfully.

  2. From the Project menu, enable Build Automatically.

  3. From the Project menu, select Clean to clean and rebuild the cartridge.

  4. Verify that the problem markers no longer appear in the Problem View. If the problems still appear:

    1. Close the cartridge project.

    2. Re-open the cartridge project.

    3. Clean the project.

  5. Verify that the problem markers no longer appear in the Problem View. If the problems still appear:

    1. Close Design Studio.

    2. Re-open Design Studio.

    3. Clean the project.

  6. Verify that the problem markers no longer appear in the Problem View. If the problems still appear:

    1. Back up any changes to the cartridge.

    2. Delete the cartridge project.

    3. Re-import the cartridge project.