Announcement Announcement Module
Collapse
No announcement yet.
cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    <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>

    Comment


    • #3
      Thanks for qucik response Bala.

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

      Comment

      Working...
      X