Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Contributor User Documentation:FAQs Contributors"

(Equinox/OSGI)
(Apache ANT and PDE Builds)
 
(11 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
<p>We have collected some of the most frequently asked questions, tips and tricks related to the Swordfish project.
 
<p>We have collected some of the most frequently asked questions, tips and tricks related to the Swordfish project.
This section will be continually updated as and when new FAQs arise. It is a good idea to start here if you have problems with Swordfish.</p>  
+
It is a good idea to start here if you have problems with Swordfish.</p>
 +
<p align="center">'''Please keep this FAQ up to date!'''</p>
 +
<p>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.</p>
 +
 
 +
<p align="center">You might just make someone's day!</p>
  
 
====Equinox/OSGI====
 
====Equinox/OSGI====
Line 30: Line 34:
 
|-
 
|-
 
|Why does <tt>instanceof</tt> 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.
 
|Why does <tt>instanceof</tt> 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), <tt>instanceof</tt> may return false, if you do not imported the interface's package.
+
If you created a proxy in the context of another bundle (where a certain interface is accessible), <tt>instanceof</tt> may return false, if you did not import the interface's package.
 
|}
 
|}
 
<br>
 
<br>
 
----
 
----
  
====Apache ANT====
+
====Apache ANT and PDE Builds====
{|{{TableStyle}}
+
{| border="1"  style="background:AliceBlue; color:black;"
|+{{}}|
+
! Question || Possible Solution
|-{{THStyle}}
+
! Problem/Issue ||
+
! Hint
+
 
|-
 
|-
| a || b
+
|Why do tests in Ant throw these exceptions:
 +
<pre>MethodNotFoundException</pre>
 +
<pre>NoClassDefFoundExceptions</pre>
 +
||<p> 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:
 +
<pre> <vmargs value="-verbose:class"/> </pre>
 +
This also works with <tt><junit></tt> 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.</p>
 
|-
 
|-
| a || b
+
| 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.
| a || b
+
Here is an example:
|-
+
<pre>
|}
+
<!-- (1) --><path id="xclasspath">...</path>
 +
<!-- (2) --><property name="xcp" refid="xclasspath" />
 +
<!-- (3) --><echo message="My classpath is ${xcp}" />
 +
<!-- (4) --><classpath refid="xclasspath" />
 +
</pre>
  
====PDE Build====
+
If you reference the path from your classpath tag (4), comment out the lines (2) and (3).
{|{{TableStyle}}
+
|+{{}}|
+
|-{{THStyle}}
+
! Problem/Issue ||
+
! Hint
+
|-
+
| a || b
+
|-
+
| a || b
+
|-
+
| a || b
+
|-
+
|}
+
 
+
 
+
====Connecting to the SVN====
+
{|{{TableStyle}}
+
|+{{}}|
+
|-{{THStyle}}
+
! Problem/Issue ||
+
! Hint
+
|-
+
| a || b
+
|-
+
| a || b
+
|-
+
| a || b
+
|-
+
 
|}
 
|}
 +
<br>
  
  

Latest revision as of 10:39, 19 June 2009

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