I just commited a patch that should fix this issue. Could you please
test the current trunk and see whether it works for you? You can
comment on the Jira issue I created
(https://issues.apache.org/jira/browse/FELIX-438).
regards,
Karl
On 12/17/07, Elvy <[EMAIL PROTECTED]> wrote:
>
> I am positive, when I replace "WindowsXP" by "Win32" I get :
>
> __
> org.osgi.framework.BundleException: Unable to select a native library
> clause.
> at
> org.apache.felix.framework.util.manifestparser.ManifestParser.getSelectedLibraryClause(ManifestParser.java:33
> 7)
> at
> org.apache.felix.framework.util.manifestparser.ManifestParser.getLibraries(ManifestParser.java:294)
> at org.apache.felix.framework.Felix.createModule(Felix.java:3351)
> at
> org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3277)
> at org.apache.felix.framework.Felix.installBundle(Felix.java:2231)
> at org.apache.felix.framework.Felix.installBundle(Felix.java:2145)
> at
> org.apache.felix.framework.Felix.processAutoProperties(Felix.java:3667)
> at org.apache.felix.framework.Felix.start(Felix.java:803)
> at org.apache.felix.main.Main.main(Main.java:195)
> __
>
> I'm using the v1.0.1 as provided on Felix site.
>
>
>
> Richard S. Hall wrote:
> >
> > Elvy wrote:
> >> I've done some research and found interesting things.
> >>
> >> 1 : For my example to work, I should have put
> >>
> >> <Bundle-NativeCode>LcdTimer.dll;osname=WindowsXP;processor=x86</Bundle-NativeCode>.
> >>
> >> Can we say that the parameters osname and processor are, among the all
> >> others, the only mandatory ones? Or does OSGi framework simply needs a
> >> non-ambiguous clause?
> >>
> >
> > Yes, I think those are the important one.
> >
> >> 2 : OSGi r4 clearly stats that the osname Win32 is an alias for all
> >> windows
> >> platforms. Felix does not accept this alias. For my case to work, using
> >> felix 1.0.1, I need to use exactly osname=WindowsXP (beware of case
> >> sensitivity!).
> >>
> >> Have Felix guys envisaged to strictly comply to OSGi r4 specs? Due to the
> >> context of this question, I'm only talking about Bundle-NativeCode
> >> parameters.
> >>
> >
> > That's the goal.
> >
> > Looking at the code in R4LibraryClause I see this method:
> >
> > public static String normalizeOSName(String value)
> > {
> > value = value.toLowerCase();
> >
> > if (value.startsWith("win"))
> > {
> > String os = "win";
> > if (value.indexOf("32") >= 0 || value.indexOf("*") >= 0)
> > {
> > os = "win32";
> > }
> > ...
> >
> > So basically, it gets the lowercase version of the value, checks to see
> > if its starts with "win" and checks to see if the string contains
> > "32"...if so, it normalizes the value to "win32"...seems like it should
> > be working. Could you verify that it is not...once verified, please open
> > a JIRA issue against the framework component to track the bug. Thanks
> > for the feedback.
> >
> > -> richard
> >
> >> Page 93 of the r4 specs, there's a listing of all the parameter values &
> >> aliases defined by the OSGi alliance.
> >>
> >> Cheers all,
> >>
> >> Elvy.
> >>
> >>
> >> Elvy wrote:
> >>
> >>> Hi all,
> >>>
> >>> I need to load .dll or .so libraries but I just don't succeed. Let's
> >>> focus
> >>> on the windows platform for the moment.
> >>>
> >>> my pom looks like this, for the maven-bundle-plugin:
> >>> __
> >>> <plugin>
> >>> <groupId>org.apache.felix</groupId>
> >>> <artifactId>maven-bundle-plugin</artifactId>
> >>> <version>1.1.0-SNAPSHOT</version>
> >>> <extensions>true</extensions>
> >>> <configuration>
> >>> <instructions>
> >>> <Bundle-Name>Ted</Bundle-Name>
> >>> <Bundle-Version>${pom.version}</Bundle-Version>
> >>>
> >>> <Private-Package>com.thalesgroup.ted</Private-Package>
> >>> <Export-Package>
> >>> com.thalesgroup.ted.openapi.*;version:=0.1,
> >>> com.jidesoft.*;version:=2.2.1.05,
> >>> org.apache.log4j.*;version:=1.2.14
> >>> </Export-Package>
> >>> <Import-Package>
> >>> *;resolution:=optional,
> >>> </Import-Package>
> >>>
> >>> <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
> >>> <Embed-Transitive>true</Embed-Transitive>
> >>>
> >>> <Bundle-Activator>com.thalesgroup.ted.TedActivator</Bundle-Activator>
> >>>
> >>> <Include-Resource>native/win32/LcdTimer.dll</Include-Resource>
> >>> <Bundle-NativeCode>
> >>> /LcdTimer.dll
> >>> </Bundle-NativeCode>
> >>> </instructions>
> >>> </configuration>
> >>> </plugin>
> >>> __
> >>>
> >>> I checked the resulting jar and it does contain the .dll in the root
> >>> directory.
> >>>
> >>> When ran in Felix, and I get the following...
> >>> __
> >>> Welcome to Felix.
> >>> =================
> >>>
> >>> org.osgi.framework.BundleException: Unable to select a native library
> >>> clause.
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getSelectedLibraryClause(ManifestParser.java:337)
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getLibraries(ManifestParser.java:294)
> >>> at
> >>> org.apache.felix.framework.Felix.createModule(Felix.java:3351)
> >>> at
> >>> org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3277)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2231)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2145)
> >>> at
> >>> org.apache.felix.framework.Felix.processAutoProperties(Felix.java:3667)
> >>> at org.apache.felix.framework.Felix.start(Felix.java:803)
> >>> at org.apache.felix.main.Main.main(Main.java:195)
> >>> ERROR: Auto-properties install. (org.osgi.framework.BundleException:
> >>> Could
> >>> not create bundle object.)
> >>> org.osgi.framework.BundleException: Unable to select a native library
> >>> clause.
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getSelectedLibraryClause(ManifestParser.java:337)
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getLibraries(ManifestParser.java:294)
> >>> at
> >>> org.apache.felix.framework.Felix.createModule(Felix.java:3351)
> >>> at
> >>> org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3277)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2231)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2145)
> >>> at
> >>> org.apache.felix.framework.Felix.processAutoProperties(Felix.java:3667)
> >>> at org.apache.felix.framework.Felix.start(Felix.java:803)
> >>> at org.apache.felix.main.Main.main(Main.java:195)
> >>> org.osgi.framework.BundleException: Unable to select a native library
> >>> clause.
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getSelectedLibraryClause(ManifestParser.java:337)
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getLibraries(ManifestParser.java:294)
> >>> at
> >>> org.apache.felix.framework.Felix.createModule(Felix.java:3351)
> >>> at
> >>> org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3277)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2231)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2145)
> >>> at
> >>> org.apache.felix.framework.Felix.processAutoProperties(Felix.java:3699)
> >>> at org.apache.felix.framework.Felix.start(Felix.java:803)
> >>> at org.apache.felix.main.Main.main(Main.java:195)
> >>> ERROR: Auto-properties start. (org.osgi.framework.BundleException: Could
> >>> not create bundle object.)
> >>> org.osgi.framework.BundleException: Unable to select a native library
> >>> clause.
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getSelectedLibraryClause(ManifestParser.java:337)
> >>> at
> >>> org.apache.felix.framework.util.manifestparser.ManifestParser.getLibraries(ManifestParser.java:294)
> >>> at
> >>> org.apache.felix.framework.Felix.createModule(Felix.java:3351)
> >>> at
> >>> org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3277)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2231)
> >>> at
> >>> org.apache.felix.framework.Felix.installBundle(Felix.java:2145)
> >>> at
> >>> org.apache.felix.framework.Felix.processAutoProperties(Felix.java:3699)
> >>> at org.apache.felix.framework.Felix.start(Felix.java:803)
> >>> at org.apache.felix.main.Main.main(Main.java:195)
> >>> DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
> >>> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> >>> DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
> >>> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> >>> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> >>> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> >>> -> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
> >>> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
> >>> __
> >>>
> >>> Do I need to explicitly configure RuntimePermission[loadLibrary.<library
> >>> name>] as it is said in the OSGi r4 core specification (page 58 of the
> >>> pdf).
> >>>
> >>>
> >>
> >>
> >> -----
> >> Tell me something you don't know!
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> -----
> Tell me something you don't know!
> --
> View this message in context:
> http://www.nabble.com/Bundle-NativeCode%2C-how-to...-tp14337619p14370285.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Karl Pauls
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]