Skip to content

[OSGi] Make EmbeddedFelixFramework pluggable#66

Merged
asfgit merged 2 commits intoapache:masterfrom
neykov:fix/embedded-dep
Mar 30, 2016
Merged

[OSGi] Make EmbeddedFelixFramework pluggable#66
asfgit merged 2 commits intoapache:masterfrom
neykov:fix/embedded-dep

Conversation

@neykov
Copy link
Member

@neykov neykov commented Mar 16, 2016

Needs different implementations depending on whether running in Karaf or classical. Can't have EmbeddedFelixFramework loaded in Karaf because felix bundle doesn't export org.apache.framework packages, just generic OSGi ones.

Needs to be rebased on master after merging #65 for a successful build.

@neykov neykov changed the title Make EmbeddedFelixFramework pluggable [OSGi] Make EmbeddedFelixFramework pluggable Mar 17, 2016
@neykov neykov force-pushed the fix/embedded-dep branch from fb1b5a7 to e34ed44 Compare March 17, 2016 10:08
@neykov
Copy link
Member Author

neykov commented Mar 17, 2016

With this change next error when deploying MachineEntity is:

java.lang.NoClassDefFoundError: com/maxmind/db/Reader$FileMode
    at com.maxmind.geoip2.DatabaseReader$Builder.<init>(DatabaseReader.java:66)
    at org.apache.brooklyn.core.location.geo.MaxMind2HostGeoLookup.getDatabaseReader(MaxMind2HostGeoLookup.java:54)
    at org.apache.brooklyn.core.location.geo.HostGeoInfo.findHostGeoLookupImpl(HostGeoInfo.java:161)
    at org.apache.brooklyn.core.location.geo.HostGeoInfo.getDefaultLookup(HostGeoInfo.java:78)
    at org.apache.brooklyn.core.location.geo.HostGeoInfo.fromIpAddress(HostGeoInfo.java:65)
    at org.apache.brooklyn.core.location.geo.HostGeoInfo.fromLocation(HostGeoInfo.java:115)
    at org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation.configure(LocalhostMachineProvisioningLocation.java:145)
    at org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation.configure(LocalhostMachineProvisioningLocation.java:72)

Needs different implementations depending on whether running in Karaf or classical. Can't have EmbeddedFelixFramework loaded in Karaf because felix bundle doesn't export org.apache.framework packages, just generic OSGi ones.
@neykov neykov force-pushed the fix/embedded-dep branch from e34ed44 to f8db60f Compare March 17, 2016 13:18
@neykov
Copy link
Member Author

neykov commented Mar 17, 2016

After last commit (adding a dependency) I was able to deploy a MachineEntity to byon using

brooklyn.catalog:
  items:
  - id: machine
    libraries:
    - name: org.apache.brooklyn.software-base
      version: 0.9.0.SNAPSHOT
    item:
      type: org.apache.brooklyn.entity.machine.MachineEntity
location: byon:(hosts=x.x.x.x)
services:
- type: machine

The application started successfully (YAY!). The UI was behaving weirdly though, sensors & tasks were not getting populated.

@geomacy
Copy link
Contributor

geomacy commented Mar 18, 2016

👍 I like it - like the move to having the common interface, and then loading the appropriate implementation based on which mode you are running in. LGTM.

geomacy added a commit to geomacy/brooklyn-server that referenced this pull request Mar 22, 2016
@neykov neykov mentioned this pull request Mar 28, 2016
ahgittin added a commit to ahgittin/brooklyn-server that referenced this pull request Mar 28, 2016
@asfgit asfgit merged commit 6e2d398 into apache:master Mar 30, 2016
@neykov neykov deleted the fix/embedded-dep branch March 30, 2016 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants