Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: NPE on @PostConstruct method that adds data to Neo4j with the Template

  1. #11
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    What is your spring config?

    Michael

  2. #12
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    Somehow weird b/c if you use the AJ approach (spring-data-neo4j-aspects), the must be a neo4jNodeBacking bean.

  3. #13
    Join Date
    Jan 2009
    Location
    Huntington Beach, CA
    Posts
    718

    Default

    Quote Originally Posted by MichaelHunger View Post
    What is your spring config?

    Michael
    applicationContext.xml

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:aop="http://www.springframework.org/schema/aop"
           xmlns:context="http://www.springframework.org/schema/context"
           xmlns:jee="http://www.springframework.org/schema/jee"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.springframework.org/schema/aop
               http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
               http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
               http://www.springframework.org/schema/context
               http://www.springframework.org/schema/context/spring-context-3.0.xsd
               http://www.springframework.org/schema/jee
               http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
               http://www.springframework.org/schema/tx
               http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
    
        <context:property-placeholder location="classpath*:META-INF/spring/*.properties"/>
    
        <context:spring-configured/>
    
        <context:component-scan base-package="com.perfectworldprogramming.eventgate">
            <context:exclude-filter expression="org.springframework.stereotype.Controller" type="annotation"/>
        </context:component-scan>
    
    </beans>
    applicationContext-graph.xml which was posted above before.

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/tx
           http://www.springframework.org/schema/tx/spring-tx.xsd
           http://www.springframework.org/schema/data/neo4j
           http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd">
    
    
        <neo4j:config storeDirectory="${neo4j.location}"/>
        <neo4j:repositories base-package="com.perfectworldprogramming.eventgate"/>
        <tx:annotation-driven mode="proxy"/>
    </beans>
    My other config files are for Spring MVC components and Spring Security and they only include beans for the web layer and security layer, nothing Spring Data related.

    I do not have neo4j-aspects in my pom file.

    Thanks Michael

    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •