> It may also answer my second question, where I was referring to expath > packaging and if that would make any difference - when compared to having a > pure JAR with the Java classes (and required libraries). It sounds like > expath packaging does not make a difference. Please correct me if I got this > wrong.
Right: EXPath is just another way of packaging the code. The XQuery parser will handle all modules equally, no matter if they have initially been packaged as XAR or via our own packaging mechanisms. After having read your initial mail for a second time, I noticed I may have got your setup a little wrong. I think it will be easier to find a solution if we manage to construct a little example that shows the behavior you reported. Otherwise, there may be too many open questions to solve (how do you import and initialize your Java Code? is initialization identical to creating a class instance? is the initialization code embedded in global variables? etc). I have attached a basic set of files that (I believe) simulates your setup. Could you extend it for me, or comment back what I may have wrongly understood?
<<attachment: johannes.zip>>