Announcement Announcement Module
Collapse
No announcement yet.
solr add-on problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • solr add-on problem

    Hi,
    I want to use the solr addon for Roo. However, upon calling 'solr setup' Roo generates invalid xml in the applicationContext.xml - namely the mode attribute of the task:annotation-driven bean is not recognized. I am using STS 2.6 and roo-1.1.3. I checked the namespaces of the applicationContext.xml and it uses spring-task-3.0.xsd.
    Any ideas?

    Here's a snipped from the file:

    <context:component-scan base-package="eu.comeplay">
    <context:exclude-filter expression=".*_Roo_.*" type="regex"/>
    <context:exclude-filter expression="org.springframework.stereotype.Control ler" type="annotation"/>
    </context:component-scan>
    <bean class="org.apache.commons.dbcp.BasicDataSource"
    id="dataSource" destroy-method="close">
    <property name="driverClassName" value="${database.driverClassName}"/>
    <property name="url" value="${database.url}"/>
    <property name="username" value="${database.username}"/>
    <property name="password" value="${database.password}"/>
    <property name="validationQuery" value="SELECT 1 FROM DUAL"/>
    <property name="testOnBorrow" value="true"/>
    </bean>
    <bean class="org.springframework.orm.jpa.JpaTransactionM anager" id="transactionManager">
    <property name="entityManagerFactory" ref="entityManagerFactory"/>
    </bean>
    <tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
    <bean class="org.springframework.orm.jpa.LocalContainerE ntityManagerFactoryBean" id="entityManagerFactory">
    <property name="dataSource" ref="dataSource"/>
    </bean>
    <bean class="org.springframework.security.authentication .encoding.MessageDigestPasswordEncoder" id="passwordEncoder">
    <constructor-arg value="SHA-256"/>
    </bean>
    <bean class="org.springframework.mail.javamail.JavaMailS enderImpl" id="mailSender">
    <property name="host" value="${email.host}"/>
    <property name="protocol" value="${email.protocol}"/>
    <property name="port" value="${email.port}"/>
    <property name="username" value="${email.username}"/>
    <property name="password" value="${email.password}"/>
    <property name="javaMailProperties">
    <props>
    <prop key="mail.smtp.auth">true</prop>
    <prop key="mail.smtp.starttls.enable">true</prop>
    </props>
    </property>
    </bean>



    <task:annotation-driven executor="asyncExecutor" mode="aspectj" />
    <task:executor id="asyncExecutor" pool-size="${executor.poolSize}" />
    <bean class="org.apache.solr.client.solrj.impl.CommonsHt tpSolrServer" id="solrServer">
    <constructor-arg value="${solr.serverUrl}"/>
    </bean>

  • #2
    Does your application actually work and you just see the error marker in STS?

    Comment


    • #3
      It doesn't. When I try to start it, it crashes with a SAXParseException.

      Comment


      • #4
        Update

        The error shown by the IDE: cvc-complex-type.3.2.2: Attribute 'mode' is not allowed to appear in element 'task:annotation-driven'.

        Comment


        • #5
          Fix

          I resolved the problem by updating the spring and aspectj versions in the pom.xml file to 3.0.5.RELEASE and 1.6.11 respectively.

          Comment

          Working...
          X