2Answers
  • 11
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Install Neo4j via Maven

Neo4j says I can install Neo4j via Maven by adding it to my build:

<dependency>
 <groupId>org.neo4j</groupId>
 <artifactId>neo4j</artifactId>
 <version>1.8.1</version>
</dependency>

But do I need a build? If so, what should my pom.xml look like?

I tried with this:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.webcom.app</groupId>
  <artifactId>webcom</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>webcom</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
        <dependency>
            <groupId>org.neo4j</groupId>
        <artifactId>neo4j</artifactId>
        <version>1.9.M04</version>
    </dependency>
  </dependencies>
</project>

But then I end up with:

[ERROR] Unable to locate the Javac Compiler in:
[ERROR] /opt/local/java/sun6/../lib/tools.jar

I have installed sun-jdk6-6.0.26 and set JAVA_HOME to /opt/local/java/sun6.

I solved as follows:

  1. Go to directory: /opt/local/java
  2. Execute "sudo ln -s sun6/lib/"
  3. To verify execute "sudo ls -ld lib"

Now your Maven command will run without problem. Good luck!

  • 0
Reply Report

The env var $JAVA_HOME should point to the directory containing bin, so that $JAVA_HOME/bin contains javac. (You probably worked-around a mis-configured env var that might cause other problems later -- e.g., not finding other parts of the JDK)

Verify that everything is set up correctly by running: type javac (and type java) , javac -version (and java -version). If the wrong version is found, check the path & java_home (always: PATH=$JAVA_HOME/bin:$PATH)

If using eclipse (a common misconfiguration issue), you'll have to configure your jdk via the preferences -> installed jre's (or possibly project->java build path->libraries->JRE System Library->edit->"workspace default JRE")

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags