-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown dbf protocol #400
Comments
Just a quick update to inform that reading directly from a file worked, so in a sense I'am unblocked. |
Yes, this is the #266 issue. I am sorry not to have improved that in a 1.6.x release. I am reluctant to further implement the I have some code in the works to provide a usable scheme that works at the jar level (so then your individual resource URL would just be a As a workaround until then, if you want to build a locally patched PL/Java with the Another workaround would be to use the SELECT entryimage
FROM
sqlj.jar_repository
JOIN sqlj.jar_entry USING (jarId)
WHERE jarname = 'myjar' and entryname = 'schema.xsd'; Admittedly, that's pretty much like repeating by hand what the Either workaround would have a limited lifespan, as when the PL/Java version with a working alternative is released, you would want to use that (and such a release will probably have changes in the You could sort of future-proof it by coding it to just try the straightforward URL way and try the fallback in an exception handler (or vice versa); that way you would not have to synchronize a new version with a new PL/Java release. |
Many tanks for the detailed answer and for explaining a bit more on the gloomy future of dbf protocol :) |
Hello
I have an issue similar to #266 though it looks sligthly different since I'am using pl Java 1.6.3 REL1_6_STABLE.
I'am on JDK 17+
Here is the detailed description of the issue after some debugging.
Problem is triggered by the loading of XSD schema.
I get the URL of the schema. It works and returns an URL : dbf://localhost/1101215.
The jar_entry is here and its id matches exactly the schema.xsd file that is wrapped into the jar.
Problem happens in the next step when I want to instantiate the Schema ( 3rd line of the snipped above)
After initialising many Jaxb and Xml stuff we arrive at the actual URL reading.
It happens like that in the java.net.URL class :
where protocol = "dbf"
Here the main point in that in handlers Hashtable only "sqlj protocol is registered" by pljava and all fallback strategies to get the handler are returning null.
I see pljava has 2 classes that override URLStreamHandler. One override for the sqlj protocol that is registered in the URL handlers. The other one which looks the most important is the EntryStreamHandler that performs the actual query to load the serialized image of the classes and ressources. But this one is not registered in the URL handlers ( at least in the scenario I'am reproducing here)
I'am wondering why the EntryStreamHandler does register the dbf protocol as it would allow to directly load dbf URLs ?
Thanks for any help.
PS: Reading issue #266 I see there is option to load ressources as file system resources on database host machine, but I would prefer to avoid this approach as it adds more steps in the deployement of the pljava code and ressources. To be clear, I tried but I could not figure out where to put the file. I tried with URL like "file:///schema.xsd" but was unsure were to put the file exactly
The text was updated successfully, but these errors were encountered: