Running Rhapsody through the Eclipse development environment allows for easier development and debugging of Rhapsody filters and communication points. Run configurations can either be created manually, or are generated for you when you set up custom filter or communication point projects.
Run Configuration Set-up
Using a New Run Configuration
To create a configuration to run Rhapsody:
- Ensure you have set up logging in Eclipse. Refer to Configure Logging for details.
- From Eclipse, navigate to Run>Run Configurations....
- Right-click on OSGi Framework and select New.
- In the Bundles tab:
- Select all bundles under Target Platform except from
com.orchestral.rhapsody.modules.dicom
andcom.orchestral.rhapsody.process.solaris
.
- Select all bundles under Target Platform except from
- In the Arguments tab.
Replace the contents of the VM arguments field with:
-Djava.awt.headless=true -Dosgi.noShutdown=true -Declipse.ignoreApp=true -Dosgi.classloader.singleThreadLoads=true -Xms256m -XX:MaxMetaspaceSize=256m -Dorg.osgi.framework.os.name=Win32
- Set the Working directory to Other. Use the File System button to browse to the directory the Rhapsody engine was installed into (the default location being
C:\Program Files\Rhapsody\Rhapsody Engine 6
).
- In the Settings tab:
- Ensure that the Runtime JRE is selected as the JRE that is installed with Rhapsody (for example in the
<Rhapsody>\JRE directory
). If necessary, use the Installed JREs... button to add the Rhapsody JRE, and select it from the dropdown list. It can be important to ensure the correct JRE is used in debugging to ensure the same results in a live environment.
- Ensure that the Runtime JRE is selected as the JRE that is installed with Rhapsody (for example in the
- Select the Apply button, and then Close.
- You can now start Rhapsody.
Using a Generated Run Configuration
To use a generated configuration to run Rhapsody:
- Ensure you have set up logging in Eclipse. Refer to Configure Logging for details.
- From Eclipse, navigate to Run>Run Configurations....
- Under OSGi Framework, select Rhapsody.
- In the Bundles tab:
- Select all bundles under Target Platform apart from
com.orchestral.rhapsody.modules.dicom
andcom.orchestral.rhapsody.process.solaris
.
- Select all bundles under Target Platform apart from
- In the Arguments tab:
- Check that the Working directory is set to the directory the Rhapsody engine was installed into (the default location being
C:\Program Files\Rhapsody\Rhapsody Engine 6
). If necessary, select Other, and use the File System button to browse to the correct location.
- Check that the Working directory is set to the directory the Rhapsody engine was installed into (the default location being
- In the Settings tab:
- Ensure that the Runtime JRE is selected as the JRE that is installed with Rhapsody (for example in the
<Rhapsody>\JRE directory
). If necessary, use the Installed JREs... button to add the Rhapsody JRE, and select it from the dropdown list. It can be important to ensure the correct JRE is used in debugging to ensure the same results in a live environment.
- Ensure that the Runtime JRE is selected as the JRE that is installed with Rhapsody (for example in the
- Select the Apply button, and then Close.
- You can now start Rhapsody.
Starting Rhapsody
To start Rhapsody:
- Ensure that the Rhapsody service is currently stopped.
- Navigate to Run>Run Configurations..., and click the Run button with the appropriate Rhapsody run configuration selected.
- Rhapsody should begin to startup through the Eclipse environment.
There is no single log message that indicates that Rhapsody has completed startup. However, when Rhapsody has started, the Management Console and Rhapsody IDE become available.
Since Eclipse has been configured to use the data store from the installed Rhapsody, the Management Console ports for the Eclipse Rhapsody will be the same as the installed Rhapsody. This means that opening the Windows Service Monitor and double-clicking will open the Management Console for the Eclipse Rhapsody.
The Windows Service Monitor (task tray icon) does not recognize the engine is running because Rhapsody is no longer running as a service. However, the tray icon can still be used to connect to the Management Console of the engine through double-clicking.
Stopping Rhapsody
To stop Rhapsody, enter close
or exit
in the Eclipse console window.
Common Errors
Rhapsody can fail to run if there are:
Missing Permissions
Log error message: java.io.FileNotFoundException: log\log.txt (Access is denied)
Cause: Eclipse is missing permissions to access files in the Rhapsody installation directory.
Resolution: Run Eclipse as Administrator.
Port Conflicts
Log error message: java.net.BindException: Address already in use: JVM_Bind /0.0.0.0:8444
Cause: The Rhapsody ports are already in use.
Resolution: Stop the Rhapsody instance that is using the same ports.