Quantcast
Viewing all articles
Browse latest Browse all 128

Index with the same name but different config exists!

Hi,
I am getting this error when I try to save the Address entity. The address entity is as shown below

Code:

@NodeEntity
public class Address extends AbstractEntity {
        @RelatedTo(type = "RiskAddress", direction = Direction.INCOMING)
        private Policy policy;
        String addressLine1, addressLine2, country;
        double latitude, longitude;
        @Indexed(indexType = POINT, indexName = "LAT_LONG")
        String wkt;
        @RelatedTo(type="RiskCity")
        City city;
        @RelatedTo(type="RiskState")
        State state;

The error is happening for the WKT and also that the first insertion of address is successful. only on subsequent insertion, it is failing with this error. After this error, the same error is thrown during the application startup.

Stacktrace is below:
Code:

Caused by: java.lang.IllegalArgumentException: Index with the same name but different config exists!
        at org.neo4j.rest.graphdb.index.RetrievedIndexInfo.checkConfig(RetrievedIndexInfo.java:54)
        at org.neo4j.rest.graphdb.index.RestIndexManager.checkIndex(RestIndexManager.java:56)
        at org.neo4j.rest.graphdb.index.RestIndexManager.forNodes(RestIndexManager.java:74)
        at org.neo4j.rest.graphdb.ExecutingRestAPI.createIndex(ExecutingRestAPI.java:167)
        at org.neo4j.rest.graphdb.RestAPIFacade.createIndex(RestAPIFacade.java:249)
        at org.springframework.data.neo4j.rest.SpringRestGraphDatabase.createIndex(SpringRestGraphDatabase.java:108)
        at org.springframework.data.neo4j.support.index.IndexProviderImpl.createIndex(IndexProviderImpl.java:93)
        at org.springframework.data.neo4j.support.index.IndexProviderImpl.getIndex(IndexProviderImpl.java:70)
        at org.springframework.data.neo4j.support.index.IndexProviderImpl.getIndex(IndexProviderImpl.java:110)
        at org.springframework.data.neo4j.support.Neo4jTemplate.getIndex(Neo4jTemplate.java:650)
        at org.springframework.data.neo4j.fieldaccess.IndexingPropertyFieldAccessorListenerFactory$IndexingPropertyFieldAccessorListener.valueChanged(IndexingPropertyFieldAccessorListenerFactory.java:77)
        at org.springframework.data.neo4j.fieldaccess.DefaultEntityState.notifyListeners(DefaultEntityState.java:137)
        at org.springframework.data.neo4j.fieldaccess.DefaultEntityState.setValue(DefaultEntityState.java:114)
        at org.springframework.data.neo4j.support.mapping.SourceStateTransmitter.setEntityStateValue(SourceStateTransmitter.java:70)

I do not know how to debug/resolve this issue. If I comment the Index annotation, the application works fine.

Viewing all articles
Browse latest Browse all 128

Trending Articles