Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Spring IDE problems with xml validation

  1. #1
    Join Date
    Jan 2008
    Location
    Merion, Pa
    Posts
    65

    Default Spring IDE problems with xml validation

    I'm getting validation errors on my spring config file

    Code:
    cvc-complex-type.3.2.2: Attribute 'default-dependency-check' is not allowed to appear in element 'beans'.	applicationContext.xml	Batch-server/src/META-INF	line 13	Spring Beans Problem
    cvc-complex-type.3.2.2: Attribute 'dependency-check' is not allowed to appear in element 'bean'.	applicationContext.xml	Batch-server/src/META-INF	line 45	Spring Beans Problem
    cvc-complex-type.3.2.2: Attribute 'dependency-check' is not allowed to appear in element 'bean'.	applicationContext.xml	Batch-server/src/META-INF	line 52	Spring Beans Problem
    cvc-complex-type.3.2.2: Attribute 'dependency-check' is not allowed to appear in element 'bean'.	applicationContext.xml	Batch-server/src/META-INF	line 59	Spring Beans Problem
    The top of the config file looks like this:
    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:util="http://www.springframework.org/schema/util"
    	xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:lang="http://www.springframework.org/schema/lang"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
               http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
               http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd"
    	default-dependency-check="objects">
    This is using Spring IDE 2.2.4.

    I tried downloading the latest 2.2.6, but I'm getting these errors:
    An error occurred while collecting items to be installed
    No repository found containing: com.springsource.org.aspectj.runtime/osgi.bundle/1.6.3.RELEASE
    No repository found containing: com.springsource.org.aspectj.weaver/osgi.bundle/1.6.3.RELEASE
    No repository found containing: org.springframework.context.support/osgi.bundle/3.0.0.SNAPSHOT
    No repository found containing: org.springframework.ide.eclipse/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.beans.core/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.beans.ui/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.beans.ui.editor/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.beans.ui.graph/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.beans.ui.refactori ng/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.beans.ui.search/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.core/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.doc/osgi.bundle/2.2.5.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.feature/org.eclipse.update.feature/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.ide.eclipse.ui/osgi.bundle/2.2.6.200908051215-RELEASE
    No repository found containing: org.springframework.jms/osgi.bundle/3.0.0.SNAPSHOT
    No repository found containing: com.springsource.javax.xml.stream/osgi.bundle/1.0.1
    No repository found containing: com.springsource.org.antlr/osgi.bundle/3.0.1
    No repository found containing: org.springframework.osgi.core/osgi.bundle/2.0.0.M1
    No repository found containing: org.springframework.osgi.io/osgi.bundle/2.0.0.M1

  2. #2
    Join Date
    Jan 2008
    Location
    Merion, Pa
    Posts
    65

    Question

    I successfully upgraded to IDE 2.2.6 using this URL: http://www.springsource.com/update/e3.4.

    But I still have the same validation errors. I tried manually setting the schema versions via the IDE, but this didn't fix the problem.

    The only bean configs that work are those that specify a specific xsd version, i.e.,
    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"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
    	default-dependency-check="none">

  3. #3
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    Hey,

    the dependency-check and default-dependency-check elements have been removed in Spring 3.0 hence your validation errors.

    Please see https://fisheye.springsource.org/bro...r2=1003&r1=172

    Spring IDE ships the Spring 3.0 XSDs and maps the version-less schemalocation to the 3.0 XSDs which is causing the validation of your XML files to fail. I recommend you specify the concrete version as otherwise your XML files will not work when upgrading to Spring 3.0.

    HTH

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  4. #4
    Join Date
    Jan 2008
    Location
    Merion, Pa
    Posts
    65

    Default

    Quote Originally Posted by Christian Dupuis View Post
    Hey,

    the dependency-check and default-dependency-check elements have been removed in Spring 3.0 hence your validation errors.

    Please see https://fisheye.springsource.org/bro...r2=1003&r1=172

    Spring IDE ships the Spring 3.0 XSDs and maps the version-less schemalocation to the 3.0 XSDs which is causing the validation of your XML files to fail. I recommend you specify the concrete version as otherwise your XML files will not work when upgrading to Spring 3.0.

    HTH

    Christian
    I'm sorry to hear that. It seems to run contrary to the "backward compatibility" we've come to expect from new Spring releases. Did I miss a warning in 2.5 that this would be removed?

  5. #5
    Join Date
    Aug 2004
    Posts
    1,104

    Default

    I just came across this post and thought I should clarify this.

    Quote Originally Posted by easternwahoo View Post
    I'm sorry to hear that. It seems to run contrary to the "backward compatibility" we've come to expect from new Spring releases. Did I miss a warning in 2.5 that this would be removed?
    No, you didn't miss a warning. Deprecation of xsd features is not as convenient as it is for Java code. The removal of the "default-dependency-check" in the 3.0 xsd IS the "deprecation". You can still use the 2.5 xsd by specifying the version and it will all work since the attribute is still supported in the 3.0 code, just not present in 3.0 xsd anymore.

    You're better off always specifying the version for the xsd you are using.
    Thomas Risberg
    SpringSource by Pivotal
    http://www.springsource.org

  6. #6
    Join Date
    Jan 2010
    Posts
    2

    Default

    What should be used instead of default-dependency-check and dependency-check ?
    The current documentation:
    http://static.springsource.org/sprin...y-dependencies
    uses the following (quote):
    "In XML-based configuration metadata, you specify dependency checking via the dependency-check attribute in a bean definition, which can have the following values."
    Last edited by stole; Jan 5th, 2010 at 08:55 AM. Reason: supplementary information

  7. #7
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    BTW, major (first-digit change) releases typically does not guarantee 100% backward compatibility, here is more or less standard convention for release numbering (established by Apache Portable Runtime and followed by many projects around the world)
    Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.
    Quote Originally Posted by easternwahoo View Post
    I'm sorry to hear that. It seems to run contrary to the "backward compatibility" we've come to expect from new Spring releases. Did I miss a warning in 2.5 that this would be removed?

  8. #8
    Join Date
    Jan 2008
    Location
    Merion, Pa
    Posts
    65

    Default

    Quote Originally Posted by stole View Post
    What should be used instead of default-dependency-check and dependency-check ?
    The current documentation:
    http://static.springsource.org/sprin...y-dependencies
    uses the following (quote):
    "In XML-based configuration metadata, you specify dependency checking via the dependency-check attribute in a bean definition, which can have the following values."
    The @Required annotation should be used instead.

  9. #9
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Thumbs down

    Quote Originally Posted by easternwahoo View Post
    The @Required annotation should be used instead.
    Especially with the 3rd-party code

  10. #10
    Join Date
    Jan 2010
    Posts
    2

    Default

    I was wondering if the @Required annotation can be used together with constructor injection? Also what about the documentation:
    http://static.springsource.org/sprin...y-dependencies
    Is this an error in the documentation (quote): In XML-based configuration metadata, you specify dependency checking via the dependency-check attribute in a bean definition, which can have the following values...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •