Search the FirstSpirit Knowledge Base
Dear FirstSpirit Community,
within the FirstSpirit JavaClient JAR "fs-client.jar", an old "org.netbeans" wizard API framework is provided. There is a more recent one, providing some bug fixes, like:
Please update this framework in your provided "fs-client.jar" file.
Question: if an updated version of the "wizard.jar" file would be added to a custom FirstSpirit module descriptor and module content, which classes would be taken/loaded at runtime? The ones provided in "fs-client.jar" or the ones provided in the FirstSpirit module?
The ones provided directly in "fs-client.jar" or the ones delivered within the module??
Kind regards,
Holger King
Please create a feature request for the netbeans wizard api update.
You're able to include your own version within your module and use that version within your module code. The developer documentation explains how you can define resources with a scope of "module" within the module.xml.
Hi Christoph,
the below procedure just worked when DELETING the "org.netbeans"-package out of "fs-client.jar". :smileyangry:
I added the current available "org.netbeans" JAR file of the wizard API (see: http://java.net/projects/wizard/sources/svn/content/trunk/www/wizard.jar?rev=264) to our FirstSpirit module library path and enhanced the components resources (it did not work when enhancing the resources directly below the "module" tag: "java.lang.NoClassDefFoundError") in "module.xml" by:
<module>
...
<components>
<library>
<name>Group administration library</name>
<description>Common classes for group administration</description>
<resources>
<!-- added bug-fixed version of "org.netbeans" wizard API
to module resources although FirstSpirit JavaClient already
includes an older one in "fs-client.jar":
<resource>files/</resource>
<resource>lib/wizard.jar</resource>
</resources>
</library>
</components>
...
<resources>
<resource>lib/wizard.jar</resource>
</resources>
...
</module>
So, is there another CLASSLOADER issue? My assumption: a bug
You didn't define the scope of your resources as "module". Please have a look at chapter 2.5.1.2 of the ModuleDeveloperDocumentation.
You should try something like this (untested)
<module>
...
<components>
...<!-- component that uses the wizard api -->
</components>
<resources>
<resource scope="module">lib/wizard.jar</resource>
</resources>
...
</module>
Hi Christoph,
thanx for a link to the current module developer handbook (version 1.49). There, we found your chapter, where the "scope"-XML attribute for the "resource"-tag is mentioned.
In our version 1.48, dated 2011-02-15, we couldn't find such a hint.
BUT, even with the following tests, we couldn't solve the issue regarding the integration of the bug-fixed "wizard.jar", located in the FirstSpirit module's class path:
- setting scope="module" in library component resource for "wizard.jar" OR
- setting scope="module" in module resource for "wizard.jar"
- setting scope="server" in library component resource for "wizard.jar" OR
- setting scope="server" in module resource for "wizard.jar"
<module>
...
<components>
<library>
...
<resources>
...
<resource scope="module|server">lib/wizard.jar</resource>
</resources>
</library>
</components>
<resources>
<resource scope="module|server">lib/wizard.jar</resource>
</resources>
...
</module>
With each test, the FirstSpirit server has been restarted!
The result:
- the classloader always took the buggy wizard classes provided in the "org.netbeans"-package within "fs-client.jar"
- always the below effect
What helped: removing the "org.netbeans" package out of the "fs-client.jar" and adding the "wizard.jar" to the library component (without any scope attribute -> default is module, details see community entry above).
Any more suggestions? Otherwise I will open a bug report. The best solution would be: updating "fs-client.jar" with the bug-fixed "org.netbeans" package. This is a task for e-Spirit
Hi Holger,
could you provide the sources of your test module, so that we can have a look at it?
We can't update external dependencies within build releases, so don't expect any updates of this library in the near future.
Hi Chris,
when you can't update the integrated "org.netbeans" JAR in the near future within the FirstSpirit build process, then you should allow updating the JAR in a custom module and let it use there. Currently, that seems not to work.
Is it absolutely necessary to provide the source? What about the binaries and where to deliver it?
Please, tell me.
A simple module that demonstrates the problem would speed up the process. We probably don't need your entire source code, just a simple module that
You can send the source to our helpdesk, just refer to this community thread.
Nachricht geändert durch Christoph Feddersen
Hi Christoph,
it's quite as easy for you to create such a module based on the following example code provided by "heise":
http://www.heise.de/ix/artikel/Zauberhafte-Dialoge-506947.html
Just insert your Hello-World-wizard in a FirstSpirit server-wide visible library component and call it from a BeanShell or Executable-Class wrapper. Ensure using the following "Summary"-class to show a sum of the wizards result via:
I'm sure, you are faster than me to build a such a demo module. Bosch is not allowed to offer code to others without any approval.