You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by kotoole <ke...@gmail.com> on 2016/09/01 21:17:31 UTC

Unable to use http://karaf.apache.org/xmlns/shell/v1.0.0

Within my Blueprint file, if I use the
http://karaf.apache.org/xmlns/shell/v1.*0*.0 namespace, I get the following
exception (notice it refers to 1.1.0 even though I am using 1.0.0)
org.xml.sax.SAXParseException: src-import.3.1: The namespace attribute,
'http://schemas.xmlsoap.org/wsdl/', of an  element information item must be
identical to the targetNamespace attribute,
'http://karaf.apache.org/xmlns/shell/v1.1.0', of the imported document.	at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)[:]	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)[:]	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)[:]	at
org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
Source)[:]	at
org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
Source)[:]	at
org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
Source)[:]	at
org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
Source)[:]	at
org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
Source)[:]	at
org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown
Source)[:]	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown
Source)[:]	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown
Source)[:]	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown
Source)[:]	at
org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown
Source)[:]	at
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.createSchema(NamespaceHandlerRegistryImpl.java:641)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.doGetSchema(NamespaceHandlerRegistryImpl.java:458)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.getSchema(NamespaceHandlerRegistryImpl.java:443)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:343)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[48:org.apache.aries.blueprint.core:1.6.2]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[66:org.apache.aries.util:1.1.1]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[66:org.apache.aries.util:1.1.1]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[66:org.apache.aries.util:1.1.1]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[66:org.apache.aries.util:1.1.1]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[66:org.apache.aries.util:1.1.1]
at
org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:731)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:486)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.Felix.startBundle(Felix.java:2172)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1286)[8:org.apache.karaf.features.core:4.0.6]
at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:846)[8:org.apache.karaf.features.core:4.0.6]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)[8:org.apache.karaf.features.core:4.0.6]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)[8:org.apache.karaf.features.core:4.0.6]
I was able to update the Blueprint file to use
http://karaf.apache.org/xmlns/shell/v1.*1*.0 as a permanent solution, but
according to  https://karaf.apache.org/manual/latest/#_namespaces
<https://karaf.apache.org/manual/latest/#_namespaces>   the 1.0.0 namespace
is still supported. I have a large number of projects that I would need to
update to support this. It appears this broke starting with Karaf 4.0.5.



--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-use-http-karaf-apache-org-xmlns-shell-v1-0-0-tp4047826.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Unable to use http://karaf.apache.org/xmlns/shell/v1.0.0

Posted by jochenw <jo...@googlemail.com>.
Hi,

maybe it should be up to kotoole to attache something to the Jira.

In my case, the error with http://karaf.apache.org/xmlns/shell/v1.0.0 says:

org.xml.sax.SAXParseException; systemId:
bundle://80.0:2/org/apache/karaf/shell/console/commands/karaf-shell-1.1.0.xsd;
lineNumber: 28; columnNumber: 44; src-import.3.1: Namespace-Attribut
"http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" eines
<import>-Elementinformationselements muss mit dem targetNamespace-Attribut
"http://karaf.apache.org/xmlns/shell/v1.1.0" des importierten Dokuments
identisch sein.

(sorry about the German - I have German Windows on my notebook).

I tried to narrow that down, and commented all other things from by
blueprint.xml. And - it works. But as soon as taking in the section with
cm:property-placeholder, the error comes back.

I also tried it with the voting tutorial from here: 
https://github.com/cschneider/Karaf-Tutorial/tree/master/voting
<https://github.com/cschneider/Karaf-Tutorial/tree/master/voting>   , but
replacing the karaf version by 4.0.6 and installing CXF 3.1.7 when running
it instead of 2.7.7. Works perfectly, but as soon as adding 

    <cm:property-placeholder persistent-id="${project.artifactId}"
update-strategy="reload">
        <cm:default-properties>
            <cm:property name="testproperty" value="1800">
            </cm:property>
        </cm:default-properties>
    </cm:property-placeholder>

to the blueprint file command.xml, the error comes up.

Regards,
Jochen





--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-use-http-karaf-apache-org-xmlns-shell-v1-0-0-tp4047826p4048081.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Unable to use http://karaf.apache.org/xmlns/shell/v1.0.0

Posted by Guillaume Nodet <gn...@apache.org>.
2016-09-12 9:12 GMT+02:00 jochenw <jo...@googlemail.com>:

> Hello,
>
> in the Jira, you say that update to
> http://karaf.apache.org/xmlns/shell/v1.1.0 was possible.
>
> However, when I tried that, it looks like the command definition in
> blueprint doesn't work (I verified this with the voting example):
>
> Unable to start blueprint container for bundle
> voting-command/1.0.0.SNAPSHOT
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable
> to
> validate xml
> ....
> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
> 'name' is not allowed to appear in element 'command'.
>
> Looking to the xsd, the name attribute for the command really has vanished.
> Has command definition changed with the 1.1.0 version?
>

Yes.
But again, if should work without any problem with the 1.0.0 namespace.
Could you attach your bundle to the JIRA issue if it does not have too many
external dependencies ?


>
> Regards,
> Jochen
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Unable-to-use-http-karaf-apache-org-xmlns-shell-v1-0-0-
> tp4047826p4047973.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Unable to use http://karaf.apache.org/xmlns/shell/v1.0.0

Posted by jochenw <jo...@googlemail.com>.
Hello,

in the Jira, you say that update to
http://karaf.apache.org/xmlns/shell/v1.1.0 was possible.

However, when I tried that, it looks like the command definition in
blueprint doesn't work (I verified this with the voting example):

Unable to start blueprint container for bundle voting-command/1.0.0.SNAPSHOT
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
validate xml
....
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'name' is not allowed to appear in element 'command'.

Looking to the xsd, the name attribute for the command really has vanished.
Has command definition changed with the 1.1.0 version?

Regards,
Jochen





--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-use-http-karaf-apache-org-xmlns-shell-v1-0-0-tp4047826p4047973.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Unable to use http://karaf.apache.org/xmlns/shell/v1.0.0

Posted by kotoole <ke...@gmail.com>.
https://issues.apache.org/jira/browse/KARAF-4695



--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-use-http-karaf-apache-org-xmlns-shell-v1-0-0-tp4047826p4047850.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Unable to use http://karaf.apache.org/xmlns/shell/v1.0.0

Posted by Guillaume Nodet <gn...@apache.org>.
Could you please raise a JIRA for this issue ?
At first glance, the xsd  in the bundle looks correct...

2016-09-01 23:17 GMT+02:00 kotoole <ke...@gmail.com>:

> Within my Blueprint file, if I use the
> http://karaf.apache.org/xmlns/shell/v1.*0*.0 namespace, I get the
> following
> exception (notice it refers to 1.1.0 even though I am using 1.0.0)
> org.xml.sax.SAXParseException: src-import.3.1: The namespace attribute,
> 'http://schemas.xmlsoap.org/wsdl/', of an  element information item must
> be
> identical to the targetNamespace attribute,
> 'http://karaf.apache.org/xmlns/shell/v1.1.0', of the imported document. at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)[:]      at org.apache.xerces.util.ErrorHandlerWrapper.error(
> Unknown
> Source)[:]      at org.apache.xerces.impl.XMLErrorReporter.reportError(
> Unknown
> Source)[:]      at
> org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
> Source)[:]      at
> org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
> Source)[:]      at
> org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
> Source)[:]      at
> org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
> Source)[:]      at
> org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
> Source)[:]      at
> org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown
> Source)[:]      at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(
> Unknown
> Source)[:]      at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(
> Unknown
> Source)[:]      at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(
> Unknown
> Source)[:]      at
> org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown
> Source)[:]      at
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$
> NamespaceHandlerSetImpl.createSchema(NamespaceHandlerRegistryImpl.
> java:641)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$
> NamespaceHandlerSetImpl.doGetSchema(NamespaceHandlerRegistryImpl.
> java:458)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$
> NamespaceHandlerSetImpl.getSchema(NamespaceHandlerRegistryImpl.
> java:443)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(
> BlueprintContainerImpl.java:343)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(
> BlueprintContainerImpl.java:276)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(
> BlueprintExtender.java:300)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(
> BlueprintExtender.java:269)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(
> BlueprintExtender.java:265)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(
> BlueprintExtender.java:255)[48:org.apache.aries.blueprint.core:1.6.2]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$
> Tracked.customizerModified(BundleHookBundleTracker.java:
> 500)[66:org.apache.aries.util:1.1.1]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$
> Tracked.customizerModified(BundleHookBundleTracker.java:
> 433)[66:org.apache.aries.util:1.1.1]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$
> AbstractTracked.track(BundleHookBundleTracker.java:
> 725)[66:org.apache.aries.util:1.1.1]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$
> Tracked.bundleChanged(BundleHookBundleTracker.java:
> 463)[66:org.apache.aries.util:1.1.1]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$
> BundleEventHook.event(BundleHookBundleTracker.java:
> 422)[66:org.apache.aries.util:1.1.1]
> at
> org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(
> SecureAction.java:1179)[org.apache.felix.framework-5.4.0.jar:]
> at
> org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(
> EventDispatcher.java:731)[org.apache.felix.framework-5.4.0.jar:]
> at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(
> EventDispatcher.java:486)[org.apache.felix.framework-5.4.0.jar:]
> at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.
> java:4541)[org.apache.felix.framework-5.4.0.jar:]
> at
> org.apache.felix.framework.Felix.startBundle(Felix.java:
> 2172)[org.apache.felix.framework-5.4.0.jar:]
> at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.
> java:998)[org.apache.felix.framework-5.4.0.jar:]
> at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.
> java:984)[org.apache.felix.framework-5.4.0.jar:]
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> startBundle(FeaturesServiceImpl.java:1286)[8:org.apache.karaf.features.
> core:4.0.6]
> at
> org.apache.karaf.features.internal.service.Deployer.
> deploy(Deployer.java:846)[8:org.apache.karaf.features.core:4.0.6]
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> doProvision(FeaturesServiceImpl.java:1176)[8:org.apache.karaf.features.
> core:4.0.6]
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(
> FeaturesServiceImpl.java:1074)[8:org.apache.karaf.features.core:4.0.6]
> I was able to update the Blueprint file to use
> http://karaf.apache.org/xmlns/shell/v1.*1*.0 as a permanent solution, but
> according to  https://karaf.apache.org/manual/latest/#_namespaces
> <https://karaf.apache.org/manual/latest/#_namespaces>   the 1.0.0
> namespace
> is still supported. I have a large number of projects that I would need to
> update to support this. It appears this broke starting with Karaf 4.0.5.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Unable-to-use-http-karaf-apache-org-xmlns-shell-v1-0-0-tp4047826.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/