Results 1 to 4 of 4

Thread: An exception (How I can sort out ...)

  1. #1

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Toulouse, France
    Posts
    148

    Default

    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

  3. #3

    Default

    Quote 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.

  4. #4
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    '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.
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. Replies: 3
    Last Post: Oct 5th, 2005, 08:39 AM
  2. Context initialization failed
    By kanonmicke in forum Container
    Replies: 7
    Last Post: Sep 29th, 2005, 12:35 AM
  3. Odd behaviour when injecting TransactionTemplate
    By damon311 in forum Container
    Replies: 3
    Last Post: Jul 23rd, 2005, 11:21 AM
  4. Replies: 0
    Last Post: Jul 11th, 2005, 05:49 PM
  5. Replies: 3
    Last Post: Nov 8th, 2004, 07:30 PM

Posting Permissions

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