You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Pierre De Rop <pi...@gmail.com> on 2018/11/07 23:03:12 UTC

Re: Regarding compiling Apache Felix Deployment Admin from sources

Hello Mantas,

I have committed a test in [1], which tries to reproduce the problem using
the same bundles you are using, and also using equinox.
However, it seems to work for me.

I have not rebuilt the old deploymentpackage 0.9.5 version because it can
be downloaded from [2].

so, maybe you could checkout the test and then try to adapt it in order to
reproduce the problem ? to get the test, just checkout like this:

svn checkout
http://svn.apache.org/repos/asf/felix/sandbox/pderop/test.deploymentpackage.with.equinox

then start the framework:

cd test.deploymentpackage.with.equinox
java -jar org.eclipse.osgi_3.11.1.v20160708-1632.jar -console

osgi> lb
START LEVEL 6
  ID|State      |Level|Name
   0|Active     |    0|OSGi System Bundle (3.11.1.v20160708-1632)
   1|Active     |    4|osgi.cmpn (4.3.0.201111022214)
   2|Active     |    4|Apache Felix Gogo Command (0.10.0.v201209301215)
   3|Active     |    4|Apache Felix Gogo Runtime (0.10.0.v201209301036)
   4|Active     |    4|Apache Felix Gogo Shell (0.10.0.v201212101605)
   5|Active     |    4|Configuration Admin (1.1.200.v20160324-1850)
   6|Active     |    4|Common Eclipse Runtime (3.8.0.v20160509-1230)
   7|Active     |    4|Declarative Services (1.4.400.v20160226-2036)
   8|Active     |    4|Event Admin (1.3.200.v20160324-1850)
   9|Active     |    4|Meta Type (1.4.200.v20160324-1850)
  10|Active     |    4|Extension Registry Support (3.6.100.v20160223-2218)
  11|Active     |    4|Equinox Util Bundle (1.0.500.v20130404-1337)
  12|Resolved   |    4|System extension fragment for 'sun.misc' (1.0.200)
  13|Active     |    4|OSGi Release 4.2.0 Utility Classes
(3.3.100.v20150423-1351)
  14|Active     |    4|Apache Felix Dependency Manager (3.0.0)
  15|Active     |    4|Apache Felix Deployment Admin (0.9.5)
  16|Resolved   |    4|OSGi Release 4.2.0 Services (3.5.100.v20160504-1419)
  17|Active     |    4|Apache Felix Dependency Manager Shell (3.0.0)

osgi> dm
[15] org.apache.felix.deploymentadmin
 org.osgi.service.deploymentadmin.DeploymentAdmin() registered
   org.osgi.service.packageadmin.PackageAdmin service required available
   org.osgi.service.event.EventAdmin service optional available
   org.osgi.service.log.LogService service optional available



so, if you can adapt the test to reproduce the issue, then let us know ?

kind regards
Pierre

[1]
http://svn.apache.org/viewvc/felix/sandbox/pderop/test.deploymentpackage.with.equinox/
[2]
http://archive.apache.org/dist/felix/org.apache.felix.deploymentadmin-0.9.5.jar

On Tue, Oct 30, 2018 at 8:00 AM Mantas Gridinas <mg...@gmail.com> wrote:

> Hi!
>
> The main issue is that Eclipse Kura 3.2.0 (the OSGi runtime we're using)
> came with that particular version, so to retain as much compatibility,
> behavior wise, as possible, I decided on choosing that particular version.
>
> Meanwhile, these are the currently installed bundles that come with eclipse
> kura by default.
>
> osgi> lb
> > START LEVEL 6
> >    ID|State      |Level|Name
> >     0|Active     |    0|OSGi System Bundle (3.11.1.v20160708-1632)
> >     1|Active     |    1|Configuration Admin (1.1.200.v20160324-1850)
> >     2|Resolved   |    1|System extension fragment for 'sun.misc'
> (1.0.200)
> >     3|Active     |    1|Common Eclipse Runtime (3.8.0.v20160509-1230)
> >     4|Active     |    1|Extension Registry Support
> (3.6.100.v20160223-2218)
> >     5|Active     |    1|Http Service Registry Extensions
> > (1.1.400.v20150715-1528)
> >     6|Active     |    1|Console plug-in (1.1.200.v20150929-1405)
> >     7|Active     |    1|Declarative Services (1.4.400.v20160226-2036)
> >     8|Active     |    1|Event Admin (1.3.200.v20160324-1850)
> >     9|Active     |    1|IO Connector Service (1.1.100.v20150430-1834)
> >    10|Active     |    1|Meta Type (1.4.200.v20160324-1850)
> >    11|Active     |    1|Equinox Util Bundle (1.0.500.v20130404-1337)
> >    12|Active     |    2|OSGi Release 4.2.0 Services
> > (3.5.100.v20160504-1419)
> >    13|Active     |    2|OSGi Release 4.2.0 Utility Classes
> > (3.3.100.v20150423-1351)
> >    14|Active     |    5|Apache Felix Gogo Command (0.10.0.v201209301215)
> >    15|Active     |    5|Apache Felix Gogo Runtime (0.10.0.v201209301036)
> >    16|Active     |    5|Apache Felix Gogo Shell (0.10.0.v201212101605)
> >    17|Active     |    3|KnowHowLab OSGi MonitorAdmin (1.0.2)
> >    18|Active     |    3|Apache Felix Dependency Manager (3.0.0)
> >    19|Installed  |    3|Apache Felix Deployment Admin (0.9.5)
> >    20|Active     |    3|osgi.cmpn (4.3.0.201111022214)
> >    21|Active     |    3|Wire Admin Service (1.0.600.v20150715-1528)
> >    22|Active     |    5|Jetty Http Service (3.4.0.v20170503-2025)
> >    23|Active     |    5|Http Services Servlet (1.4.0.v20170524-1452)
> >    24|Active     |    5|Jetty :: Continuation (9.4.7.v20170914)
> >    25|Active     |    5|Jetty :: Http Utility (9.4.7.v20170914)
> >    26|Active     |    5|Jetty :: IO Utility (9.4.7.v20170914)
> >    27|Active     |    5|Jetty :: Security (9.4.7.v20170914)
> >    28|Active     |    5|Jetty :: Server Core (9.4.7.v20170914)
> >    29|Active     |    5|Jetty :: Servlet Handling (9.4.7.v20170914)
> >    30|Active     |    5|Jetty :: Utilities (9.4.7.v20170914)
> >    31|Active     |    5|Servlet API Bundle (3.1.0.v201410161800)
> >    32|Active     |    3|Apache Commons FileUpload (1.3.2)
> >    33|Active     |    3|Commons IO (2.4.0)
> >    34|Active     |    3|slf4j-api (1.7.21)
> >    35|Active     |    3|jcl-over-slf4j (1.7.21)
> >    36|Resolved   |    3|slf4j-log4j12 (1.7.21)
> >    37|Resolved   |    3|Apache Log4j (1.2.17)
> >    38|Resolved   |    3|Kura wrapper for Apache log4j extras (1.1.100)
> >    39|Resolved   |    5|minimal-json (0.9.4)
> >    40|Active     |    3|HSQLDB (2.3.0)
> >    41|Active     |    3|H2 Database Engine (1.4.192)
> >    42|Resolved   |    3|Native libraries for 'com.codeminders.hidapi' on
> > ARM 6 HF (1.1.300)
> >    43|Active     |    3|Java API for working with Human Interface USB
> > Devices (HID) (1.1.300)
> >    44|Resolved   |    3|Comm (Incubation) (1.2.300)
> >    45|Active     |    3|Comm (Incubation) (1.2.300)
> >    46|Active     |    4|Apache Commons Lang (3.4.0)
> >    47|Active     |    4|usb4java (1.2.300)
> >    48|Active     |    4|usb4java-javax (1.2.300)
> >    49|Resolved   |    3|jdk.dio.armv6hf (1.0.300)
> >    50|Resolved   |    3|jdk.dio (1.0.300)
> >    51|Resolved   |    3|Native libraries for 'tinyb' on ARM 6 HF
> (1.0.100)
> >    52|Active     |    3|Tiny Bluetooth LE Library (1.0.100)
> >    53|Active     |    3|Apache Commons Net (3.1.0.v201205071737)
> >    54|Resolved   |    5|Apache Commons Exec (1.3.0)
> >    55|Active     |    3|jersey-min (2.22.2)
> >    56|Active     |    4|OSGi JAX-RS Connector (5.3.1.201602281253)
> >    57|Active     |    4|JAX-RS Gson Provider (2.3.0.201602281253)
> >    58|Active     |    4|OSGi - JAX-RS Security Provider
> > (2.2.0.201602281253)
> >    59|Resolved   |    3|Gson: Google Json Library for Java
> > (2.7.0.v20170129-0911)
> >    60|Active     |    3|org.eclipse.kura.api (1.4.0)
> >    61|Active     |    4|org.eclipse.kura.core (1.0.300)
> >    62|Active     |    4|org.eclipse.kura.core.certificates (1.0.300)
> >    63|Active     |    4|org.eclipse.kura.core.cloud (1.1.200)
> >    64|Active     |    4|org.eclipse.kura.core.comm (1.0.300)
> >    65|Active     |    4|org.eclipse.kura.core.configuration (2.0.0)
> >    66|Active     |    3|org.eclipse.kura.core.crypto (1.0.300)
> >    67|Active     |    4|org.eclipse.kura.core.deployment (1.1.300)
> >    68|Active     |    4|org.eclipse.kura.core.log (1.0.300)
> >    69|Active     |    4|org.eclipse.kura.core.net (1.0.300)
> >    70|Active     |    4|org.eclipse.kura.core.status (1.0.300)
> >    71|Active     |    5|org.eclipse.kura.deployment.agent (1.0.300)
> >    72|Active     |    4|org.eclipse.kura.linux.clock (1.0.300)
> >    73|Active     |    4|org.eclipse.kura.linux.command (1.0.200)
> >    74|Active     |    4|org.eclipse.kura.linux.position (1.0.300)
> >    75|Resolved   |    4|Native libraries for 'org.eclipse.kura.linux.usb'
> > on ARM 6 HF (1.0.300)
> >    76|Active     |    4|org.eclipse.kura.linux.usb (1.0.300)
> >    77|Active     |    4|org.eclipse.kura.linux.bluetooth (1.0.300)
> >    78|Active     |    4|org.eclipse.kura.ble.provider (1.0.100)
> >    79|Active     |    4|org.eclipse.kura.ble.ibeacon.provider (1.0.100)
> >    80|Active     |    4|org.eclipse.kura.ble.eddystone.provider (1.0.100)
> >    81|Active     |    4|org.eclipse.kura.linux.watchdog (1.0.300)
> >    82|Resolved   |    3|Camel :: Core :: Import sun.misc (1.0.200)
> >    83|Active     |    3|camel-core (2.17.2)
> >    84|Active     |    3|camel-core-osgi (2.17.2)
> >    85|Active     |    3|camel-kura (2.17.2)
> >    86|Active     |    3|camel-stream (2.17.2)
> >    87|Active     |    4|org.eclipse.kura.camel (1.2.200)
> >    88|Active     |    5|Camel Cloud Factory (1.1.200)
> >    89|Active     |    5|Plain XML router component (1.0.300)
> >    90|Active     |    4|Provider (1.0.100)
> >    91|Active     |    4|Kura Asset Accessor Provider (2.0.0)
> >    92|Active     |    4|Asset Cloudlet (1.0.200)
> >    93|Active     |    4|Asset Helper Service Provider (1.0.200)
> >    94|Active     |    4|org.eclipse.kura.asset.rest (1.0.100)
> >    95|Resolved   |    3|Guava: Google Core Libraries for Java (19.0.0)
> >    96|Resolved   |    3|Netty/Buffer (4.1.9.Final)
> >    97|Resolved   |    3|Netty/Codec (4.1.9.Final)
> >    98|Resolved   |    3|Netty/Codec/HTTP (4.1.9.Final)
> >    99|Resolved   |    3|Netty/Codec/MQTT (4.1.9.Final)
> >   100|Resolved   |    3|Netty/Common (4.1.9.Final)
> >   101|Resolved   |    3|Netty/Handler (4.1.9.Final)
> >   102|Resolved   |    3|Netty/Resolver (4.1.9.Final)
> >   103|Resolved   |    3|Netty/Transport (4.1.9.Final)
> >   104|Resolved   |    3|Netty/Transport/Native/Epoll (4.1.9.Final)
> >   105|Active     |    3|ActiveMQ Artemis MQTT Protocol (2.1.0)
> >   106|Resolved   |    3|ActiveMQ Artemis Native POM (2.1.0)
> >   107|Resolved   |    3|Apache Commons BeanUtils (1.9.2)
> >   108|Resolved   |    3|Apache Commons Collections (3.2.2)
> >   109|Resolved   |    3|Apache Geronimo JMS Spec 2.0 (1.0.0.alpha-2)
> >   110|Resolved   |    3|Apache Geronimo JSon Spec 1.0 (1.0.0.alpha-1)
> >   111|Resolved   |    3|geronimo-jta_1.1_spec (1.1.1)
> >   112|Resolved   |    3|JBoss Logging 3 (3.3.1.Final)
> >   113|Resolved   |    3|org.apache.activemq.artemis (2.1.0)
> >   114|Active     |    4|Artemis Broker for Eclipse Kura (1.0.100)
> >   115|Active     |    4|Simple MQTT broker component (1.0.100)
> >   116|Active     |    4|Plain XML configuration broker component
> (1.0.100)
> >   117|Active     |    4|File Move Deployment Hook Provider (1.0.0)
> >   118|Active     |    3|Kura Json Marshaller utility (1.0.0)
> >   119|Active     |    3|Kura XML Marshaller utility (1.0.0)
> >   120|Active     |    4|Driver Helper Service Provider (1.0.200)
> >   121|Active     |    4|Kura Localization (1.0.200)
> >   122|Resolved   |    5|Localization Resources (1.0.200)
> >   123|Active     |    4|Kura Base Utilities (1.0.200)
> >   124|Active     |    4|H2 Database Wire Components Provider (1.0.100)
> >   125|Active     |    4|Different Wire Components Provider (1.0.200)
> >   126|Active     |    4|Kura Wires Helper Service Provider (1.0.200)
> >   127|Active     |    4|Kura Wires Topology Management (1.0.200)
> >   128|Active     |    5|Conditional Wire Component Provider (1.0.0)
> >   129|Active     |    5|Join Wire Component Provider (1.0.0)
> >   130|Active     |    4|CloudService Relay (CloudService CAT) (1.0.100)
> >   131|Resolved   |    3|gwt-user (1.0.300)
> >   132|Active     |    6|org.eclipse.kura.web2 (2.0.300)
> >   133|Active     |    5|org.eclipse.kura.linux.gpio (1.0.300)
> >   134|Active     |    4|org.eclipse.kura.linux.net (1.0.300)
> >   135|Active     |    5|org.eclipse.kura.net.admin (1.0.300)
> >   136|Active     |    5|mToolkit Instrumentation Agent RPC Bundle
> > (3.0.0.20110411-0918)
> >
>
> Note that the "installed" deployment admin version is mine.
>
> This is what the original manifest looks like after building from sources:
>
> Manifest-Version: 1.0
> > Bundle-Description: A bundle that implements the Deployment Admin.
> > Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
> > Bundle-SymbolicName: org.apache.felix.deploymentadmin
> > Built-By: mantas
> > Bundle-ManifestVersion: 2
> > Bnd-LastModified: 1540881844991
> > Bundle-DocURL: http://www.apache.org/
> > Bundle-Vendor: The Apache Software Foundation
> > Import-Package: org.apache.felix.deploymentadmin,org.osgi.framework;ve
> >  rsion="[1.5,2)",org.osgi.service.deploymentadmin;version="[1,2)",org.
> >  osgi.service.deploymentadmin.spi;version="[1,2)"
> > Tool: Bnd-1.15.0
> > Export-Package: org.osgi.service.deploymentadmin;uses:="org.osgi.frame
> >  work";version="1.0",org.osgi.service.deploymentadmin.spi;uses:="org.o
> >  sgi.framework,org.osgi.service.deploymentadmin";version="1.0"
> > Bundle-Version: 0.9.5
> > Bundle-Name: Apache Felix Deployment Admin
> > Bundle-Activator: org.apache.felix.deploymentadmin.Activator
> > Created-By: Apache Maven Bundle Plugin
> > Build-Jdk: 1.8.0_181
> >
>
> Meanwhile this what the original manifest looks like - the one that I found
> in eclipse kura.
>
> Manifest-Version: 1.0
> > Export-Package: org.osgi.service.deploymentadmin;uses:="org.osgi.frame
> >  work";version="1.0",org.osgi.service.deploymentadmin.spi;uses:="org.o
> >  sgi.framework,org.osgi.service.deploymentadmin";version="1.0"
> > Built-By: jawi
> > Tool: Bnd-1.15.0
> > Bundle-Name: Apache Felix Deployment Admin
> > Created-By: Apache Maven Bundle Plugin
> > Bundle-Vendor: The Apache Software Foundation
> > Build-Jdk: 1.7.0_40
> > Bundle-Version: 0.9.5
> > Bnd-LastModified: 1386084826976
> > Bundle-Activator: org.apache.felix.deploymentadmin.Activator
> > Bundle-ManifestVersion: 2
> > Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
> > Bundle-Description: A bundle that implements the Deployment Admin.
> > Bundle-DocURL: http://www.apache.org/
> > Bundle-SymbolicName: org.apache.felix.deploymentadmin
> > Import-Package: org.apache.felix.dm;version="[3.0,4)",org.osgi.framewo
> >  rk;version="[1.5,2)",org.osgi.service.deploymentadmin;version="[1,2)"
> >  ,org.osgi.service.deploymentadmin.spi;version="[1,2)",org.osgi.servic
> >  e.event;version="[1.2,2)",org.osgi.service.log;version="[1.3,2)",org.
> >  osgi.service.packageadmin;version="[1.2,2)"
> >
>
> Rebuilding with import and export packages matching the target seems to
> result in same error, where it cannot find
> "org.apache.felix.deploymentadmin".
>
> Hope this helps.
>
> On Mon, Oct 29, 2018, 17:40 Karl Pauls <karlpauls@gmail.com wrote:
>
> > Hi,
> >
> > its hard to say what is going wrong without more context. Why are you
> > trying to compile this version of deploymentadmin and not a later one?
> > How does the manifest of the result look like? Why would it import
> > org.apache.felix.deploymentadmin? etc...
> >
> > regards,
> >
> > Karl
> > On Mon, Oct 29, 2018 at 1:13 PM Mantas Gridinas <mg...@gmail.com>
> > wrote:
> > >
> > > Hi!
> > >
> > > I'm trying to compile Apache Felix 0.9.5 Deployment Admin bundle from
> > > sources provided in
> > >
> >
> https://github.com/apache/felix/commit/33a2fd96113a0959337f8fde22df0fcfafdaed98#diff-70f3719ce35e71bd40c1ac3de64a621b
> > > and I got myself into an issue where an already existing osgi runtime
> > > (Eclipse Kura) fails to start it with the following exception:
> > >
> > > !ENTRY org.apache.felix.deploymentadmin 4 0 2018-10-29 14:04:53.322
> > > > !MESSAGE FrameworkEvent ERROR
> > > > !STACK 0
> > > > org.osgi.framework.BundleException: Could not resolve module:
> > > > org.apache.felix.deploymentadmin [19]
> > > >   Unresolved requirement: Import-Package:
> > org.apache.felix.deploymentadmin
> > > >
> > > >     at org.eclipse.osgi.container.Module.start(Module.java:444)
> > > >     at
> > > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
> > > >     at
> > > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600)
> > > >     at
> > > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
> > > >     at
> > > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
> > > >     at
> > > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
> > > >     at
> > > >
> >
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> > > >
> > > >
> > >     at
> > > >
> >
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> > > >
> > > >
> > > ...
> > > >
> > > !ENTRY org.eclipse.osgi 4 0 2018-10-29 14:05:35.130
> > > >
> > > !MESSAGE Bundle
> > > initial@reference
> > :file:../../kura/plugins/org.apache.felix.deploymentadmin_0.9.5.jar
> > > > was not resolved.
> > > >
> > >
> > > Are there any steps that I should take besides using bundle:bundle to
> > > properly build it and run it in osgi? JAPI checker seems to suggest
> that
> > my
> > > built osgi bundle jar is 100% compatible with the one that is provided
> in
> > > Eclipse Kura installation.
> > >
> > > Cheers.
> >
> >
> >
> > --
> > Karl Pauls
> > karlpauls@gmail.com
> >
>

Re: Regarding compiling Apache Felix Deployment Admin from sources

Posted by Mantas Gridinas <mg...@gmail.com>.
It seems that your test is working in order on my target machine. In
addition to that I managed to compile my modified version of apache felix
0.9.5 with the import headers provided from your test bundle.

I am unsure what happened here, as well as what fixed it, myself.

On Thu, Nov 8, 2018 at 1:09 AM Pierre De Rop <pi...@gmail.com> wrote:

> Hello Mantas,
>
> I have committed a test in [1], which tries to reproduce the problem using
> the same bundles you are using, and also using equinox.
> However, it seems to work for me.
>
> I have not rebuilt the old deploymentpackage 0.9.5 version because it can
> be downloaded from [2].
>
> so, maybe you could checkout the test and then try to adapt it in order to
> reproduce the problem ? to get the test, just checkout like this:
>
> svn checkout
>
> http://svn.apache.org/repos/asf/felix/sandbox/pderop/test.deploymentpackage.with.equinox
>
> then start the framework:
>
> cd test.deploymentpackage.with.equinox
> java -jar org.eclipse.osgi_3.11.1.v20160708-1632.jar -console
>
> osgi> lb
> START LEVEL 6
>   ID|State      |Level|Name
>    0|Active     |    0|OSGi System Bundle (3.11.1.v20160708-1632)
>    1|Active     |    4|osgi.cmpn (4.3.0.201111022214)
>    2|Active     |    4|Apache Felix Gogo Command (0.10.0.v201209301215)
>    3|Active     |    4|Apache Felix Gogo Runtime (0.10.0.v201209301036)
>    4|Active     |    4|Apache Felix Gogo Shell (0.10.0.v201212101605)
>    5|Active     |    4|Configuration Admin (1.1.200.v20160324-1850)
>    6|Active     |    4|Common Eclipse Runtime (3.8.0.v20160509-1230)
>    7|Active     |    4|Declarative Services (1.4.400.v20160226-2036)
>    8|Active     |    4|Event Admin (1.3.200.v20160324-1850)
>    9|Active     |    4|Meta Type (1.4.200.v20160324-1850)
>   10|Active     |    4|Extension Registry Support (3.6.100.v20160223-2218)
>   11|Active     |    4|Equinox Util Bundle (1.0.500.v20130404-1337)
>   12|Resolved   |    4|System extension fragment for 'sun.misc' (1.0.200)
>   13|Active     |    4|OSGi Release 4.2.0 Utility Classes
> (3.3.100.v20150423-1351)
>   14|Active     |    4|Apache Felix Dependency Manager (3.0.0)
>   15|Active     |    4|Apache Felix Deployment Admin (0.9.5)
>   16|Resolved   |    4|OSGi Release 4.2.0 Services (3.5.100.v20160504-1419)
>   17|Active     |    4|Apache Felix Dependency Manager Shell (3.0.0)
>
> osgi> dm
> [15] org.apache.felix.deploymentadmin
>  org.osgi.service.deploymentadmin.DeploymentAdmin() registered
>    org.osgi.service.packageadmin.PackageAdmin service required available
>    org.osgi.service.event.EventAdmin service optional available
>    org.osgi.service.log.LogService service optional available
>
>
>
> so, if you can adapt the test to reproduce the issue, then let us know ?
>
> kind regards
> Pierre
>
> [1]
>
> http://svn.apache.org/viewvc/felix/sandbox/pderop/test.deploymentpackage.with.equinox/
> [2]
>
> http://archive.apache.org/dist/felix/org.apache.felix.deploymentadmin-0.9.5.jar
>
> On Tue, Oct 30, 2018 at 8:00 AM Mantas Gridinas <mg...@gmail.com>
> wrote:
>
> > Hi!
> >
> > The main issue is that Eclipse Kura 3.2.0 (the OSGi runtime we're using)
> > came with that particular version, so to retain as much compatibility,
> > behavior wise, as possible, I decided on choosing that particular
> version.
> >
> > Meanwhile, these are the currently installed bundles that come with
> eclipse
> > kura by default.
> >
> > osgi> lb
> > > START LEVEL 6
> > >    ID|State      |Level|Name
> > >     0|Active     |    0|OSGi System Bundle (3.11.1.v20160708-1632)
> > >     1|Active     |    1|Configuration Admin (1.1.200.v20160324-1850)
> > >     2|Resolved   |    1|System extension fragment for 'sun.misc'
> > (1.0.200)
> > >     3|Active     |    1|Common Eclipse Runtime (3.8.0.v20160509-1230)
> > >     4|Active     |    1|Extension Registry Support
> > (3.6.100.v20160223-2218)
> > >     5|Active     |    1|Http Service Registry Extensions
> > > (1.1.400.v20150715-1528)
> > >     6|Active     |    1|Console plug-in (1.1.200.v20150929-1405)
> > >     7|Active     |    1|Declarative Services (1.4.400.v20160226-2036)
> > >     8|Active     |    1|Event Admin (1.3.200.v20160324-1850)
> > >     9|Active     |    1|IO Connector Service (1.1.100.v20150430-1834)
> > >    10|Active     |    1|Meta Type (1.4.200.v20160324-1850)
> > >    11|Active     |    1|Equinox Util Bundle (1.0.500.v20130404-1337)
> > >    12|Active     |    2|OSGi Release 4.2.0 Services
> > > (3.5.100.v20160504-1419)
> > >    13|Active     |    2|OSGi Release 4.2.0 Utility Classes
> > > (3.3.100.v20150423-1351)
> > >    14|Active     |    5|Apache Felix Gogo Command
> (0.10.0.v201209301215)
> > >    15|Active     |    5|Apache Felix Gogo Runtime
> (0.10.0.v201209301036)
> > >    16|Active     |    5|Apache Felix Gogo Shell (0.10.0.v201212101605)
> > >    17|Active     |    3|KnowHowLab OSGi MonitorAdmin (1.0.2)
> > >    18|Active     |    3|Apache Felix Dependency Manager (3.0.0)
> > >    19|Installed  |    3|Apache Felix Deployment Admin (0.9.5)
> > >    20|Active     |    3|osgi.cmpn (4.3.0.201111022214)
> > >    21|Active     |    3|Wire Admin Service (1.0.600.v20150715-1528)
> > >    22|Active     |    5|Jetty Http Service (3.4.0.v20170503-2025)
> > >    23|Active     |    5|Http Services Servlet (1.4.0.v20170524-1452)
> > >    24|Active     |    5|Jetty :: Continuation (9.4.7.v20170914)
> > >    25|Active     |    5|Jetty :: Http Utility (9.4.7.v20170914)
> > >    26|Active     |    5|Jetty :: IO Utility (9.4.7.v20170914)
> > >    27|Active     |    5|Jetty :: Security (9.4.7.v20170914)
> > >    28|Active     |    5|Jetty :: Server Core (9.4.7.v20170914)
> > >    29|Active     |    5|Jetty :: Servlet Handling (9.4.7.v20170914)
> > >    30|Active     |    5|Jetty :: Utilities (9.4.7.v20170914)
> > >    31|Active     |    5|Servlet API Bundle (3.1.0.v201410161800)
> > >    32|Active     |    3|Apache Commons FileUpload (1.3.2)
> > >    33|Active     |    3|Commons IO (2.4.0)
> > >    34|Active     |    3|slf4j-api (1.7.21)
> > >    35|Active     |    3|jcl-over-slf4j (1.7.21)
> > >    36|Resolved   |    3|slf4j-log4j12 (1.7.21)
> > >    37|Resolved   |    3|Apache Log4j (1.2.17)
> > >    38|Resolved   |    3|Kura wrapper for Apache log4j extras (1.1.100)
> > >    39|Resolved   |    5|minimal-json (0.9.4)
> > >    40|Active     |    3|HSQLDB (2.3.0)
> > >    41|Active     |    3|H2 Database Engine (1.4.192)
> > >    42|Resolved   |    3|Native libraries for 'com.codeminders.hidapi'
> on
> > > ARM 6 HF (1.1.300)
> > >    43|Active     |    3|Java API for working with Human Interface USB
> > > Devices (HID) (1.1.300)
> > >    44|Resolved   |    3|Comm (Incubation) (1.2.300)
> > >    45|Active     |    3|Comm (Incubation) (1.2.300)
> > >    46|Active     |    4|Apache Commons Lang (3.4.0)
> > >    47|Active     |    4|usb4java (1.2.300)
> > >    48|Active     |    4|usb4java-javax (1.2.300)
> > >    49|Resolved   |    3|jdk.dio.armv6hf (1.0.300)
> > >    50|Resolved   |    3|jdk.dio (1.0.300)
> > >    51|Resolved   |    3|Native libraries for 'tinyb' on ARM 6 HF
> > (1.0.100)
> > >    52|Active     |    3|Tiny Bluetooth LE Library (1.0.100)
> > >    53|Active     |    3|Apache Commons Net (3.1.0.v201205071737)
> > >    54|Resolved   |    5|Apache Commons Exec (1.3.0)
> > >    55|Active     |    3|jersey-min (2.22.2)
> > >    56|Active     |    4|OSGi JAX-RS Connector (5.3.1.201602281253)
> > >    57|Active     |    4|JAX-RS Gson Provider (2.3.0.201602281253)
> > >    58|Active     |    4|OSGi - JAX-RS Security Provider
> > > (2.2.0.201602281253)
> > >    59|Resolved   |    3|Gson: Google Json Library for Java
> > > (2.7.0.v20170129-0911)
> > >    60|Active     |    3|org.eclipse.kura.api (1.4.0)
> > >    61|Active     |    4|org.eclipse.kura.core (1.0.300)
> > >    62|Active     |    4|org.eclipse.kura.core.certificates (1.0.300)
> > >    63|Active     |    4|org.eclipse.kura.core.cloud (1.1.200)
> > >    64|Active     |    4|org.eclipse.kura.core.comm (1.0.300)
> > >    65|Active     |    4|org.eclipse.kura.core.configuration (2.0.0)
> > >    66|Active     |    3|org.eclipse.kura.core.crypto (1.0.300)
> > >    67|Active     |    4|org.eclipse.kura.core.deployment (1.1.300)
> > >    68|Active     |    4|org.eclipse.kura.core.log (1.0.300)
> > >    69|Active     |    4|org.eclipse.kura.core.net (1.0.300)
> > >    70|Active     |    4|org.eclipse.kura.core.status (1.0.300)
> > >    71|Active     |    5|org.eclipse.kura.deployment.agent (1.0.300)
> > >    72|Active     |    4|org.eclipse.kura.linux.clock (1.0.300)
> > >    73|Active     |    4|org.eclipse.kura.linux.command (1.0.200)
> > >    74|Active     |    4|org.eclipse.kura.linux.position (1.0.300)
> > >    75|Resolved   |    4|Native libraries for
> 'org.eclipse.kura.linux.usb'
> > > on ARM 6 HF (1.0.300)
> > >    76|Active     |    4|org.eclipse.kura.linux.usb (1.0.300)
> > >    77|Active     |    4|org.eclipse.kura.linux.bluetooth (1.0.300)
> > >    78|Active     |    4|org.eclipse.kura.ble.provider (1.0.100)
> > >    79|Active     |    4|org.eclipse.kura.ble.ibeacon.provider (1.0.100)
> > >    80|Active     |    4|org.eclipse.kura.ble.eddystone.provider
> (1.0.100)
> > >    81|Active     |    4|org.eclipse.kura.linux.watchdog (1.0.300)
> > >    82|Resolved   |    3|Camel :: Core :: Import sun.misc (1.0.200)
> > >    83|Active     |    3|camel-core (2.17.2)
> > >    84|Active     |    3|camel-core-osgi (2.17.2)
> > >    85|Active     |    3|camel-kura (2.17.2)
> > >    86|Active     |    3|camel-stream (2.17.2)
> > >    87|Active     |    4|org.eclipse.kura.camel (1.2.200)
> > >    88|Active     |    5|Camel Cloud Factory (1.1.200)
> > >    89|Active     |    5|Plain XML router component (1.0.300)
> > >    90|Active     |    4|Provider (1.0.100)
> > >    91|Active     |    4|Kura Asset Accessor Provider (2.0.0)
> > >    92|Active     |    4|Asset Cloudlet (1.0.200)
> > >    93|Active     |    4|Asset Helper Service Provider (1.0.200)
> > >    94|Active     |    4|org.eclipse.kura.asset.rest (1.0.100)
> > >    95|Resolved   |    3|Guava: Google Core Libraries for Java (19.0.0)
> > >    96|Resolved   |    3|Netty/Buffer (4.1.9.Final)
> > >    97|Resolved   |    3|Netty/Codec (4.1.9.Final)
> > >    98|Resolved   |    3|Netty/Codec/HTTP (4.1.9.Final)
> > >    99|Resolved   |    3|Netty/Codec/MQTT (4.1.9.Final)
> > >   100|Resolved   |    3|Netty/Common (4.1.9.Final)
> > >   101|Resolved   |    3|Netty/Handler (4.1.9.Final)
> > >   102|Resolved   |    3|Netty/Resolver (4.1.9.Final)
> > >   103|Resolved   |    3|Netty/Transport (4.1.9.Final)
> > >   104|Resolved   |    3|Netty/Transport/Native/Epoll (4.1.9.Final)
> > >   105|Active     |    3|ActiveMQ Artemis MQTT Protocol (2.1.0)
> > >   106|Resolved   |    3|ActiveMQ Artemis Native POM (2.1.0)
> > >   107|Resolved   |    3|Apache Commons BeanUtils (1.9.2)
> > >   108|Resolved   |    3|Apache Commons Collections (3.2.2)
> > >   109|Resolved   |    3|Apache Geronimo JMS Spec 2.0 (1.0.0.alpha-2)
> > >   110|Resolved   |    3|Apache Geronimo JSon Spec 1.0 (1.0.0.alpha-1)
> > >   111|Resolved   |    3|geronimo-jta_1.1_spec (1.1.1)
> > >   112|Resolved   |    3|JBoss Logging 3 (3.3.1.Final)
> > >   113|Resolved   |    3|org.apache.activemq.artemis (2.1.0)
> > >   114|Active     |    4|Artemis Broker for Eclipse Kura (1.0.100)
> > >   115|Active     |    4|Simple MQTT broker component (1.0.100)
> > >   116|Active     |    4|Plain XML configuration broker component
> > (1.0.100)
> > >   117|Active     |    4|File Move Deployment Hook Provider (1.0.0)
> > >   118|Active     |    3|Kura Json Marshaller utility (1.0.0)
> > >   119|Active     |    3|Kura XML Marshaller utility (1.0.0)
> > >   120|Active     |    4|Driver Helper Service Provider (1.0.200)
> > >   121|Active     |    4|Kura Localization (1.0.200)
> > >   122|Resolved   |    5|Localization Resources (1.0.200)
> > >   123|Active     |    4|Kura Base Utilities (1.0.200)
> > >   124|Active     |    4|H2 Database Wire Components Provider (1.0.100)
> > >   125|Active     |    4|Different Wire Components Provider (1.0.200)
> > >   126|Active     |    4|Kura Wires Helper Service Provider (1.0.200)
> > >   127|Active     |    4|Kura Wires Topology Management (1.0.200)
> > >   128|Active     |    5|Conditional Wire Component Provider (1.0.0)
> > >   129|Active     |    5|Join Wire Component Provider (1.0.0)
> > >   130|Active     |    4|CloudService Relay (CloudService CAT) (1.0.100)
> > >   131|Resolved   |    3|gwt-user (1.0.300)
> > >   132|Active     |    6|org.eclipse.kura.web2 (2.0.300)
> > >   133|Active     |    5|org.eclipse.kura.linux.gpio (1.0.300)
> > >   134|Active     |    4|org.eclipse.kura.linux.net (1.0.300)
> > >   135|Active     |    5|org.eclipse.kura.net.admin (1.0.300)
> > >   136|Active     |    5|mToolkit Instrumentation Agent RPC Bundle
> > > (3.0.0.20110411-0918)
> > >
> >
> > Note that the "installed" deployment admin version is mine.
> >
> > This is what the original manifest looks like after building from
> sources:
> >
> > Manifest-Version: 1.0
> > > Bundle-Description: A bundle that implements the Deployment Admin.
> > > Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
> > > Bundle-SymbolicName: org.apache.felix.deploymentadmin
> > > Built-By: mantas
> > > Bundle-ManifestVersion: 2
> > > Bnd-LastModified: 1540881844991
> > > Bundle-DocURL: http://www.apache.org/
> > > Bundle-Vendor: The Apache Software Foundation
> > > Import-Package: org.apache.felix.deploymentadmin,org.osgi.framework;ve
> > >  rsion="[1.5,2)",org.osgi.service.deploymentadmin;version="[1,2)",org.
> > >  osgi.service.deploymentadmin.spi;version="[1,2)"
> > > Tool: Bnd-1.15.0
> > > Export-Package: org.osgi.service.deploymentadmin;uses:="org.osgi.frame
> > >  work";version="1.0",org.osgi.service.deploymentadmin.spi;uses:="org.o
> > >  sgi.framework,org.osgi.service.deploymentadmin";version="1.0"
> > > Bundle-Version: 0.9.5
> > > Bundle-Name: Apache Felix Deployment Admin
> > > Bundle-Activator: org.apache.felix.deploymentadmin.Activator
> > > Created-By: Apache Maven Bundle Plugin
> > > Build-Jdk: 1.8.0_181
> > >
> >
> > Meanwhile this what the original manifest looks like - the one that I
> found
> > in eclipse kura.
> >
> > Manifest-Version: 1.0
> > > Export-Package: org.osgi.service.deploymentadmin;uses:="org.osgi.frame
> > >  work";version="1.0",org.osgi.service.deploymentadmin.spi;uses:="org.o
> > >  sgi.framework,org.osgi.service.deploymentadmin";version="1.0"
> > > Built-By: jawi
> > > Tool: Bnd-1.15.0
> > > Bundle-Name: Apache Felix Deployment Admin
> > > Created-By: Apache Maven Bundle Plugin
> > > Bundle-Vendor: The Apache Software Foundation
> > > Build-Jdk: 1.7.0_40
> > > Bundle-Version: 0.9.5
> > > Bnd-LastModified: 1386084826976
> > > Bundle-Activator: org.apache.felix.deploymentadmin.Activator
> > > Bundle-ManifestVersion: 2
> > > Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
> > > Bundle-Description: A bundle that implements the Deployment Admin.
> > > Bundle-DocURL: http://www.apache.org/
> > > Bundle-SymbolicName: org.apache.felix.deploymentadmin
> > > Import-Package: org.apache.felix.dm;version="[3.0,4)",org.osgi.framewo
> > >  rk;version="[1.5,2)",org.osgi.service.deploymentadmin;version="[1,2)"
> > >  ,org.osgi.service.deploymentadmin.spi;version="[1,2)",org.osgi.servic
> > >  e.event;version="[1.2,2)",org.osgi.service.log;version="[1.3,2)",org.
> > >  osgi.service.packageadmin;version="[1.2,2)"
> > >
> >
> > Rebuilding with import and export packages matching the target seems to
> > result in same error, where it cannot find
> > "org.apache.felix.deploymentadmin".
> >
> > Hope this helps.
> >
> > On Mon, Oct 29, 2018, 17:40 Karl Pauls <karlpauls@gmail.com wrote:
> >
> > > Hi,
> > >
> > > its hard to say what is going wrong without more context. Why are you
> > > trying to compile this version of deploymentadmin and not a later one?
> > > How does the manifest of the result look like? Why would it import
> > > org.apache.felix.deploymentadmin? etc...
> > >
> > > regards,
> > >
> > > Karl
> > > On Mon, Oct 29, 2018 at 1:13 PM Mantas Gridinas <mg...@gmail.com>
> > > wrote:
> > > >
> > > > Hi!
> > > >
> > > > I'm trying to compile Apache Felix 0.9.5 Deployment Admin bundle from
> > > > sources provided in
> > > >
> > >
> >
> https://github.com/apache/felix/commit/33a2fd96113a0959337f8fde22df0fcfafdaed98#diff-70f3719ce35e71bd40c1ac3de64a621b
> > > > and I got myself into an issue where an already existing osgi runtime
> > > > (Eclipse Kura) fails to start it with the following exception:
> > > >
> > > > !ENTRY org.apache.felix.deploymentadmin 4 0 2018-10-29 14:04:53.322
> > > > > !MESSAGE FrameworkEvent ERROR
> > > > > !STACK 0
> > > > > org.osgi.framework.BundleException: Could not resolve module:
> > > > > org.apache.felix.deploymentadmin [19]
> > > > >   Unresolved requirement: Import-Package:
> > > org.apache.felix.deploymentadmin
> > > > >
> > > > >     at org.eclipse.osgi.container.Module.start(Module.java:444)
> > > > >     at
> > > > >
> > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
> > > > >     at
> > > > >
> > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600)
> > > > >     at
> > > > >
> > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
> > > > >     at
> > > > >
> > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
> > > > >     at
> > > > >
> > >
> >
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
> > > > >     at
> > > > >
> > >
> >
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> > > > >
> > > > >
> > > >     at
> > > > >
> > >
> >
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> > > > >
> > > > >
> > > > ...
> > > > >
> > > > !ENTRY org.eclipse.osgi 4 0 2018-10-29 14:05:35.130
> > > > >
> > > > !MESSAGE Bundle
> > > > initial@reference
> > > :file:../../kura/plugins/org.apache.felix.deploymentadmin_0.9.5.jar
> > > > > was not resolved.
> > > > >
> > > >
> > > > Are there any steps that I should take besides using bundle:bundle to
> > > > properly build it and run it in osgi? JAPI checker seems to suggest
> > that
> > > my
> > > > built osgi bundle jar is 100% compatible with the one that is
> provided
> > in
> > > > Eclipse Kura installation.
> > > >
> > > > Cheers.
> > >
> > >
> > >
> > > --
> > > Karl Pauls
> > > karlpauls@gmail.com
> > >
> >
>