Announcement Announcement Module
Collapse
No announcement yet.
An exception (How I can sort out ...) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • An exception (How I can sort out ...)

    Here is an execption.

    2004-10-18 17:03:55 StandardContext[/servicerants]Servlet /servicerants threw load() exception
    javax.servlet.ServletException: Servlet.init() for servlet context threw exception
    ...
    ----- Root Cause -----
    org.springframework.beans.factory.BeanDefinitionSt oreException: Line 73 in XML document from resource [/WEB-INF/applicationContext-hibernate.xml] of ServletContext is invalid; nested exception is org.xml.sax.SAXParseException: Attribute "abstract" must be declared for element type "bean".
    org.xml.sax.SAXParseException: Attribute "abstract" must be declared for element type "bean".
    ...

    However, on the line 73 of the applicationContext-biberante.xml, the bean is declared as abstract as the following:

    <bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean"
    abstract="true">
    <property name="transactionManager"><ref bean="transactionManager"/></property>
    <property name="transactionAttributes">
    <props>
    <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="store*">PROPAGATION_REQUIRED</prop>
    </props>
    </property>
    </bean>

    What is wrong here?

  • #2
    The problem comes from the dtd file. The dtd must be an older one, with the abstract attribute not mentionned, hence when using the dtd to validate your beans file, it complain on it.
    Update your spring.dtd to the latest and it should do the trick.

    Olivier

    Comment


    • #3
      Originally posted by ojolly
      The problem comes from the dtd file. The dtd must be an older one, with the abstract attribute not mentionned, hence when using the dtd to validate your beans file, it complain on it.
      Update your spring.dtd to the latest and it should do the trick.

      Olivier
      The DTD file is the same version as the sprint.jar, which is 1.0. I pull in the 1.1 version DTD file. It doesn't help at all.

      Comment


      • #4
        'abstract' was actually only added for 1.1.1. You should move to 1.1.1, or if there is some strong reason to stay with 1.1, you could use
        lazy-init="true"
        for almost the same effect.

        Comment

        Working...
        X