[ 
https://issues.apache.org/jira/browse/ARIES-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Bosschaert updated ARIES-1143:
------------------------------------

    Description: 
With the recent changes in Apache Felix, it is now possible to run Aries 
Subsystems in Felix. Basic subsystems work, however more advanced subsystems 
cause errors. 

To show a basic subsystem that works, compile the latest Apache Felix trunk 
(for example take the trunk of 7 Jan 2014):

{code}cd framework
mvn install
cd ../main
mvn install{code}

Then replace the contents of the {{bundle}} directory with the contents of the 
attached bundles.jar. 

Then run the following to see a succesful basic subsystem installed:
{code}java -jar bin/felix.jar
g! subsystem:install http://coderthoughts.googlecode.com/files/subsystem1.esa
Installing subsystem: http://coderthoughts.googlecode.com/files/subsystem1.esa
Subsystem successfully installed: subsystem1; id: 1
{code}

However, if I install a more complex subsystem, like the attached cdi.esa, I 
run into different errors:
{code}subsystem:install 
https://issues.apache.org/jira/secure/attachment/12621616/cdi.esa
gogo: SubsystemException: 
org.apache.aries.application.modelling.ModellerException: 
java.lang.NullPointerException{code}
I managed to get around the above error by adding the following 2 lines to the 
top of subsystem-core/.../BundleRevisionResource.computeServiceCapabilities()
{code}  private List<Capability> computeServiceCapabilities() {
            if (revision.getBundle().getBundleId() == 0)
                return Collections.emptyList();{code}
However, with that change I run into a slightly different and more confusing 
error below. Note that the bundle mentioned is *not* part of the cdi.esa and is 
installed as part of the boot-up bundles: 
{code}
gogo: SubsystemException: org.osgi.framework.BundleException: Bundle symbolic 
name and version are not unique: org.apache.felix.gogo.runtime:0.10.0
{code}
Note that this cdi.esa file does work with Equinox...

The full exception is:
{code}org.osgi.framework.BundleException: Bundle symbolic name and version are 
not unique: org.apache.felix.gogo.runtime:0.10.0
        at 
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1300)
        at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2905)
        at 
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
        at 
org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:117)
        at 
org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:97)
        at 
org.apache.aries.subsystem.core.internal.BundleResourceInstaller.installBundle(BundleResourceInstaller.java:189)
        at 
org.apache.aries.subsystem.core.internal.BundleResourceInstaller.install(BundleResourceInstaller.java:178)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResourceInstaller.installAriesSubsystem(SubsystemResourceInstaller.java:98)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResourceInstaller.install(SubsystemResourceInstaller.java:38)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:75)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:31)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:621)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:259)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:63)
        at 
org.coderthoughts.subsystems.gogo.Activator.install(Activator.java:29)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
        at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
        at org.apache.felix.gogo.shell.Console.run(Console.java:62)
        at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
        at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
        at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
        at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
        at java.lang.Thread.run(Thread.java:680){code}

  was:
With the recent changes in Apache Felix, it is now possible to run Aries 
Subsystems in Felix. Basic subsystems work, however more advanced subsystems 
cause errors. 

To show a basic subsystem that works, compile the latest Apache Felix trunk 
(for example take the trunk of 7 Jan 2014):

{code}cd framework
mvn install
cd ../main
mvn install{code}

Then replace the contents of the {{bundle}} directory with the contents of the 
attached bundles.jar. 

Then run the following to see a succesful basic subsystem installed:
{code}java -jar bin/felix.jar
g! subsystem:install http://coderthoughts.googlecode.com/files/subsystem1.esa
Installing subsystem: http://coderthoughts.googlecode.com/files/subsystem1.esa
Subsystem successfully installed: subsystem1; id: 1
{code}

However, if I install a more complex subsystem, like the attached cdi.esa, I 
run into different errors:
{code}subsystem:install xxx
gogo: SubsystemException: 
org.apache.aries.application.modelling.ModellerException: 
java.lang.NullPointerException{code}
I managed to get around the above error by adding the following 2 lines to the 
top of subsystem-core/.../BundleRevisionResource.computeServiceCapabilities()
{code}  private List<Capability> computeServiceCapabilities() {
            if (revision.getBundle().getBundleId() == 0)
                return Collections.emptyList();{code}
However, with that change I run into a slightly different and more confusing 
error below. Note that the bundle mentioned is *not* part of the cdi.esa and is 
installed as part of the boot-up bundles: 
{code}
gogo: SubsystemException: org.osgi.framework.BundleException: Bundle symbolic 
name and version are not unique: org.apache.felix.gogo.runtime:0.10.0
{code}
Note that this cdi.esa file does work with Equinox...

The full exception is:
{code}org.osgi.framework.BundleException: Bundle symbolic name and version are 
not unique: org.apache.felix.gogo.runtime:0.10.0
        at 
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1300)
        at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2905)
        at 
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
        at 
org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:117)
        at 
org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:97)
        at 
org.apache.aries.subsystem.core.internal.BundleResourceInstaller.installBundle(BundleResourceInstaller.java:189)
        at 
org.apache.aries.subsystem.core.internal.BundleResourceInstaller.install(BundleResourceInstaller.java:178)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResourceInstaller.installAriesSubsystem(SubsystemResourceInstaller.java:98)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResourceInstaller.install(SubsystemResourceInstaller.java:38)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:75)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:31)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:621)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:259)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:63)
        at 
org.coderthoughts.subsystems.gogo.Activator.install(Activator.java:29)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
        at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
        at org.apache.felix.gogo.shell.Console.run(Console.java:62)
        at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
        at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
        at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
        at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
        at java.lang.Thread.run(Thread.java:680){code}


> Problems running Aries on Apache Felix
> --------------------------------------
>
>                 Key: ARIES-1143
>                 URL: https://issues.apache.org/jira/browse/ARIES-1143
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>    Affects Versions: 1.0
>            Reporter: David Bosschaert
>         Attachments: bundles.jar, cdi.esa
>
>
> With the recent changes in Apache Felix, it is now possible to run Aries 
> Subsystems in Felix. Basic subsystems work, however more advanced subsystems 
> cause errors. 
> To show a basic subsystem that works, compile the latest Apache Felix trunk 
> (for example take the trunk of 7 Jan 2014):
> {code}cd framework
> mvn install
> cd ../main
> mvn install{code}
> Then replace the contents of the {{bundle}} directory with the contents of 
> the attached bundles.jar. 
> Then run the following to see a succesful basic subsystem installed:
> {code}java -jar bin/felix.jar
> g! subsystem:install http://coderthoughts.googlecode.com/files/subsystem1.esa
> Installing subsystem: http://coderthoughts.googlecode.com/files/subsystem1.esa
> Subsystem successfully installed: subsystem1; id: 1
> {code}
> However, if I install a more complex subsystem, like the attached cdi.esa, I 
> run into different errors:
> {code}subsystem:install 
> https://issues.apache.org/jira/secure/attachment/12621616/cdi.esa
> gogo: SubsystemException: 
> org.apache.aries.application.modelling.ModellerException: 
> java.lang.NullPointerException{code}
> I managed to get around the above error by adding the following 2 lines to 
> the top of 
> subsystem-core/.../BundleRevisionResource.computeServiceCapabilities()
> {code}        private List<Capability> computeServiceCapabilities() {
>           if (revision.getBundle().getBundleId() == 0)
>               return Collections.emptyList();{code}
> However, with that change I run into a slightly different and more confusing 
> error below. Note that the bundle mentioned is *not* part of the cdi.esa and 
> is installed as part of the boot-up bundles: 
> {code}
> gogo: SubsystemException: org.osgi.framework.BundleException: Bundle symbolic 
> name and version are not unique: org.apache.felix.gogo.runtime:0.10.0
> {code}
> Note that this cdi.esa file does work with Equinox...
> The full exception is:
> {code}org.osgi.framework.BundleException: Bundle symbolic name and version 
> are not unique: org.apache.felix.gogo.runtime:0.10.0
>       at 
> org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1300)
>       at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:112)
>       at org.apache.felix.framework.Felix.installBundle(Felix.java:2905)
>       at 
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
>       at 
> org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:117)
>       at 
> org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:97)
>       at 
> org.apache.aries.subsystem.core.internal.BundleResourceInstaller.installBundle(BundleResourceInstaller.java:189)
>       at 
> org.apache.aries.subsystem.core.internal.BundleResourceInstaller.install(BundleResourceInstaller.java:178)
>       at 
> org.apache.aries.subsystem.core.internal.SubsystemResourceInstaller.installAriesSubsystem(SubsystemResourceInstaller.java:98)
>       at 
> org.apache.aries.subsystem.core.internal.SubsystemResourceInstaller.install(SubsystemResourceInstaller.java:38)
>       at 
> org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:75)
>       at 
> org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:31)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:621)
>       at 
> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:259)
>       at 
> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:63)
>       at 
> org.coderthoughts.subsystems.gogo.Activator.install(Activator.java:29)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
>       at 
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
>       at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
>       at 
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
>       at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
>       at 
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
>       at org.apache.felix.gogo.shell.Console.run(Console.java:62)
>       at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
>       at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
>       at 
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
>       at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
>       at 
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
>       at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
>       at 
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
>       at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
>       at java.lang.Thread.run(Thread.java:680){code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to