I have a 3rd party jar which is open source, which has no startup eligible classes. The classes I need to use have class names (not package name) that are all lower case. This seems to be a problem for BaseX. So, I tried to create a wrapper class, and the wrapper class loads but BaseX cannot load the dependent 3rd party jar no matter what I try. I have even tried putting the jar in the basex\lib folder. I have been able to install my wrapper class and run it successfully, but when I include the 3rd party jar, I get "Module not initialized" for the classes in the 3rd party jar because they are in another package. I have tried packaging everything into one jar, but that did not help. I have added a main class to the manifest of the 3rd party jar and it loaded fine but I cannot include the namespace in my xquery. My example is similar to the FOP.jar example on the file server, however I do not see query ussage example of this example. I have not yet tried the expath-pkg.xml route.
I have even tried putting the jar in the basex\lib folder.
This should work – as long as you start BaseX with the start scripts.
I think we’ll need a little, ideally self-contained example of your wrapper class and XQuery code to guess what may go wrong.
I have been able to install my wrapper class and run it successfully, but when I include the 3rd party jar, I get "Module not initialized" for the classes in the 3rd party jar because they are in another package. I have tried packaging everything into one jar, but that did not help. I have added a main class to the manifest of the 3rd party jar and it loaded fine but I cannot include the namespace in my xquery. My example is similar to the FOP.jar example on the file server, however I do not see query ussage example of this example. I have not yet tried the expath-pkg.xml route.
To the list: The problem has been fixed.
To E. Wray: I have revisited our Java bindings code: With 8.4, among other unifications, Java namespaces will not be rewritten anymore if they are prefixed with "java:" [1]. This allows you to also address Java code that does not follow the Java naming conventions.
A new snapshot is online [2].
Cheers, Christian
[1] http://docs.basex.org/wiki/Java_Bindings [2] http://files.basex.org/releases/latest/
On Tue, Dec 15, 2015 at 2:58 PM, E. Wray Johnson wray.johnson@gmail.com wrote:
I have a 3rd party jar which is open source, which has no startup eligible classes. The classes I need to use have class names (not package name) that are all lower case. This seems to be a problem for BaseX. So, I tried to create a wrapper class, and the wrapper class loads but BaseX cannot load the dependent 3rd party jar no matter what I try. I have even tried putting the jar in the basex\lib folder. I have been able to install my wrapper class and run it successfully, but when I include the 3rd party jar, I get "Module not initialized" for the classes in the 3rd party jar because they are in another package. I have tried packaging everything into one jar, but that did not help. I have added a main class to the manifest of the 3rd party jar and it loaded fine but I cannot include the namespace in my xquery. My example is similar to the FOP.jar example on the file server, however I do not see query ussage example of this example. I have not yet tried the expath-pkg.xml route.
basex-talk@mailman.uni-konstanz.de