Announcement Announcement Module
No announcement yet.
Exception with One to one relation and findBy Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception with One to one relation and findBy

    I'm having a problem with a findBy method, in one of my repositories.
    public class Owner {
    @RelatedTo( direction = Direction.OUTGOING ) // this changes nothing
    private Principal principal;
    public class Principal {

    public interface IOwnerNeo4JDAO extends GraphRepository< Owner >{
    Owner findByPrincipal( final Principal principal );

    So, pretty straightforward, only the method results in the following exception:

    java.lang.IllegalArgumentException: Index 0 not valid
    at pherQueryBuilder.getPartInfo(CypherQueryBuilder.ja va:105)
    at rivedCypherRepositoryQuery.resolveParameter(Derive
    at aphQueryMethod.resolveParams( :80)
    at aphRepositoryQuery.resolveParams(GraphRepositoryQu
    at aphRepositoryQuery.execute(GraphRepositoryQuery.ja va:68)
    at rivedCypherRepositoryQuery.execute(DerivedCypherRe
    at epositoryFactorySupport$QueryExecutorMethodInterce ptor.invoke(
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :172)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:110)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :172)
    at onTranslationInterceptor.invoke(PersistenceExcepti
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :172)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(
    at $Proxy41.findByPrincipal(Unknown Source)
    at com.geocoding.persistence.common.service.owner.Own erService.getCurrentOwner(

    Any help is appreciated.
    Thank you.