- This topic has 2 replies, 2 voices, and was last updated 16 years, 6 months ago by
Alastair.
-
AuthorPosts
-
AlastairMemberHi,
We are experiencing an issue when adding an instance of one of our classes to an existing form in Matisse at design time.
The problem occurs because when our class is loaded it tries (unsuccessfully) to load some resource files. The method that is being called indirectly isClassLoader.getResources(String)
which returns an empty enumeration. Nevertheless we can see the first applicable resource file by calling the
ClassLoader.getResource(String)
method so we know that the resources can be found. We suspect therefore there is a problem with the MatisseClassLoader as this is the classloader in use at the time. When the same code is run in different environments in which either the standard OSGI classloader or the jBoss classloader is being used we do not experience the same problem.
Please note that the overall environment is a multi-project setup in which each project is an eclipse plug-in (OSGI bundle). We’re not sure if this is related to the problem.
A simplified sample project structure is given below to aid clarity:
Project A (OSGI bundle)
Project B (OSGI bundle)
Project C (OSGI bundle)Dependencies:
Project B has a dependency on Project C
Project A has a dependency on Project B and CAt runtime when a class from project A is loaded, matching resources from both bundle B and C should be returned from the function call to
ClassLoader.getResources(String)
but an empty enumeration is returned. However the resource defined in B is returned by
ClassLoader.getResource(String)
Any feedback on this issue would be much appreciated.
Alastair.
Riyad KallaMemberAlastair,
This is definitely a more complex classloading setup than we have typically tested before. I’ll add a note for the developers to look into this when going over the Matisse TODO list; sorry about the trouble.In the mean time I can’t think of a workaround besides maybe trying to add the literal JAR of the dependent project to the project that needs the reference and see if it resolves.
AlastairMemberHi Riyad,
Thanks for the feedback, and I appreciate you forwarding the request through to the developers.
Alastair.
-
AuthorPosts