[jira] [Commented] (KARAF-4720) NamespaceHandler implementations hijack namespaces

2016-09-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15506073#comment-15506073
 ] 

ASF GitHub Bot commented on KARAF-4720:
---

GitHub user neykov opened a pull request:

https://github.com/apache/karaf/pull/241

[KARAF-4720] Prevent NamespaceHandler implementations from hijacking 
namespaces

NamespaceHandler implementations in Karaf will return a schema location 
from getSchemaLocation even for namespaces they don't own, essentially 
replacing the xsd that corresponds to the requested namespace. That leads to 
errors that make no sense and inability to use the bundles that implement the 
handlers.

Triggered by https://issues.apache.org/jira/browse/ARIES-1503 and 
https://github.com/apache/aries/commit/9a1ff22cbd29006d24a42e3e1274dfa493501ed9 
in particular.

The error I was seeing when trying to use the JAAS module:
```
18:07:39,892 ERROR  16 ntainer.BlueprintContainerImpl [pool-9-thread-1 ] 
Unable to start blueprint container for bundle 
org.apache.brooklyn.rest-resources/0.10.0.SNAPSHOT
org.xml.sax.SAXParseException; systemId: 
bundle://31.0:1/org/apache/karaf/jaas/blueprint/config/karaf-jaas-1.1.0.xsd; 
lineNumber: 24; columnNumber: 66; src-import.3.1: The namespace attribute, 
'http://cxf.apache.org/configuration/beans', of an  element information 
item must be identical to the targetNamespace attribute, 
'http://karaf.apache.org/xmlns/jaas/v1.1.0', of the imported document.
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4162)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4145)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:822)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1120)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:620)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:617)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:575)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:541)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:252)[:1.7.0_80]
at 
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.createSchema(NamespaceHandlerRegistryImpl.java:641)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.doGetSchema(NamespaceHandlerRegistryImpl.java:458)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.getSchema(NamespaceHandlerRegistryImpl.java:443)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:343)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[20:org.apache.aries.util:1.1.1]
at 
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[20:org.apache.aries.util:1.1.1]
at 

[jira] [Created] (KARAF-4720) NamespaceHandler implementations hijack namespaces

2016-09-20 Thread Svetoslav Neykov (JIRA)
Svetoslav Neykov created KARAF-4720:
---

 Summary: NamespaceHandler implementations hijack namespaces
 Key: KARAF-4720
 URL: https://issues.apache.org/jira/browse/KARAF-4720
 Project: Karaf
  Issue Type: Bug
Affects Versions: 4.0.6
Reporter: Svetoslav Neykov


NamespaceHandler implementations in Karaf will return a schema location from 
getSchemaLocation even for namespaces they don't own, essentially replacing the 
xsd that corresponds to the requested namespace. That leads to errors that make 
no sense and inability to use the bundles that implement the handlers.

Triggered by https://issues.apache.org/jira/browse/ARIES-1503 and 
https://github.com/apache/aries/commit/9a1ff22cbd29006d24a42e3e1274dfa493501ed9 
in particular.

The error I was seeing when trying to use the JAAS module:
{noformat}
18:07:39,892 ERROR  16 ntainer.BlueprintContainerImpl [pool-9-thread-1 ] Unable 
to start blueprint container for bundle 
org.apache.brooklyn.rest-resources/0.10.0.SNAPSHOT
org.xml.sax.SAXParseException; systemId: 
bundle://31.0:1/org/apache/karaf/jaas/blueprint/config/karaf-jaas-1.1.0.xsd; 
lineNumber: 24; columnNumber: 66; src-import.3.1: The namespace attribute, 
'http://cxf.apache.org/configuration/beans', of an  element information 
item must be identical to the targetNamespace attribute, 
'http://karaf.apache.org/xmlns/jaas/v1.1.0', of the imported document.
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4162)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4145)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:822)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1120)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:620)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:617)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:575)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:541)[:1.7.0_80]
at 
com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:252)[:1.7.0_80]
at 
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.createSchema(NamespaceHandlerRegistryImpl.java:641)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.doGetSchema(NamespaceHandlerRegistryImpl.java:458)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.getSchema(NamespaceHandlerRegistryImpl.java:443)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:343)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[16:org.apache.aries.blueprint.core:1.6.2]
at 
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[20:org.apache.aries.util:1.1.1]
at 
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[20:org.apache.aries.util:1.1.1]
at 
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[20:org.apache.aries.util:1.1.1]
at 

[jira] [Created] (KARAF-4719) Aether cannot to resolve m2 repositories after adjustments in org.ops4j.pax.url.mvn.cfg

2016-09-20 Thread Antonio Maria (JIRA)
Antonio Maria created KARAF-4719:


 Summary: Aether cannot to resolve m2 repositories after 
adjustments in org.ops4j.pax.url.mvn.cfg
 Key: KARAF-4719
 URL: https://issues.apache.org/jira/browse/KARAF-4719
 Project: Karaf
  Issue Type: Bug
Affects Versions: 4.0.6, 4.0.5
Reporter: Antonio Maria


Start levels for pax-url-aether(5) and org.apache.felix.configadmin(10) are 
defined in framework xml feature. Therefore pax url aether is configured after 
org.ops4j.pax.url.mvn.local properties are loaded.

This causes that in case of assemble Karaf using offline repository, by 
adjusting:
{code}
org.ops4j.pax.url.mvn.localRepository=${karaf.home}/${karaf.default.repository}
{code}
Don't really work, because is too late for aether, that is already started.

Eventually causes an error when karaf starts. The error is quite random, and 
happens quite often when karaf starts using the wrapper as a windows services.

By decreasing the aether starts level to any value after felix configadmin, it 
improves the bootstrap robustness when creating offline distribution.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)