Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Contributor User Documentation:FAQs Contributors

FAQs for Contributors and Committers

We have collected some of the most frequently asked questions, tips and tricks related to the Swordfish project. It is a good idea to start here if you have problems with Swordfish.

Please keep this FAQ up to date!

Just drop the info here if you found or received a simple solution to a problem that drove you nuts or you discovered a trick that might be helpful to others or you have a scrap of paper on your desk where you keep tricks, you don't want to forget.

You might just make someone's day!

Equinox/OSGI

Question Possible Solution
How do I connect to an Equinox instance via Telnet? To start a telnet connection just add a port number behind the -console option.

For example, use the command console 3333 when starting your console.

You can also use the command
telnet localhost 3333
Why does bundle [xyz] not find the classes of bundle [abc]? Try to open a console. If the bundle does not start, try to start it manually by using the command:
start <bundleNumber>

If this attempt results in a stack trace, it may help you to investigate further.
When you use the command you will get answers to the following questions:

  • Are all services defined in the Spring configuration running?
  • Have package dependencies been resolved to the bundles you expect?
When I use a launch configuration to start a class inside Equinox where do I find the corresponding log file? Usually, you will find logs in
<workspace>.metadata/.plugins/org.eclipse.pde.core/<RunConfigurationName>

You may overwrite that in the configuration tab of your launch configuration. This can be helpful after a crash when you did not switch on the console or when the instance shuts down with an error.

How do I limit the output of the Equinox ss command? The ss command accepts a textual argument. If you enter ss swordfish, the status list is limited to bundles with swordfish (somewhere) in their symbolic name.
Why does instanceof return false? When you use Java dynamic proxies note that instanceof will return false if an interface implemented by the proxy cannot be found by your current class loader.

If you created a proxy in the context of another bundle (where a certain interface is accessible), instanceof may return false, if you did not import the interface's package.



Apache ANT and PDE Builds

Question Possible Solution
Why do tests in Ant throw these exceptions:
MethodNotFoundException
NoClassDefFoundExceptions

Our tests rely on a normal classpath ordering. If you receive one of these exception messages it may be that there is another JAR file in the queue that contains the right methods or class definitions that are not in the file that is currently loaded. The file that has been loaded may not contain the methods or the the class definitions that you want. To find that particular JAR with the right components, add the following to the VM that is started:

 <vmargs value="-verbose:class"/> 
This also works with <junit> if you fork to a separate VM. In the log, the VM will show you which class it loaded and you can use that information to patch the classpath to make sure that the expected JAR is used.

Which files are in my classpath? When viewing a list of files for a classpath, you can wrap your file sets, into a <path> element and give this path an <id>. The <id> can be referenced to set a property value which can then be echoed to the console.

Here is an example:

<!-- (1) --><path id="xclasspath">...</path>
<!-- (2) --><property name="xcp" refid="xclasspath" />
<!-- (3) --><echo message="My classpath is ${xcp}" />
<!-- (4) --><classpath refid="xclasspath" />

If you reference the path from your classpath tag (4), comment out the lines (2) and (3).




Swordfish End User Documentation
Swordfish Wiki Home

Back to the top