3

I want to use OpenTripPlanner for multimodal journeyplanning. I would like to use GTFS and GTFS-RT data together with openstreetmaps.

My Platform: Ubuntu 10.04 (Lucid) LTS

I found a lot of information on the internet, but a lot of it is old and often links are not working which didn't make my task any easier.

I followed several approaches, but they didn't work out. I'm a newbe to this, but I think installing and configuration can't be that difficult.

My question: How can I install OTP on my server and configure it ready for using the API?

See below.

=========================== Approach by Github:

// STEP 1:

sudo apt-get update
sudo apt-get install tomcat6 maven2 subversion default-jdk wget iptables tomcat6-examples tomcat6-admin
sudo apt-get install git

// STEP 2:

git clone https://github.com/opentripplanner/OpenTripPlanner
cd OpenTripPlanner 
git checkout stable

==> The below alternative didn't work: (error: branch cannot be found)

git clone https://github.com/opentripplanner/OpenTripPlanner.git
git checkout mmri-rt (for mmri-rt branch)
mvn package -DskipTests

// STEP 3: cd root

mkdir graph (upload changed config file "graph-config.xml", I used ftp)

// STEP 4:

mvn package -DskipTests
cd opentripplanner-graph-builder/target (error: /target not found)
java -Xmx2048M -jar graph-builder.jar /root/graph/graph-config.xml

==> The below also didn't work:

mvn package -DskipTests
./build-old /root/graph/graph-config.xml

=========================== Approach by Opentripplanner.org:

STEP 1:

cd root
mkdir otp
wget http://maven.conveyal.com.s3.amazonaws.com/org/opentripplanner/otp/0.19.0/otp-0.19.0-shaded.jar
wget http://maven.conveyal.com.s3.amazonaws.com/org/opentripplanner/otp/maven-metadata.xml
wget http://maven.conveyal.com.s3.amazonaws.com/org/opentripplanner/otp/0.19.0/otp-0.19.0.pom

STEP 2:

apt-get install maven2
mvn install:install-file -Dfile=otp-0.19.0-shaded.jar -DpomFile=otp-0.19.0.pom

STEP 3:

cd root/.m2/repository/org/opentripplanner/otp/0.19.0
java -jar otp-0.19.0.jar

==> error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/opentripplanner/standalone/OTPMain : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.opentripplanner.standalone.OTPMain. Program will exit.

The below links provide information:

// Old github manual:

https://github.com/opentripplanner/OpenTripPlanner/wiki/SettingUpOTPServer

// Opentripplanner.org manual:

http://docs.opentripplanner.org/en/latest/Basic-Usage/#get-otp

// Build een graph file:

https://github.com/opentripplanner/OpenTripPlanner/wiki/GraphBuilder

// Run the webapp in Tomcat:

https://github.com/opentripplanner/OpenTripPlanner/wiki/RunningTheWebappInTomcat

// About realtime planner branch:

https://groups.google.com/forum/#!msg/transit-developers/MbGRNM9keJ8/vYmSKLQRKsQJ

// API DOC:

http://dev.opentripplanner.org/apidoc/0.15.0/

// Java doc:

http://dev.opentripplanner.org/javadoc/0.19.0/

// Issues with OTP

https://github.com/opentripplanner/OpenTripPlanner/issues/2193

// running webap in tomcat:

https://github.com/opentripplanner/OpenTripPlanner/wiki/RunningTheWebappInTomcat

// posts:

https://groups.google.com/forum/#!forum/opentripplanner-dev

Further question: On the site ( https://groups.google.com/forum/#!msg/transit-developers/MbGRNM9keJ8/vYmSKLQRKsQJ ) I read that a "graph-builder.xml" file is not used anymore in newer versions. Configuration should take place using the command line. But how can you safe a number of settings? As a backup for example to restore.

Sevle
  • 3,109
  • 2
  • 19
  • 31
BastiaanWW
  • 1,259
  • 4
  • 18
  • 34

1 Answers1

0

Version 1.0.0 of OpenTripPlanner (OTP) was released late last year (https://github.com/opentripplanner/OpenTripPlanner/releases/tag/otp-1.0.0), so I know it's a long time since you posted your question but I'd recommend trying the latest version out!

I got OTP to work by following the instructions here: http://docs.opentripplanner.org/en/latest/Basic-Usage/ . I'm happy to respond with any specific issues you might have with deploying OTP, but for now I use a combination of shell scripts and configuration files (http://docs.opentripplanner.org/en/latest/Configuration/) to build and run OTP.

Anthony Joseph
  • 235
  • 1
  • 2
  • 10