Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7406513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:34:12+00:00 2026-05-29T05:34:12+00:00

I´m getting a little bit lost in my own (maven enabled) dynamic WEB –

  • 0

I´m getting a little bit lost in my own (maven enabled) dynamic WEB – Project. The project works fine, I´ve got a RESTful WebService (Jersey) running and I´m able to consume it.

… my next step was to persist my domain classes, with Spring Data and Neo4j. So, I´ve added some tags to my pom.xml

...
<repository>
  <id>spring-milestone</id>
  <name>Spring Maven MILESTONE Repository</name>
  <url>http://maven.springframework.org/milestone</url>
</repository>

<dependency>
  <groupId>org.springframework.data</groupId>
  <artifactId>spring-data-neo4j</artifactId>
  <version>2.0.0.RELEASE</version>
</dependency>
...

my next step was to annotate my entity-classes… here is a simple example:

...
@NodeEntity
public class Category {

@GraphId Long nodeId;
String categoryType;

public Category(String categoryType){
    this.categoryType = categoryType;
}

}
...

okay, everything´s fine… now I want to persist my category-object…

@Autowired Neo4jTemplate template;
@Test @Transactional 
public void toGraphDb() {

      template.save(new Category("mashineCategory"));
}   

when I run the test I´m getting a NullPointerException, cause the template is null

I guess there is something missing in my project, but I´m not sure in which folder/file to add informations/files…

here is my web.xml:

...
<display-name>ElisaSimulatorM4</display-name>

<servlet>
  <servlet-name>Jersey REST Service</servlet-name>
   <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
  <param-name>com.sun.jersey.config.property.packages</param-name>
  <param-value>de.elisa.communication.webservice.restservice.implementation</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>


<servlet-mapping>
  <servlet-name>Jersey REST Service</servlet-name>
  <url-pattern>/rest/*</url-pattern>
</servlet-mapping>
...

in some guides I read something about dispatcherServlets and an applicatonContext.xml, but I have no idea where to put it in my project.

Maybe someone can help me out…

Ps. I wanted to upload a screenshot from my project-tree but as a greenhorn I haven’t got enough reputation… sorry for that

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:34:13+00:00Added an answer on May 29, 2026 at 5:34 am

    Perhaps it is best to look into the supplied examples of Spring Data Neo4j http://spring.neo4j.org/examples there are some for simple projects like hello-world and some for more advanced web-applications cineasts.

    To get the idea the Spring Documentation about the general setup of a Spring(Web) application should help you.

    You should probably start with a console application to get the ideas and then incorporate that in your web-application.

    The applicationContext.xml file is the SpringFramework configuration file. It should be enough to have a minimal one, like this from the hello-world example.

    Put it in src/main/resources/applicationContext.xml

    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:context="http://www.springframework.org/schema/context"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           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-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/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
    
        <context:spring-configured/>
        <context:annotation-config/>
    
        <neo4j:config storeDirectory="path/to/db"/>
        <neo4j:repositories base-package="org.example.repository"/>
    
    </beans>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am getting little bit lost with all the XML handling methods in java,
I am a little bit lost. I am getting this JSON: [{ id: 210,
I'm getting a little tired of building web applications. Feels like same thing over
My little brother is just getting into programming, and for his Science Fair project,
I've been struggling with getting a working regular expression for a little project of
I'm having a little dilemma with an iphone project. I'm getting some JSON data
I'm getting a little bit frustrated since I can't find out which variables I
This is getting little bit tricky. I am using state pattern in my application
I need a little bit help getting information about the last lets say 5
Little bit of a beginner here, working on a personal project to scrape my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.