-
Notifications
You must be signed in to change notification settings - Fork 590
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
Javacpp does not export package required by presets #483
Comments
For anybody running into the same issue, here is what I did to fix it for me: I copied the Would still be great if JavaCPP could be changed to export that package in an OSGI context. |
Could you open a pull request with changes to fix this?
|
/cc @timothyjward |
If this package is part of the public API (which it seems to be from the big report) it needs a package-info.java and Export Annotation to tell the bnd-maven-plugin to export it. |
I had the same problem using javacpp and CPython with an Eclipse/OSGi application and came up with the same solution. However I wonder if the |
Most likely, yes. Please send a pull request if you can! Thanks /cc @HGuillemet |
Presets such as the openblas preset in recent versions inherit from
org.bytedeco.javacpp.presets.javacpp
:In an OSGI context, this leads to a ClassNotFoundException being thrown as part of loading the class annotations:
I only discover the above exception by putting a breakpoint in the constructor of the
TypeNotPresentExceptionProxy
...Otherwise, here is a stack trace showing the annotation loading:
As far as I can tell is because the
org.bytedeco.javacpp.presets
is actually not exported from the JavaCPP JAR:Unfortunately, the 1.5.2 JavaCPP also hast some issue with OSGi that I currently do not remember. So I have to combine JavaCPP 1.5.4 with openblas 0.3.7-1.5.2 because the latter is the last version that comes without the
inherit = javacpp.class
... but of course then I get warnings telling me that it is probably a bad idea to mix JavaCPP 1.5.4 with a lib that was build against the older 1.5.2 version.The text was updated successfully, but these errors were encountered: