Maybe someone can give me an idea as to what I’ve done wrong! I’m new to both Java and Servoy and figure I’ve done something wrong…
I have a plugin (very early stages of testing) that uses additional libraries, so these jar files need to be located within their own subfolder of the plugin directory and specified in the ‘<Resources…’ section of the appropriately-named jnlp file. I believe that has been done correctly because I have followed the loading of the plugin in the Servoy log and added to the jnlp the jar files within which classes not defined were located (and placed copies of the jar files in the proper subfolder)… several problems were solved in this way (so I THINK I’ve been doing it right!).
However, after adding the last library (and removing the offending missing class error), I received a new ‘class missing’ error as the plugin was initialized. The missing class is within the same jar as was just added (probably imported by one of the library’s classes instantiated earlier in the intialization process?), but Servoy seems not to find it…
I’m at a bit of a loss and haven’t found anything that really sounds similar on the forum…
Any suggestions (including that I’ve done something completely idiotic… ) would be appreciated!
How was the vacation? (I’m the bearded, ponytailed person from Adsails who met you at your booth at Servoyworld - we spoke about ecosystem valuation, among other topics…)
The class that is now causing the problem is in the same Jar (but different package… hmmm…) as another class that Servoy DOES find. Neither of these classes are called directly by my code, but they are used (I assume) by the web services libraries that I do call. Obviously, I’ve pointed an Eclipse variable to these libraries during development (and all works well from within Eclipse), but the libraries need to be included with the plugin, don’t they (especially as they’re not part of the ‘standard’ java…)?
My impression was that I was (by following the errors Servoy logged on loading and initializing the plugin) slowly ‘finding’ the libraries that would have to be included in a plugin subfolder and specified within the jnlp file. But, once the jar file has been specified and located, aren’t all packages within that file available for loading by Servoy? Or will it only load one package (maybe one class?) per jar…
Forgive my ignorance… as I said, I’m piecing together and learning Java and Servoy at the same time and probably have more holes in my knowledge than an old dirt road after a heavy rainstorm… (bad analogy?).
I've pointed an Eclipse variable to these libraries during development (and all works well from within Eclipse), but the libraries need to be included with the plugin, don't they (especially as they're not part of the 'standard' java...)?
```It is this line that puzzles me now. Do you include the libs in the plug-in? Or not? If the first, you should not load them again...
No, these libraries (part of the Sun Webservices libraries) are not included within the plugin jar, but I am including them as external jar files within the jnlp file (and in the subdirectory of ‘plugins’) so that they can be loaded when the plugin is loaded.
One of the library jar files contains several packages (not unusual it seems). Servoy loads at least one of the contained classes that the plugin needs, but can’t seem to find a second class, even though I have verified that it is contained within the same jar file (but in a different java package). So, I’m at a bit of a loss as to how to get this package to load (if it has not already) as Servoy has already ‘looked’ through the jar and loaded at least one class (and probably more) from within it. In my ignorance, I would think that the second class would also be found…
Do I explicitly import this package/class into something of mine, just to make sure that it gets loaded? Or am I missing something else…
Pete, I am sure it is something simple and you are doing something wrong for sure. What it is is hard to find this way.
You would almost need to expose you project to see what is happening.
It can be your classpath, your import, your plug-in build, your jnlp, whatever…
Sorry but that’s the way it is (I guess)…
The main reason I’m not is certainly nothing proprietary (this is a very basic thing I’m trying), just that I hate imposing! But I really do appreciate the help.
Just getting the idea that I’m not making an obvious (to someone else) major java/Servoy blunder is a big help…
The problem was not that the class wasn’t found, but that it was never initialized. When ‘removing’ some of the code I used to test the plugin functionality from within Eclipse, I’d inadvertently also removed some of the initialization of some objects…
I’ve still got some glitches, but Servoy is finding all the classes and things are progressing.