Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orbit-dev] Problem with com.github.jnr.posix provided through Orbit

On 6/29/21 6:35 PM, Roland Grunberg wrote:
> I ran into this a while ago when first creating the stack in OSGi. I
> opted to do a Require-Bundle on those used through reflection :
> I suspect the same approach is probably needed for jnr.posix. If adding
> those lines for Require-Bundle fixes things, we can probably update the
> package. If you can create a patch for this on 
> that would be great. Otherwise, I can probably quickly make one but I'd
> just need to know if the result fixes things.
> Cheers,

Hey Roland, thank you for your quick reply!

Your suggestion sadly doesn't fix the issue.

I explicitly added the dependencies to the target platform:

		<location includeAllPlatforms="false" includeConfigurePhase="true"
includeMode="planner" includeSource="true" type="InstallableUnit">
			<unit id="com.github.jnr.ffi" version="2.1.12.v20200513-1859"/>
			<unit id="com.github.jnr.jffi" version="1.2.23.v20200501-1917"/>
			<unit id="com.github.jnr.posix" version="3.0.54.v20200501-1917"/>
			<unit id="com.github.jnr.jffi.native" version="1.2.23.v20200501-1917"/>



Could it be possible that I also would need to require
While I can add com.github.jnr.jffi.native to my target platform,
an explicit require in the MANIFEST.MF fails (Unsatisfied version
constraint: 'com.github.jnr.jffi.native: 0.0.0').

So the exception still is:

	Caused by: java.lang.ClassNotFoundException:
			at java.base/java.lang.ClassLoader.findClass(
			at jnr.ffi.provider.jffi.AsmClassLoader.findClass(
			at java.base/java.lang.ClassLoader.loadClass(
			at java.base/java.lang.ClassLoader.loadClass(
			... 73 more

Greetings, Fabian

Back to the top