aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1503) Timing issue when cm blueprint references ext namespaces
Date Wed, 13 Apr 2016 10:40:25 GMT

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

ASF subversion and git services commented on ARIES-1503:
--------------------------------------------------------

Commit 1738921 from [~gnt] in branch 'aries/trunk'
[ https://svn.apache.org/r1738921 ]

[ARIES-1503] Another fix and small refactoring

The trick is to remember loaded resources and recognize 'bad' behaving namespace handlers,
i.e. those that always return the same url, irrespective of the resource trying to be loaded.
If a loader returns an already loaded url for a resource, we ignore those.

In order for this to work, we also need to be smarter about identifying similar resources.
We need to cope with the fact that a schema can be imported with or without a location for
example, so we ignore the systemId when the schema is imported.  If the resource has already
been loaded, quickly return the previously loaded resource.

The blueprint container is also fixed wrt to added namespaces.  The handler set now do a copy
of the schemas, and we use those to find missing namespaces.  Whenever a handler is removed,
we can't easily find out which namespaces have been dynamically added, so we simply recreate
the handler set completely.

> Timing issue when cm blueprint references ext namespaces
> --------------------------------------------------------
>
>                 Key: ARIES-1503
>                 URL: https://issues.apache.org/jira/browse/ARIES-1503
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: blueprint-core-1.5.0, blueprint-parser-1.4.0, blueprint-cm-1.0.7
>            Reporter: Grzegorz Grzybek
>            Assignee: Jean-Baptiste Onofré
>             Fix For: blueprint-core-1.6.1, blueprint-cm-1.0.9
>
>
> Since version 1.0.6, blueprint-cm's XSDs started to import ext namespaces, to reflect
Java hierarchy of {{org.apache.aries.blueprint.compendium.cm.CmPropertyPlaceholder}} and {{org.apache.aries.blueprint.ext.PropertyPlaceholder}},
however, sometimes we fail with:
> {noformat}
> org.xml.sax.SAXParseException; systemId: jar:file:/home/ggrzybek/.m2/repository/org/apache/aries/blueprint/org.apache.aries.blueprint.cm/1.0.7/org.apache.aries.blueprint.cm-1.0.7.jar!/org/apache/aries/blueprint/compendium/cm/blueprint-cm-1.0.0.xsd;
lineNumber: 80; columnNumber: 79; src-resolve: Cannot resolve the name 'ext100:ignore-missing-locations'
to a(n) 'attribute declaration' component.
> 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
> 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
> 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4158)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4141)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1674)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAttributeTraverser.traverseLocal(XSDAttributeTraverser.java:90)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:615)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAttributeGroupTraverser.traverseGlobal(XSDAttributeGroupTraverser.java:145)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseGlobalDecl(XSDHandler.java:1897)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1772)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(XSDAttributeGroupTraverser.java:80)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:643)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(XSDComplexTypeTraverser.java:1123)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:836)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:315)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseGlobal(XSDComplexTypeTraverser.java:191)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseGlobalDecl(XSDHandler.java:1884)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1772)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:405)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:242)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1429)
> 	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:626)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:613)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:572)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:538)
> 	at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:255)
> 	at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.createSchema(NamespaceHandlerRegistryImpl.java:347)
> 	at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.getSchema(NamespaceHandlerRegistryImpl.java:261)
> 	at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.access$300(NamespaceHandlerRegistryImpl.java:75)
> 	at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.getSchema(NamespaceHandlerRegistryImpl.java:557)
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:321)
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
> 	at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}
> working on PR right now



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

Mime
View raw message