Application Development FAQ

Jump to: navigation, search

For Information on Aspire 3.1 Click Here

Timed out - Unable to locate component "XXX"

Because of a Misspelling

90% of the time this is because the component name is misspelled. Check the component name very carefully, both where it is specified (the @name attribute to the <component> tag) as well as where it is referenced (in the <stage component=""> tag, in a <branch> tag, or any place where one component references another).

Because of <component> tag placement

Sometimes the <component> tag is placed improperly. For example:

     <component name="a" . . . />
     <component name="b" . . . />
  <component name="x" . . . />

In the above example, the component with name="x" will be ignored by Aspire. Any pipeline or other component that references component "x" will cause a time-out error.

Note: We expect to fix this issue at some point so that the situation above flags an error.

Unable to locate ComponentFactory with name="aspire-xxx"

This can be caused by a number of problems:

  • The “aspire-xxx” bundle is not specified in the aspire.xml file.
  • The “aspire-xxx” JAR file is not in “bundles/aspire” directory.
  • The aspire-xxx JAR file does not have “ComponentFactory.xml” file at the top level.
    1. Open up the JAR with WINRAR and check that ComponentFactory.xml exists.
    2. Open up the JAR with WINRAR, open up the JAR’s ComponentFactory.xml and check the factory name in the JAR.
    3. Open up the JAR with WINRAR, open up the META-INF/MANIFEST.MF file, and check that it has a “Bundle-Activator” field.

Running two (or more) Aspire instances on the same machine

To run two instances of Aspire in the same machine, make the following changes to the (config\ file of one of the instances:

  1. Locate the property org.osgi.service.http.port and change the port number, i.e., =50506.
  2. Set the property to off.
  3. Add or set the property to another port than default (6666), i.e., =6667.
  4. Save the file, run instances.

JMX for Profiling and Monitoring Aspire

Normally, you can simply open up JVisualVM. This is a visual tool that can be used to monitor and profile Java applications.

It comes with the JDK and can be found at %JAVA_HOME%/bin/jvisualvm.exe by default for Windows installations.

If Running as a Windows Service

When running Aspire as a Windows service, you will not be able to use JVisualVM. Aspire, once installed as a service, will be wrapped around a Windows executable (prunsrv.exe), preventing JVisualVM from finding the local Java application (as there is no actual Java process running).

So, to run JVisualVM while running Aspire as a Windows service, you need to edit installService.bat (go to here to see how).

1. Add the following JVM options:

2. Go to jvisualvm.exe and create a connection to it by right-clicking on the Local node:

Jvisualvm example 1.png

3. Click on Add JMX Connection... The Add JMX Connection window appears.

4. In the Connection field, enter your port address specified in the JVM parameters: localhost:8086

Jvisualvm example 2.png

5. Click on the OK button.

After this, you’ll get all the nice features of JVisualVM out of Aspire running as a Windows service. You can start by checking how much memory/cpu is being used.

Further reading: JVisualVM Documentation