aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1143) Problems running Aries on Apache Felix
Date Mon, 13 Jan 2014 17:53:11 GMT

    [ https://issues.apache.org/jira/browse/ARIES-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13869747#comment-13869747
] 

David Bosschaert commented on ARIES-1143:
-----------------------------------------

I looked at this issue a bit more, and it only seems to happen when the 
{code}
Apache Aries Subsystem OBR (1.0.0){code}
bundle is installed. Without that bundle the issue disappears. So it's more of an issue for
Aries Subsystem OBR component.

> 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
>            Priority: Minor
>         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 Subsystems running on Equinox (when deployed
[as described here|http://coderthoughts.blogspot.com/2013/04/osgi-subsystems.html])... However,
I'm not fully convinced yet that this exception is an issue with the Felix Framework...
> 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)

Mime
View raw message