You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Charles Moulliard (JIRA)" <ji...@apache.org> on 2015/09/30 12:29:04 UTC

[jira] [Commented] (CAMEL-9183) java.lang.IllegalArgumentException: Unsupported namespaces: [http://camel.apache.org/schema/blueprint]

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

Charles Moulliard commented on CAMEL-9183:
------------------------------------------

If we upgrade to Aries Blueprint Web 1.1.1 and add also as reference blueprint parser 1.3.1, then we will have again the same error as this part of the code of Aries Blueprint Web is not able to find the @Namespaces annotation 

{code}
NamespaceHandler nsHandler = (NamespaceHandler)instance;
            Namespaces namespaces = nsHandler.getClass().getAnnotation(Namespaces.class);
            if (namespaces != null) { // WE WILL GET NULL HERE
                for (String ns : namespaces.value()) {
                    nsSet.addNamespace(URI.create(ns), nsHandler.getSchemaLocation(ns), nsHandler);   
                }
            }
{code}

> java.lang.IllegalArgumentException: Unsupported namespaces: [http://camel.apache.org/schema/blueprint]
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9183
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9183
>             Project: Camel
>          Issue Type: Bug
>          Components: examples
>    Affects Versions: 2.16.0
>            Reporter: Charles Moulliard
>
> Version used of Blueprint Web : 1.0
> I don't know if this example has ever work - https://github.com/apache/camel/blob/master/examples/camel-example-servlet-tomcat-blueprintweb/src/main/resources/META-INF/blueprint.xml but this is apparently not the longer case.
> When we start mvn jetty:run within the project, we get this error
> 2015-09-30 10:37:29.054:WARN:/:Failed to startup blueprint container. java.lang.IllegalArgumentException: Unsupported namespaces: [http://camel.apache.org/schema/blueprint]
> java.lang.IllegalArgumentException: Unsupported namespaces: [http://camel.apache.org/schema/blueprint]
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.init(BlueprintContainerImpl.java:99)
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.<init>(BlueprintContainerImpl.java:73)
> 	at org.apache.aries.blueprint.web.BlueprintContextListener.contextInitialized(BlueprintContextListener.java:86)
> Why, when the BlueprintContext is created, then it fails to load the camel namespace handler
> We should upgrade to this version of Blueprint Web :
> https://github.com/apache/aries/blob/trunk/blueprint/blueprint-web/src/main/java/org/apache/aries/blueprint/web/BlueprintContextListener.java#L55-L56
> which allow to specify :
> blueprintNamespaceHandlers OR META-INF/blueprint.handlers
> and adapt the example to pass the blueprintNamespaceHandlers



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