aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dufel (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ARIES-1154) Unable to use blueprint in a bundle embedded in a subsystem.
Date Mon, 27 Jan 2014 16:32:39 GMT
Michael Dufel created ARIES-1154:
------------------------------------

             Summary: Unable to use blueprint in a bundle embedded in a subsystem.
                 Key: ARIES-1154
                 URL: https://issues.apache.org/jira/browse/ARIES-1154
             Project: Aries
          Issue Type: Bug
          Components: Blueprint, Subsystem
         Environment: Apache Karaf 3.0.0
Aries subsystem 1.0.0.
            Reporter: Michael Dufel


I am attempting to run the Aries subsystem implementation on top of Apache Karaf 3.0.0. 

I am attempting to deploy a subsystem module, that contains a single embedded bundle. The
embedded bundle is a blueprint bundle. When I have an empty blueprint file, meaning a blueprint.xml
file with only the top level <blueprint/> element, the module deploys. Adding a <reference
.../> tag to service that resides OUTSIDE of the subsystem module causes an exception.
I attached the debugger, and it appears that AbstractPolicyParser.parseCDRForServices(...)
method is attempting to create an "ExportedService" definition for a service that is not actually
defined in the blueprint.xml. This service definition has a generated name of "shell-XXX"
where XXX is some number. The literal problem is that the service definition has an empty
list of interfaces defined, which is in turn causing the stringoutofbounds exception further
down the line. The service properties on this definition are "{osgi.command.function=addFilter,
osgi.command.scope=region}". 


Exception in question:

org.osgi.service.subsystem.SubsystemException: org.apache.aries.application.modelling.ModellerException:
org.apache.aries.application.modelling.ModellerException: java.lang.StringIndexOutOfBoundsException:
String index out of range: -1
	at org.apache.aries.subsystem.core.internal.BundleRevisionResource.computeModelledResource(BundleRevisionResource.java:83)
	at org.apache.aries.subsystem.core.internal.BundleRevisionResource.getModelledResource(BundleRevisionResource.java:137)
	at org.apache.aries.subsystem.core.internal.BundleRevisionResource.computeServiceCapabilities(BundleRevisionResource.java:88)
	at org.apache.aries.subsystem.core.internal.BundleRevisionResource.getCapabilities(BundleRevisionResource.java:56)
	at org.apache.aries.subsystem.core.internal.BundleResourceInstaller$BundleConstituent.getCapabilities(BundleResourceInstaller.java:74)
	at org.apache.aries.subsystem.core.internal.SystemRepository.findProviders(SystemRepository.java:59)
	at org.apache.aries.subsystem.core.internal.SystemRepository.findProviders(SystemRepository.java:44)
	at org.apache.aries.subsystem.core.internal.SystemRepository.findProviders(SystemRepository.java:38)
	at org.apache.aries.subsystem.core.internal.SubsystemResource.addDependencies(SubsystemResource.java:278)[40:org.apache.aries.subsystem.core:1.0.0]
	at org.apache.aries.subsystem.core.internal.SubsystemResource.addDependenciesFromSystemRepository(SubsystemResource.java:309)[40:org.apache.aries.subsystem.core:1.0.0]
	at org.apache.aries.subsystem.core.internal.SubsystemResource.access$400(SubsystemResource.java:75)[40:org.apache.aries.subsystem.core:1.0.0]
	at org.apache.aries.subsystem.core.internal.SubsystemResource$2.findProviders(SubsystemResource.java:504)
	at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:265)
	at org.apache.felix.resolver.Candidates.populate(Candidates.java:153)
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:148)
	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:410)[40:org.apache.aries.subsystem.core:1.0.0]
	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:393)[40:org.apache.aries.subsystem.core:1.0.0]
	at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:101)[40:org.apache.aries.subsystem.core:1.0.0]
	at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:92)[40:org.apache.aries.subsystem.core:1.0.0]
	at org.apache.aries.subsystem.core.internal.InstallAction.createSubsystemResource(InstallAction.java:128)
	at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:62)
	at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:31)
	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_04]
	at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:560)
	at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:252)
	at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:58)
	at org.coderthoughts.subsystems.gogo.Activator.install(Activator.java:29)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_04]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_04]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_04]
	at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_04]
	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
	at org.coderthoughts.subsystems.gogo.$Activator790720175.install(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_04]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_04]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_04]
	at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_04]
	at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:497)
	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:198)
	at java.lang.Thread.run(Thread.java:722)[:1.7.0_04]
	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:118)[60:org.apache.karaf.shell.console:3.0.0]
	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:109)
	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_04]
	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[61:org.apache.karaf.jaas.modules:3.0.0]
	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:107)[60:org.apache.karaf.shell.console:3.0.0]
Caused by: org.apache.aries.application.modelling.ModellerException: org.apache.aries.application.modelling.ModellerException:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getServiceElements(ModelledResourceManagerImpl.java:128)
	at org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getModelledResource(ModelledResourceManagerImpl.java:184)
	at org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getModelledResource(ModelledResourceManagerImpl.java:159)
	at Proxyacd811b3_de31_4c94_b271_de145e8aa84f.getModelledResource(Unknown Source)
	at org.apache.aries.subsystem.core.internal.BundleRevisionResource.computeModelledResource(BundleRevisionResource.java:80)
	... 53 more
Caused by: org.apache.aries.application.modelling.ModellerException: java.lang.StringIndexOutOfBoundsException:
String index out of range: -1
	at org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getBlueprintServiceElements(ModelledResourceManagerImpl.java:148)
	at org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getServiceElements(ModelledResourceManagerImpl.java:117)
	... 57 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:762)[:1.7.0_04]
	at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:258)[:1.7.0_04]
	at org.apache.aries.application.modelling.impl.ExportedServiceImpl.<init>(ExportedServiceImpl.java:87)
	at org.apache.aries.application.modelling.impl.ModellingManagerImpl.getExportedService(ModellingManagerImpl.java:60)
	at org.apache.aries.application.modelling.impl.AbstractParserProxy.parseCDRForServices(AbstractParserProxy.java:181)
	at org.apache.aries.application.modelling.impl.AbstractParserProxy.parseAllServiceElements(AbstractParserProxy.java:108)
	at org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getBlueprintServiceElements(ModelledResourceManagerImpl.java:140)
	... 58 more







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

Mime
View raw message