Skip to main content
Version: 3.5.2

Troubleshooting

Processes not started#

When coming from a version of symphony prior to 3.3.x you have to adjust and rebuild the process in order to be started successfully.

Adjust parent pom#

First you need to adjust the parent pom to point to the latest one

Rename custom imports property#

Change the property name for the custom imports from:

<bundle-imports>...</bundle-imports><bundle-exports>...</bundle-exports>

to:

<custom-imports>...</custom-imports><custom-exports>...</custom-exports>

Remove api identifier#

Remove the api classifier from adapter dependencies:

<classifier>osgi.api</classifier>

Rebuild with Java 11#

Finally you need to rebuild the process with Java 11

Wiring Issues#

The most common problem with customizations in the application are so called wiring issues. The application is built on a OSGi microservice architecture that allows Java classpath isolation on a per bundle basis.

Each customization is an individual bundle that needs to:

  • Either bring its own dependency of used libraries (maven compile scope)
  • Or import its dependencies from another bundle (maven provided scope)

When the application starts, it is trying to resolve all the dependencies.

No Class Definition Found#

If your customization uses a package that it does neither import nor contain, the following error message is shown:

Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/annotation/JsonDeserialize

In that case it means that you have to either add a dependency to your project pom like:

<dependency>    <groupId>com.fasterxml.jackson.core</groupId>    <artifactId>jackson-annotations</artifactId>    <version>2.12.2</version>    <scope>compile</scope></dependency>

Or add the specific package to the custom.imports property of your project pom.

Missing Requirement#

If your customization imports a package in the custom.imports property, that is not present in the application, the following error message is shown:

com.agosense.symphony.adapter.custom [41](R 41.0): missing requirement [com.agosense.symphony.adapter.custom [41](R 41.0)] osgi.wiring.package; (osgi.wiring.package=com.mylibs.something)

In that case, make sure to remove the package from the custom.imports section and add a maven dependency to your project:

<dependency>    <groupId>com.mylibs</groupId>    <artifactId>something</artifactId>    <version>4.3</version>    <scope>compile</scope></dependency>

Debugging#

In cases of missing requirements, the corresponding bundles will never reach the expected ACTIVE state and will usually remain in the INSTALL state.

The application has a built-in shell that allows you to verify the bundle statuses.

On the application host, use the following command to enter that shell:

ssh -p8444 root@localhost
note

The default password is root

The shell will prompt with:

nucleus>

To obtain a list of all bundles run the listBundles command.

Each individual bundle is displayed with a number and its status:

Bundle [41]: com.agosense.symphony.adapter.custom  State->INSTALLED

For any bundle in INSTALLED status a requirement is missing. Run the command startBundle along with the bundle id to display details of the missing requirements, e.g.

startBundle 41

The output tells you the problem:

com.agosense.symphony.adapter.custom [41](R 41.0): missing requirement [com.agosense.symphony.adapter.custom [41](R 41.0)] osgi.wiring.package; (osgi.wiring.package=com.mylibs.something)

Virus Scanners#

Especially when using customizations such as java processes or extensions, keep in mind that you are regularly changing the content of the installation folder with jar files that are in fact also zip archives.

Some virus scanners do heavily interact with such components, resulting in unexpected side-effects.

Make sure to exclude the symphony installation location from the virus scanning.