0

I'm experiencing weird exception when trying to run my integration application on Tomcat 8.5: Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component.

My Maven dependencies are:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-spring</artifactId>
    <version>2.18.1</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.21</version>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-jms</artifactId>
    <version>2.18.1</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>4.3.4.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-all</artifactId>
    <version>5.14.2</version>
</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-stream</artifactId>
    <version>2.18.1</version>
</dependency>
<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>4.1.5.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-ogm-api</artifactId>
    <version>2.1.0</version>
</dependency>
<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-commons-core</artifactId>
    <version>1.4.1.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j-tx</artifactId>
    <version>3.4.6.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>4.3.4.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-commons</artifactId>
    <version>1.12.5.RELEASE</version>
</dependency>

My camel-config.xml is:

<?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:camel="http://camel.apache.org/schema/spring"
    xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
       http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">

    <neo4j:config storeDirectory="D:\ProgramFiles\Neo4j CE 3.1.0\data" base-package="my.package.repos" />
    <neo4j:repositories base-package="opendata.etl.ufop.data" />
    <tx:annotation-driven />

when trying to run the application I got:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 77 in XML document from class path resource [camel-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/data/neo4j/spring-neo4j.xsd; lineNumber: 77; columnNumber: 72; src-resolve: Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component.

What should I do to make it work?

Thank you

xeonya
  • 31
  • 3
  • Seems to be a duplicate. http://stackoverflow.com/questions/14890474/org-xml-sax-saxparseexception-src-resolve-cannot-resolve-the-name-repository – Jens Schauder Dec 23 '16 at 08:25
  • Also this one: http://stackoverflow.com/questions/34906454/saxparseexception-when-using-spring-data-jpa-tag – Jens Schauder Dec 23 '16 at 08:26
  • Spring Data Neo4j (SDN) 4.1.x is **only** compatible with the Neo4j OGM 2.0.x releases. SDN 4.2.x is **only** compatible with OGM 2.1.x releases. You also don't need to specify a Spring Data Commons dependency. It will be brought in transitively. SDN also does not currently support xml based configuration. Fix these first and see if you still have issues. – digx1 Dec 28 '16 at 06:57

0 Answers0