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 3300680
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:41:01+00:00 2026-05-17T20:41:01+00:00

I have the following code package myPackage; import org.neo4j.graphdb; import org.neo4j.kernel.EmbeddedGraphDatabase; public class dbServlet

  • 0

I have the following code

package myPackage;

import org.neo4j.graphdb;
import org.neo4j.kernel.EmbeddedGraphDatabase;

public class dbServlet extends HttpServlet {

public void init() throws ServletException {
    // Start up the database here                                                      
    GraphDatabaseService graphDb = new EmbeddedGraphDatabase("var/base");

}

public void destroy() {
    graphDb.shutdown();

}

and build.xml file:

<project name="dbServlet" basedir="." default="compile">

  <property name="src.dir" value="src"/>
  <property name="lib.dir" value="lib"/>
  <property name="build.dir"  value="build"/>
  <property name="classes.dir"  value="${build.dir}/classes"/>
  <property name="jar.dir"  value="${build.dir}/jar"/>

  <path id="classpath">
    <fileset dir="${lib.dir}" includes="**/*.jar"/>
  </path>

    <target name="clean">
        <delete dir="${build.dir}"/>
    </target>

    <target name="compile">
        <mkdir dir="${classes.dir}"/>
        <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
    </target>

</project>

All of the neo4j jars are located in a lib directory where the build.xml file is. The source is located at src/myPackage/dbServlet.java. When I run ant -v, the classpath includes the jars that have the neo4j classes, but javac is saying the packages don’t exist. Anyone know why this could be?

Heres a snippet of the errors (I’m concerned with the first one for now, I know that the servlet api’s aren’t on the path yet):

[javac] /home/shaun/projects/helloAnt/src/myPackage/dbServlet.java:3: package org.neo4j does not exist
[javac] import org.neo4j.graphdb;
[javac]                 ^
[javac] /home/shaun/projects/helloAnt/src/myPackage/dbServlet.java:6: cannot find symbol
[javac] symbol: class HttpServlet
[javac] public class dbServlet extends HttpServlet {
[javac]                                ^
[javac] /home/shaun/projects/helloAnt/src/myPackage/dbServlet.java:8: cannot find symbol
[javac] symbol  : class ServletException
[javac] location: class myPackage.dbServlet
[javac]     public void init() throws ServletException {
[javac]                               ^
  • 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-17T20:41:02+00:00Added an answer on May 17, 2026 at 8:41 pm

    It looks to me like your import is not quite right – do you want to import all the classes in the org.neo4j.graphdb package?

    import org.neo4j.graphdb.*;
    

    Else you should give a specific class name. The javac error message indicates that a package org.neo4j is being sought – graphdb is being treated as a class name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: package ; import flash.display.DisplayObject; import flash.display.Graphics; import flash.display.MovieClip; import
I am having a class that extends View. I have another class that extends
I have the following code I want to detect the screen off of the
I have the following code in header.php to echo the body's id: <body id=<?php
I'm trying to run the following code but unfortunately facing Error problems package jskypeexample;
I am trying to understand how the following code ties into two other .java
I am absolutely new to the Android platform and have been building an application
I am using netbeans for developing java dextop application,I have created a JFilechooser which
I have searched for a method of embedding a resource in a java project
I am trying to figure out how to dynamically populate textfields in Flash. The

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.