Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
No declaration can be found for element 'osgix:cm-properties' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No declaration can be found for element 'osgix:cm-properties'

    Hello,

    I'm fighting with Spring DM 1.2.0 release cm-properties

    I'm using Eclipse 3.4.1 + Spring IDE 2.2.4 (the latest available) and here my context.xml file :

    PHP Code:
    <?xml version="1.0" encoding="UTF-8"?>

    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:ctx="http://www.springframework.org/schema/context"
        xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
        xmlns:osgi="http://www.springframework.org/schema/osgi"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                              http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
                            http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
                            http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd">


       <osgix:cm-properties id="cmProps" persistent-id="com.mycompany">
            <prop key="host">localhost</prop>
       </osgix:cm-properties>

       <ctx:property-placeholder properties-ref="cmProps" />

    According to the Spring DM doc it's correct but Spring IDE report me these errors:

    Cannot locate BeanDefinitionParser for element [cm-properties] context.xml
    cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'osgix:cm-properties'. context.xml

    Any idea ?

    Thanks

    Fred

  • #2
    Have you tried running the context? Does the error appear only in Spring IDE or at runtime as well?
    Either way, can you please raise an issue? Thanks!

    Comment


    • #3
      It appears at runtime as well but I don't get why...

      Ok anyway I'll try to build small example of the error and submit an issue

      Fred

      Comment


      • #4
        My mistake, this error does not occur in runtime, I have reported an issue on Spring IDE:
        http://jira.springsource.org/browse/IDE-1014

        In the mean time I found another one similar:
        http://jira.springsource.org/browse/IDE-1015

        Comment


        • #5
          Thanks. I'll keep an eye for these as well.

          Comment


          • #6
            Issues are fixed in latest nightly build of Spring IDE

            Comment


            • #7
              Same problem under springsource-dm-server-1.0.2.RELEASE

              I am experiencing the same problem under springsource-dm-server-1.0.2.RELEASE.
              I was under the impression that the server is based on Spring DM 1.2.0, so I am not sure if I have to load any Spring DM bundles myself. At least the basic Spring DM features worked without any additional load.
              So now I am trying to use ConfigurationAdmin and I get that error.

              First, I would like to understand the nature of the problem. Seems like it cannot see the schema "http://www.springframework.org/schema/osgi-compendium". I specified it properly in my Spring XML. So where is it looking for the schema?
              My header specifies location as "http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd". If the server indeed looks at that, it may need to go through the proxy (I am behind the firewall). Does this server have a place to specify the proxy?
              On the other hand, I see that the schema is available in one of the Spring DM bundles (spring-osgi-core-1.2.0.jar) as 'org/springframework/osgi/compendium/config/spring-osgi-compendium-1.2.xsd". Should I make use of that? How?

              I would appreciate your help. Thanks in advance,

              Leonid

              Comment


              • #8
                The problem is not in Spring IDE but Spring DM. The namespace handler creates some 'synthetic' classes that are then parsed by Spring IDE. As they are not marked appropriately, the IDE complains about them, thinking they are used defined.
                This has been fixed in the trunk and on the 1.2.x branch and will be available in the next Spring DM release.

                Comment


                • #9
                  Same issue again with

                  Code:
                  <osgix:property-placeholder persistent-id="default">
                  in STS 2.3.1.RELEASE

                  Comment


                  • #10
                    What version of Spring DM? Note that the property-placeholder has been deprecated in Spring DM 2.0.x so the <osgix:..> tag points to a missing element. You could use the versioned XML schema to see whether it helps.

                    Comment

                    Working...
                    X