Results 1 to 5 of 5

Thread: solr add-on problem

  1. #1
    Join Date
    Apr 2011
    Posts
    4

    Default 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. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Does your application actually work and you just see the error marker in STS?
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  3. #3
    Join Date
    Apr 2011
    Posts
    4

    Default

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

  4. #4
    Join Date
    Apr 2011
    Posts
    4

    Default 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'.

  5. #5
    Join Date
    Apr 2011
    Posts
    4

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

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
  •