karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Spencer <pau...@apache.org>
Subject Re: CORS Not added headers in REST Response from CXF and Karaf 4.2.0. Why?
Date Thu, 16 Aug 2018 17:20:07 GMT
Fran├žois and JB,
Using <ref bean="..."/> causes the following stack trace:

org.osgi.service.blueprint.container.ComponentDefinitionException: Element
ref must have a valid component-id attribute
	at org.apache.aries.blueprint.parser.Parser.parseRef(Parser.java:1307)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.parser.Parser.parseValueGroup(Parser.java:1273)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.parser.Parser.parseCollection(Parser.java:830)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at org.apache.aries.blueprint.parser.Parser.parseElement(Parser.java:453)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.parser.ParserContextImpl.parseElement(ParserContextImpl.java:74)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser.parseListData(AbstractBPBeanDefinitionParser.java:88)
~[?:?]
	at
org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser.mapElement(JAXRSServerFactoryBeanDefinitionParser.java:102)
~[?:?]
	at
org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser.parseChildElements(AbstractBPBeanDefinitionParser.java:309)
~[?:?]
	at
org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser.parse(SimpleBPBeanDefinitionParser.java:61)
~[?:?]
	at
org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser.parse(JAXRSServerFactoryBeanDefinitionParser.java:136)
~[?:?]
	at
org.apache.cxf.jaxrs.blueprint.JAXRSBPNamespaceHandler.parse(JAXRSBPNamespaceHandler.java:63)
~[?:?]
	at
org.apache.aries.blueprint.parser.Parser.parseCustomElement(Parser.java:1369)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at org.apache.aries.blueprint.parser.Parser.loadComponents(Parser.java:427)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at org.apache.aries.blueprint.parser.Parser.populate(Parser.java:331)
~[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:351)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:299)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:268)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:264)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:254)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)
[65:org.apache.aries.blueprint.core:1.9.0]
	at
org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)
[?:?]
	at
org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730)
[?:?]
	at
org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485)
[?:?]
	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [?:?]
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) [?:?]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) [?:?]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260)
[9:org.apache.felix.fileinstall:3.6.4]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233)
[9:org.apache.felix.fileinstall:3.6.4]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520)
[9:org.apache.felix.fileinstall:3.6.4]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
[9:org.apache.felix.fileinstall:3.6.4]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
[9:org.apache.felix.fileinstall:3.6.4]


***
* From blueprint.xml
***
	<jaxrs:server id="service" address="/rest">
		<jaxrs:serviceBeans>
			<ref bean="cors-server" />
		</jaxrs:serviceBeans>
		<jaxrs:providers>
			<ref bean="cors-filter" />
		</jaxrs:providers>
	</jaxrs:server>




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Mime
View raw message