Results 1 to 3 of 3

Thread: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'.

  1. #1

    Thumbs down cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'.

    HI ,

    I am using Springs 3.1.0.M1 version with Eclipse, during this time I am getting file [C:\Spring_Example\SpringHelloWorld.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. exception.

    and my xml file is like this

    <?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:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-3.1.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.1.xsd">


    <bean id="SpringHelloWorldBean" class="com.src.SpringHelloWorld"/>
    <property name="name" value="Srinivas"/>
    </beans>
    For this I have place all the jars which are related to Springs from dist folder and also with that xerces, xercsimpl, commanlogging jars in the classpath ,even though error is not going

    Please help me to jump out from this error,

    thanks
    Srini

  2. #2
    Join Date
    Jun 2011
    Posts
    2

    Default

    <bean id="SpringHelloWorldBean" class="com.src.SpringHelloWorld"/>
    <property name="name" value="Srinivas"/>
    </beans>

    The bean element closed before setting property

    <bean id="SpringHelloWorldBean" class="com.src.SpringHelloWorld">
    <property name="name" value="Srinivas"/>
    </beans>


  3. #3

    Default

    Thanks for qucik response Bala.

    Here one is beans and bean tags in the xml file ,seems I forgot it to close properly

Tags for this Thread

Posting Permissions

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