My favorites | Sign in
Project Home Wiki Source
Search
for
Instructions  
Instructions for compiling and running the EtherPad open source release
Updated Dec 17, 2009 by dlpet...@gmail.com

Welcome to open sourced EtherPad!

This file contains instructions for compiling and running the etherpad open source release. The steps have been tested on MacOS X and Linux. Windows users will probably want to grab Cygwin.

Requirements

Environment

Various scripts make assumptions about environment variables:

  • JAVA should be set to the java executable.
  • JAVA_HOME should be set to the main jdk directory.
  • SCALA should be set to the scala executable.
  • SCALA_HOME should be set to the main scala distribution directory.
  • PATH should contain $JAVA, $SCALA, and mysql
  • MYSQL_CONNECTOR_JAR should be set to the mysql-connector JAR file included in the mysql-connector download.

For example, this sets up the environment on my machine:

export JAVA_HOME="/usr/local/java/jdk1.6.0_10"
export SCALA_HOME="/usr/local/scala/scala-2.7.4.final"
export JAVA="$JAVA_HOME/bin/java"
export SCALA="$SCALA_HOME/bin/scala"
export PATH="$JAVA_HOME/bin:$SCALA_HOME/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/Aaron/lib/mysql-connector-java-5.1.10-bin.jar"

Database Setup

The scripts assume mysqld is running on localhost. Once mysqld is running, you can set up the etherpad database by running the following command inside ajcode/etherpad/.

$ sudo bin/setup-mysql-db.sh

This will create a database called "etherpad" with the password "password", and grant privileges to the user "etherpad".

All the tables will be set up the first time etherpad is run.

Compiling

EtherPad compiles all its Java and Scala libraries into a single JAR. To build this jar, you can run the following command inside ajcode/etherpad/.

$ bin/rebuildjar.sh

If you modify anything in ajcode/infrastructure, you will most likely need to kill the server, rebuild the jar, and re-launch the server before your change takes effect.

Code inside ajcode/etherpad/src can be modified while the server is running, and the changes will automatically get picked up.

Running

To run the etherpad web server, execute the following command inside ajcode/etherpad/.

$ bin/run-local.sh

The first time you run this, it should print out lots of messages about database migrations and finally print:

HTTP server listening on http://localhost:9000/

At this point, you should be able to visit http://localhost:9000/ in your web browser and create a new pad.

Support

Please use this google group to ask questions about the code. You may also want to consult the KnownIssues.

Comment by holmstro...@gmail.com, Dec 18, 2009

There are some minor spelling errors in the mysql shell script ("privilige" ln 27, "etherpad etherpad" ln 24).

Comment by ialli...@gmail.com, Dec 18, 2009

Thanks for the straight forward and simple directions. I got my server up and running in about 10 minutes.

Comment by tdai...@gmail.com, Dec 18, 2009

got this going on mac os x no problems. to get this going on external domain other than localhost you need to edit the globals.js as detailed here.

http://groups.google.com/group/etherpad-open-source-discuss/browse_thread/thread/aad77dd4c875402d

Comment by ddruckerccn, Dec 18, 2009

Works for me!

Comment by knigh...@gmail.com, Dec 18, 2009

gonna give that a try

Comment by mbre...@gmail.com, Dec 18, 2009

FYI:

If you're trying to get this running on a server with subdomains (foo.bar.example.com), you need to add your domain to the SUPERDOMAINS map in src/etherpad/globals.js

Comment by riighteous, Dec 18, 2009

It Works!!

Comment by mhall...@gmail.com, Dec 18, 2009

Got an error trying to install on Ubuntu Server 9.04:

building javascript classfiles... org.mozilla.javascript.EvaluatorException?: syntax error (cache_utils.js#17)

at org.mozilla.javascript.DefaultErrorReporter?.runtimeError(DefaultErrorReporter?.java:109) at org.mozilla.javascript.DefaultErrorReporter?.error(DefaultErrorReporter?.java:96) at org.mozilla.javascript.Parser.addError(Parser.java:146) at org.mozilla.javascript.Parser.reportError(Parser.java:160) at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2464) at org.mozilla.javascript.Parser.memberExpr(Parser.java:1950) at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1808) at org.mozilla.javascript.Parser.mulExpr(Parser.java:1737) at org.mozilla.javascript.Parser.addExpr(Parser.java:1718) at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1698) at org.mozilla.javascript.Parser.relExpr(Parser.java:1672) at org.mozilla.javascript.Parser.eqExpr(Parser.java:1628) at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1617) at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1606) at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1595) at org.mozilla.javascript.Parser.andExpr(Parser.java:1583) at org.mozilla.javascript.Parser.orExpr(Parser.java:1571) at org.mozilla.javascript.Parser.condExpr(Parser.java:1554) at org.mozilla.javascript.Parser.assignExpr(Parser.java:1539) at org.mozilla.javascript.Parser.expr(Parser.java:1518) at org.mozilla.javascript.Parser.statementHelper(Parser.java:1245) at org.mozilla.javascript.Parser.statement(Parser.java:708) at org.mozilla.javascript.Parser.parse(Parser.java:401) at org.mozilla.javascript.Parser.parse(Parser.java:338) at org.mozilla.javascript.optimizer.ClassCompiler?.compileToClassFiles(ClassCompiler?.java:161) at net.appjet.bodylock.compilationutils$.compileToBytes(bodylock.scala:188) at net.appjet.bodylock.Compiler$.compileSingleFile(bodylock.scala:265) at net.appjet.bodylock.Compiler$$anonfun$main$2.apply(bodylock.scala:288) at net.appjet.bodylock.Compiler$$anonfun$main$2.apply(bodylock.scala:277) at scala.Iterator$class.foreach(Iterator.scala:414) at scala.runtime.BoxedArray?$AnyIterator?.foreach(BoxedArray?.scala:45) at scala.Iterable$class.foreach(Iterable.scala:256) at scala.runtime.BoxedArray?.foreach(BoxedArray?.scala:24)

Comment by practica...@gmail.com, Dec 19, 2009

rebuildjar.sh failed:

$ bin/rebuildjar.sh
using JAR fastjar...
cp: brakujący plik docelowy po `lib/'
Spróbuj `cp --help' dla uzyskania informacji.
Comment by lkravov...@gmail.com, Dec 19, 2009

you can do bash -x bin/rebuildjar.sh to see where it pukes. you most likely dont have SCALA_HOME set right.

Comment by myprasa...@gmail.com, Dec 19, 2009

I was able to get it working. I'm hosting it here: www.ietherpad.com

Cheers.

Comment by kitesurf...@gmail.com, Dec 19, 2009

Any hint to get etherpad working with Ubuntu 8.04 or Debian 5? Same problem that practical.coder described ^^

Comment by marcello.barnaba, Dec 19, 2009

Checked out, configured, built and tweaked global.js (SUPERDOMAINS) to allow sharing with friends in less than 30 minutes (OSX 10.6 + MacPorts?). Will digg deeper into the software in the next weeks, in the meantime thanks to the Etherpad team (and to Google) for open-sourcing the code. :-)

Comment by raz...@gmail.com, Dec 19, 2009

lkravovicz, thanks for the tip. kitesurfer1404 & practical.coder, that specific error you get when mysql-connector-java-5.1.10-bin.jar cannot be found, which means MYSQL_CONNECTOR_JAR is not set right, so it tries to execute something like cp lib/ which stops the compilation instead of cp mysql-connector-java-5.1.10-bin.jar lib/ Also for Ubuntu you can install scala with sudo apt-get install scala

Comment by mhall...@gmail.com, Dec 19, 2009

Okay, switching to sun-java7-jdk, instead of openjdk, fixed part of my build problem. However, installing Scala from the Ubuntu repos puts the jars in /usr/share/java, but the script looks for them in $SCALA_HOME/lib/, so no value of SCALA_HOME will work, so I had to make the following change:

diff -r 81287c8af1ac trunk/infrastructure/bin/makejar.sh
--- a/trunk/infrastructure/bin/makejar.sh       Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/infrastructure/bin/makejar.sh       Sat Dec 19 09:15:35 2009 -0500
@@ -32,11 +32,11 @@
 
 TMPSTORE=/tmp/ajbuild-tmpstore-`date +%s`
 
-JARFILES=`echo $SCALA_HOME/lib/scala-library.jar lib/*.jar lib/manifest`
+JARFILES=`echo $SCALA_HOME/scala-library.jar lib/*.jar lib/manifest`
 function genjar {
     echo "unzipping JARs..."
     pushd $1 >> /dev/null
-    $JAR xf $SCALA_HOME/lib/scala-library.jar
+    $JAR xf $SCALA_HOME/scala-library.jar
     rm -rf META-INF
     for a in ../../lib/*.jar; do
        $JAR xf $a
Comment by mhall...@gmail.com, Dec 19, 2009

ON Ubuntu, I installed libmysql-java, so for the MYSQL_CONNECTOR_JAR I put

export MYSQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar

This fixes the problem practical.coder had for me.

Comment by kitesurf...@gmail.com, Dec 19, 2009

Well, worked good for me with manual downloading of scala and mysql-connector and the setting the SCALA and MYSQL... variables to the right paths. But now I have this problem while building:

 user@host: bin/rebuildjar.sh 
 using JAR fastjar...
 lib/mysql-connector-java-5.1.10-bin.jar has changed, rebuilding JAR
 unzipping JARs...
 making cached JAR....
 compiling...
 compiling with 'fsc'...
 compiling common...
 Note: net.appjet.common/util/HttpServletRequestFactory.java uses or overrides a deprecated API.
 Note: Recompile with -Xlint:deprecation for details.
 Note: net.appjet.common/util/HttpServletRequestFactory.java uses unchecked or unsafe operations.
 Note: Recompile with -Xlint:unchecked for details.
 java.net.ConnectException: Connection refused
 ...connection attempt to server at port 51410 failed; re-trying...
 java.net.ConnectException: Connection refused
 [...]
 Unable to establish connection to server; exiting
Comment by HeilM...@gmail.com, Dec 19, 2009

I wish there was an easier way of installing this in a Wordpress-like fashion, i.e. with a form you just need to enter your MySQL data into, and the rest installing more or less without further steps... is there any chance of getting/setting up such a package? I'm particularly stuck with getting the Scala and environment variables requirements right on my (non-self-hosted!) environment...

Comment by adam%nor...@gtempaccount.com, Dec 19, 2009

I am getting the same error as @kitesurfer1404

/var/www/northisup/etherpad/trunk/infrastructure
jar
using JAR jar...
lib/mysql-connector-java.jar has changed, rebuilding JAR
unzipping JARs...
making cached JAR....
compiling...
compiling with 'fsc'...
compiling common...
Note: net.appjet.common/util/HttpServletRequestFactory.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: net.appjet.common/util/HttpServletRequestFactory.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:24 error: identifier expected but '_' found.
    var cls: Class[_] = obj.getClass;
                   ^
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:24 error: ']' expected but ';' found.
    var cls: Class[_] = obj.getClass;
                                    ^
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:28 error: 'val' expected but identifier found.
      for(i <- 0 until Array.getLength(obj)) {
          ^
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:31 error: illegal start of simple pattern
    }
    ^
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:30 error: '<-' expected but '}' found.
      }
       ^
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:34 error: 'val' expected but identifier found.
	for (f <- cls.getDeclaredFields) {
             ^
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:43 error: illegal start of simple pattern
      }
      ^
/var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:42 error: '<-' expected but '}' found.
	cls = cls.getSuperclass;
                                ^
8 errors found
bin/rebuildjar.sh finished
Comment by riighteous, Dec 19, 2009

Had to do this to get it working behind an Apache mod_proxy on port 80:

javy-labs trunk # nano etherpad/etc/etherpad.localdev-default.properties 
javy-labs trunk # 
javy-labs trunk # hg diff
diff -r 81287c8af1ac trunk/etherpad/etc/etherpad.localdev-default.properties
--- a/trunk/etherpad/etc/etherpad.localdev-default.properties	Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/etherpad/etc/etherpad.localdev-default.properties	Sun Dec 20 00:47:16 2009 +0200
@@ -5,10 +5,10 @@
 etherpad.fakeProduction = false
 etherpad.isProduction = false
 etherpad.SQL_JDBC_DRIVER = com.mysql.jdbc.Driver
-etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3306/etherpad
+etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3307/etherpad
 etherpad.SQL_PASSWORD = password
 etherpad.SQL_USERNAME = etherpad
-listen = 9000
+listen = pad.vytautas.jakutis.lt:9000
 logDir = ./data/logs
 modulePath = ./src
 transportPrefix = /comet
diff -r 81287c8af1ac trunk/etherpad/src/etherpad/globals.js
--- a/trunk/etherpad/src/etherpad/globals.js	Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/etherpad/src/etherpad/globals.js	Sun Dec 20 00:47:16 2009 +0200
@@ -29,7 +29,7 @@
 var SUPERDOMAINS = {
   'localbox.info': true,
   'localhost': true,
-  'etherpad.com': true
+  'pad.vytautas.jakutis.lt': true
 };
 
 var PNE_RELEASE_VERSION = "1.1.3";
diff -r 81287c8af1ac trunk/etherpad/src/etherpad/helpers.js
--- a/trunk/etherpad/src/etherpad/helpers.js	Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/etherpad/src/etherpad/helpers.js	Sun Dec 20 00:47:16 2009 +0200
@@ -146,7 +146,7 @@
 }
 
 function baseHref() {
-  return request.scheme + "://"+ request.host + "/";
+  return request.scheme + "://pad.vytautas.jakutis.lt/";
 }
 
 function headExtra() {
diff -r 81287c8af1ac trunk/etherpad/src/etherpad/pro/pro_utils.js
--- a/trunk/etherpad/src/etherpad/pro/pro_utils.js	Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/etherpad/src/etherpad/pro/pro_utils.js	Sun Dec 20 00:47:16 2009 +0200
@@ -124,10 +124,10 @@
 // domain, including port if necessary
 function getFullProHost() {
   var h = getFullProDomain();
-  var parts = request.host.split(':');
-  if (parts.length > 1) {
-    h += (':' + parts[1]);
-  }
+//  var parts = request.host.split(':');
+//  if (parts.length > 1) {
+//    h += (':' + parts[1]);
+//  }
   return h;
 }
 
diff -r 81287c8af1ac trunk/etherpad/src/etherpad/utils.js
--- a/trunk/etherpad/src/etherpad/utils.js	Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/etherpad/src/etherpad/utils.js	Sun Dec 20 00:47:16 2009 +0200
@@ -383,9 +383,9 @@
 
 function httpHost(h) {
   h = h.split(":")[0];  // strip any existing port
-  if (appjet.config.listenPort != "80") {
-    h = (h + ":" + appjet.config.listenPort);
-  }
+//  if (appjet.config.listenPort != "80") {
+//    h = (h + ":" + appjet.config.listenPort);
+//  }
   return h;
 }
 
diff -r 81287c8af1ac trunk/infrastructure/framework-src/modules/global/request.js
--- a/trunk/infrastructure/framework-src/modules/global/request.js	Fri Dec 18 18:44:23 2009 +1100
+++ b/trunk/infrastructure/framework-src/modules/global/request.js	Sun Dec 20 00:47:16 2009 +0200
@@ -253,7 +253,7 @@
 get host() {
   if (this.isDefined) {
     // required by HTTP/1.1 to be present.
-    return String(this.headers['Host']).toLowerCase();
+    return 'pad.vytautas.jakutis.lt';
   }
 },
Comment by gaskella...@gmail.com, Dec 19, 2009

Thanks for the instructions, will try it on monday

Comment by mhall...@gmail.com, Dec 19, 2009

I've started a wiki for installing etherpad on Ubuntu: https://wiki.ubuntu.com/Etherpad

Comment by SirSunk...@gmail.com, Dec 19, 2009

For those getting "identifier expected but '_' found" errors, odds are you are running an older version of Scala, most likely caused by doing an apt-get from an older version of Ubuntu. I grabbed a deb package from http://packages.ubuntu.com/jaunty/scala and http://packages.ubuntu.com/jaunty/scala-library, and then manually updated with "dpkg --install your package here"

Comment by google...@alvar.a-blast.org, Dec 20, 2009

When I execute bin/run-local.sh, I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError?: net/appjet/oui/main

I have not enough knowledge of Java, so perhaps someone can get me a hint.

It seems that there are some compiled files missing or not readable? Where it searches for net.appjet.oui.main?

It looks like that the run of bin/rebuildjar.sh was fine, only two warnings:

using JAR jar... unzipping JARs... making cached JAR.... compiling... compiling with 'fsc'... compiling common... Note: net.appjet.common/util/HttpServletRequestFactory?.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: net.appjet.common/util/HttpServletRequestFactory?.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

data/appjet is empty;

System is FreeBSD 8.0 amd64 in a Jail (virtual machine), with JDK 1.6 from Ports, Scala 2.7.7 from Ports, MySQL-Connector from Ports, MySQL 5.1 from Ports.

Thanks!

Comment by thelinxswe, Dec 20, 2009

So the reason that I couldn't get it to compile was this:

The sh files aren't supposed to be run by sh, they're supposed to be run by bash.

That sure makes a lot of sense.

Comment by google...@alvar.a-blast.org, Dec 20, 2009

It seems that the compilation of the scala files fails when running bin/rebuildjar.sh

After digging a bit, I found that the following command in infrastructure/bin/comp.sh fails:

fsc -classpath build/:./:lib/activation.jar:... [...shortened...] \
  -d buildcache/common                                            \
  -target:jvm-1.5                                                 \
  net.appjet.common/rhino/rhinospect.scala 

There is no fail message, the return value is false and the script stops when reaching this line.

Has someone any idea what this means? It seems to me that fsc crashes ...

Java Version:

java version "1.6.0_03-p4"
Java(TM) SE Runtime Environment (build 1.6.0_03-p4-root_19_dec_2009_19_35-b00)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-p4-root_19_dec_2009_19_35-b00, mixed mode)

Scala Version:

Scala code runner version 2.7.7.final -- Copyright 2002-2009, LAMP/EPFL

The complete classpath: build/:./:lib/activation.jar:lib/c3p0-0.9.1.2.jar:lib/commons-lang-2.4.jar:lib/derby-10.5.1.1.jar:lib/derbytools.jar:lib/dnsjava-2.0.6.jar:lib/jetty-6.1.20.jar:lib/jetty-sslengine-6.1.20.jar:lib/jetty-util-6.1.20.jar:lib/json.jar:lib/mail.jar:lib/mysql-connector-java.jar:lib/rhino-js-1.7r1.jar:lib/sanselan-0.94aj.jar:lib/servlet-api-2.5-20081211.jar:lib/tagsoup-1.2.jar:lib/yuicompressor-2.4-appjet.jar

Thanks!

Comment by diogos...@gmail.com, Dec 20, 2009

works fine for me (OSX) thanks!

Diogo Shaw

Comment by sascha.r...@gmail.com, Dec 20, 2009

compiled successfully on ubuntu server 8.04 but doesn't start:

etherpad.fakeProduction -> false
etherpad.isProduction -> false
Startup execution failed with error.
java.lang.NullPointerException
        at net.appjet.oui.AutoUpdateFile.update(files.scala:258)
        at net.appjet.oui.DiskLibrary.updateExecutable(files.scala:303)
        at net.appjet.oui.DiskLibrary.executable(files.scala:318)
        at net.appjet.oui.ScopeReuseManager$.preambleExecutable(servermodel.scala:73)
        at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:124)
        at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:122)
        at net.appjet.oui.NoninheritedDynamicVariable.withValue(dynamicvar.scala:38)
        at net.appjet.oui.ExecutionContextUtils$.withContext(execution.scala:328)
        at net.appjet.oui.ScopeReuseManager$.newRunner(servermodel.scala:122)
        at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:140)
        at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:137)
        at net.appjet.oui.ScopeReuseManager$.readLocked(servermodel.scala:85)
        at net.appjet.oui.ScopeReuseManager$.getRunner(servermodel.scala:137)
        at net.appjet.oui.execution$.runOutOfBand(execution.scala:600)
        at net.appjet.oui.main$.runOnStartup(main.scala:102)
        at net.appjet.oui.main$.main(main.scala:264)
        at net.appjet.oui.main.main(main.scala)
Comment by rowantho...@gmail.com, Dec 21, 2009

Thanks all for open-sourcing the code!

I just very briefly & superficially browsed the repos (so apologies if I'm about to make a stupid bug-report due to lack of understanding), and I noticed the file /trunk/etherpad/src/static/crossdomain.xml still has hardcoded "allow-access-from" exceptions for tokbox.com and etherpad.com Shouldn't these either be deleted (with a note added to the install instructions) or user-configurable to a local servername or FQDN..? As it is, this seems to open one helluva security-hole (unless I've misunderstood something during my brief glimpse..)

Comment by Christop...@gmail.com, Dec 21, 2009

Etherpad (of course) showing steps I took to install it on opensuse 11.1 http://etherpad.com/ep/pad/view/FZDxJunpw4/loR1Ir25N0

Comment by csw...@gmail.com, Dec 21, 2009

fastjar was killing me, at least on Fedora 12 -- for some reason, when running 'rebuildjar.sh', the instance of fastjar on my system was causing '$HG/etherpad/trunk/infrastructure/build/appjet.jar' to get removed.

Modified rebuildjar.sh to assure that fastjar was never run, opting to use 'jar' every time, and it build perfectly fine.

if [ -z "$JAR" ]; then 
    if [ ! -z `which fastjar` ]; then 
        JAR=jar 
    else    
        JAR=jar 
    fi
fi

(Obviously there is a better solution but this was the quick fix.)

Comment by jays...@gmail.com, Dec 21, 2009

I am having trouble starting the server with run-local.sh. I've manually tried logging in MySQL 5.0 manually in command line to verify that it works. Anyone else sees a "communications link error" ?

etherpad.fakeProduction -> false etherpad.isProduction -> false Using mysql database type. Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

at net.appjet.bodylock.InnerExecutable?.execute(bodylock.scala:
84)
at net.appjet.oui.execution$$anonfun$execute$4.apply
(execution.scala:502)
at net.appjet.oui.NoninheritedDynamicVariable?.withValue
(dynamicvar.scala:38)

Comment by deurbro...@gmail.com, Dec 21, 2009

Open Source EtherPad? works perfectly on CentOS 5.4. Thanks!

Comment by siegfrie...@web.de, Dec 22, 2009

Hi, tried it with opensuse 11.2 and failed: building javascript classfiles... org.mozilla.javascript.EvaluatorException?: syntax error (cache_utils.js#17) at org.mozilla.javascript.DefaultErrorReporter?.runtimeError(DefaultErrorReporter?.java:109) at org.mozilla.javascript.DefaultErrorReporter?.error(DefaultErrorReporter?.java:96) at org.mozilla.javascript.Parser.addError(Parser.java:146) at org.mozilla.javascript.Parser.reportError(Parser.java:160) at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2469) at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955) at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813) at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742) at org.mozilla.javascript.Parser.addExpr(Parser.java:1723) at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703) at org.mozilla.javascript.Parser.relExpr(Parser.java:1677) at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633) at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622) at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611) at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600) at org.mozilla.javascript.Parser.andExpr(Parser.java:1588) at org.mozilla.javascript.Parser.orExpr(Parser.java:1576) at org.mozilla.javascript.Parser.condExpr(Parser.java:1559) at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544) at org.mozilla.javascript.Parser.expr(Parser.java:1523) at org.mozilla.javascript.Parser.statementHelper(Parser.java:1246) at org.mozilla.javascript.Parser.statement(Parser.java:707) at org.mozilla.javascript.Parser.parse(Parser.java:401) at org.mozilla.javascript.Parser.parse(Parser.java:338) at org.mozilla.javascript.optimizer.ClassCompiler?.compileToClassFiles(ClassCompiler?.java:161) at net.appjet.bodylock.compilationutils$.compileToBytes(bodylock.scala:188) at net.appjet.bodylock.Compiler$.compileSingleFile(bodylock.scala:265) at net.appjet.bodylock.Compiler$$anonfun$main$2.apply(bodylock.scala:288) at net.appjet.bodylock.Compiler$$anonfun$main$2.apply(bodylock.scala:277) at scala.Iterator$class.foreach(Iterator.scala:414) at scala.runtime.BoxedArray?$AnyIterator?.foreach(BoxedArray?.scala:45) at scala.Iterable$class.foreach(Iterable.scala:256) at scala.runtime.BoxedArray?.foreach(BoxedArray?.scala:24) at net.appjet.bodylock.Compiler$.main(bodylock.scala:277) at net.appjet.bodylock.Compiler.main(bodylock.scala) at sun.reflect.NativeMethodAccessorImpl?.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl?.invoke(NativeMethodAccessorImpl?.java:57) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at scala.tools.nsc.ObjectRunner?$$anonfun$run$1.apply(ObjectRunner?.scala:75) at scala.tools.nsc.ObjectRunner?$.withContextClassLoader(ObjectRunner?.scala:49) at scala.tools.nsc.ObjectRunner?$.run(ObjectRunner?.scala:74) at scala.tools.nsc.MainGenericRunner?$.main(MainGenericRunner?.scala:154) at scala.tools.nsc.MainGenericRunner?.main(MainGenericRunner?.scala) which: no growlnotify in

Comment by emilyandbrian, Dec 22, 2009

@kitesurfer1404, are you still having the same problem? During the bin/rebuildjar.sh process, I am getting these errors:

java.net.ConnectException: Connection timed out
...connection attempt to server at port 55702 failed; re-trying...
java.net.ConnectException: Connection timed out
...connection attempt to server at port 55702 failed; re-trying...
java.net.ConnectException: Connection timed out
...connection attempt to server at port 35914 failed; re-trying...
java.net.ConnectException: Connection timed out
...connection attempt to server at port 35914 failed; re-trying...
java.net.ConnectException: Connection timed out
...connection attempt to server at port 35066 failed; re-trying...
java.net.ConnectException: Connection timed out
...connection attempt to server at port 35066 failed; re-trying...

(I'm on Ubuntu) I looked at the Scala code and found that it is trying to start a server, and then connect to it during the compile process. Go to /tmp and look for scala-compile-server-out.log, scala-compile-server-err.log, and the /tmp/scalac-compile-server-port directory. My err file has a message like this:

...starting server on socket 34260...

And the directory has a file in it named 34260 with the contents:

-1179277892

So either the Scala "server" is not starting up correctly, or the "client" is unable to connect to the "server" for some reason.

Not sure what to do past this point...

Comment by emilyandbrian, Dec 22, 2009

Follow up to my previous comment.

It appears the Scala server is listening, so maybe the "client" is having problems connecting for some reason? Here's an output from my netstat:

$ netstat -l | grep $(ls -1 /tmp/scalac-compile-server-port/)
tcp6       0      0 [::]:41515              [::]:*                  LISTEN

That doesn't quite look right though... Here's the netstat -a:

$ netstat -a | grep $(ls -1 /tmp/scalac-compile-server-port/)
tcp6       0      0 [::]:41515              [::]:*                  LISTEN     
tcp6       0      1 10.0.2.15%1346458:47171 myhost.com:41515 SYN_SENT

Not sure how to fix this...

Comment by emilyandbrian, Dec 22, 2009

Tried disabling IPv6 - same issue though - connection timed out. Here's the netstat output:

$ netstat -a | grep $(ls -1 /tmp/scalac-compile-server-port/)
tcp        0      0 *:57111                 *:*                     LISTEN     
tcp        0      1 myhost.com:41402 myhost.com:57111 SYN_SENT 
Comment by robfe...@gmail.com, Dec 22, 2009

thanks for the diffs Righteous. Could you also post your apache configuration?

Comment by riighteous, Dec 22, 2009

@robfelty

<VirtualHost *:80>
    ServerName pad.vytautas.jakutis.lt:80

    SetEnv proxy-sendchunks 1
    ProxyRequests Off
    <Proxy http://pad.vytautas.jakutis.lt>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://pad.vytautas.jakutis.lt:9000/
    ProxyPassReverse / http://pad.vytautas.jakutis.lt:9000/

    <IfModule mpm_peruser_module>
        ServerEnvironment apache apache
    </IfModule>
</VirtualHost>
Comment by robfe...@gmail.com, Dec 22, 2009

@Righteous,

Thanks so much! That did the trick for me. I think my main problem was that I didn't have a trailing slash in my ProxyPass? line.

Rob

Comment by johnym...@gmail.com, Dec 23, 2009

I put quite a lot of the fixes to the above problems on www.mclear.co.uk

Comment by siegfrie...@web.de, Dec 23, 2009

My errors disappeared as I changed openjdk to sun's jdk

Comment by ewoutter...@gmail.com, Dec 25, 2009

@riighteous

Your apache configuration didn't work for me: my backend has a different domain and all the URLs that etherpad generates are based on the request domain. I was able to get it working (so far, not tested a whole lot) by using the ProxyPreserveHost? directive of mod_proxy.

Comment by sol.eur...@gmail.com, Dec 29, 2009

I keep getting the following error:

using JAR jar... cp: missing destination file operand after `lib/' Try `cp --help' for more information.

I've tried going through all the above (including the links) but no go :( I'm running Ubuntu 9:10 64Bit version

Comment by cestum....@gmail.com, Dec 30, 2009

If any of you interested in running etherpad in Eclipse, here is the link.

http://www.cestum.org/?p=9

Comment by google...@alvar.a-blast.org, Dec 31, 2009

When compiling with the slower "scalac" compiler instea of "fsc" (fast Scala Compiler), it works for me (in a FreeBSD Jail). You can set the compiler in the CC environment variable.

So, when there are troubles in compiling, try to run:

CC=scalac bin/rebuildjar.sh

It's a one time run and not too long …

Comment by kai.kev....@gmail.com, Jan 2, 2010

... Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure ... when run "bin/run-local.sh",error occured,how to fix it...

Comment by ScottPur...@gmail.com, Jan 4, 2010

In addition to the environmental variables listed, the setup-mysql-db.sh script expects a value for $mysql.

And, if mysqld has a root password setup, the script must be modified with a "-p" at two points in order to cause it to prompt for a password.

Comment by SreeNh...@gmail.com, Jan 9, 2010

s

Comment by russell....@gmail.com, Jan 10, 2010

My setup goes on well and I can open it on my localhost browser, but I cannot open it in any other machine in the same intranet. Like http://192.168.2.7:9000 doens't get response, but in the server console, I can see the log. Any one can tell me how to fix it ?

Comment by ecwilso...@gmail.com, Jan 12, 2010

Any way to run this on a discount web host like bluehost or hostgator? Thanks in advance for indulging my newbness.

Comment by mozillal...@gmail.com, Jan 14, 2010

@ecwilsonaz from my quick look at what those hosts offer, my guess is no, at least not with their basic plans. You need a host that you can install your own tools (java, scala, mysql) on. Look at something like linode or slicehost if you want a cheap host like this.

Comment by jgr...@gmail.com, Jan 15, 2010

I get the following output upon running rebuildjar.sh:

$ bin/rebuildjar.sh using JAR jar... usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file

cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory

cp appears to be getting called incorrectly from within one of the other scripts that rebuildjar.sh calls.

I'm on a Mac running OS X 10.6. Can one of the other people who successfully got Etherpad running on OS X post detailed instructions for that platform?

Comment by philipp....@gmail.com, Jan 22, 2010

@Russel.LRG I had the same issue, and changed the following: Open ./src/etherpad/globals.js and add

- 'XXX.XXX.XXX.XXX': true
to var SUPERDOMAINS (XXX... being the ip-adress of the server). I found that in the "how to modify run-local to run as a server Options" discussion.

Comment by helgemorgenstern, Jan 24, 2010

@jgrall and all other OS X users: I have the same problem upon running rebuildjar on OS X 10.5 output: ... using JAR jar... usage etc... (see jgrall's comment) I don't have a clue how to solve this and would appreciate any help!

Comment by shyam.ramesh@gmail.com, Jan 27, 2010

Iam trying to build etherpad on CentOS5

I get the below message after running bin/rebuildjar.sh

CLEARING BUILD CACHE unzipping JARs... making cached JAR.... compiling... compiling with 'fsc'... compiling common... Note: net.appjet.common/util/HttpServletRequestFactory??.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: net.appjet.common/util/HttpServletRequestFactory??.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Unable to establish connection to compilation daemon Compilation failed. including etherpad JARs... unzipping JARs... updating... Error opening ../../build/appjet.jar for reading! ../../build/appjet.jar: No such file or directory done.

Can someone tell what this means?

Comment by sexxxena...@gmail.com, Jan 29, 2010

- Added JAVA_HOME and SCALA_HOME in PATH

- replaced /bin/bash by /usr/local/bin/bash in bin/ infrastructure/bin/

- fastjar installed but gave deflating (undocumented) errors => bin/rebuild_jar modifed to point directly to JAR=jar (the 'which' test does not return "" as expected. in OpenBSD, it returns "command not found")

- Doubled the brackets the all the 'if' test with multiple expressions (i.e. -> []) in bin/ infrastructure/bin/

- growl not installed => modified bin/rebuild_jar to use xmessage or echo (why install/use a GTK app just to say "compilation finished????")

- in infrastructure/cache, is used "cp -u -n" => -u and -n do not exist in OpenBSD => brutally removed

- in infrastructure/comp.sh, used java -target 1.5

- in bin/rebuild_jar: used /bin/ls instead of ls, because mine is aliased to ls -ahl which make rest of the script fuck up

- Employed the technic from Comment by mbreese, Dec 18, 2009 (If you're trying to get this running on a server with subdomains (foo.bar.example.com), you need to add your domain to the SUPERDOMAINS map in src/etherpad/globals.js)

Comment by helgemorgenstern, Feb 4, 2010

After solving all problems I finally got Etherpad running on my MacOSX Leopard and wrote a tutorial at http://www.blog.helgemorgenstern.de/en/2010/february/open-source-etherpad-macosx Feel free to leave comments: any feedback is welcome!

Comment by russell....@gmail.com, Feb 4, 2010

@philipp.kluge Thanks for your help. After adding 'xxx.xxx.xxx.xxx':true to global.js, it works perfect.

Comment by kai.ko...@gmail.com, Feb 13, 2010

I've been trying to get Etherpad up and running for some time now and finally have managed to compile and start it (thanks everyone in this thread for patches, ideas, pointers and general help) but now I'm stuck with an exception blowing up on my face when I try to access my Etherpad instance.

A snip of the exception (as it's rather long):

{{{You like apples? An error occurred in the error handler while handling an error. How do you like them apples? net.appjet.bodylock.JSRuntimeException: Error while executing: Not a file: /templates/framed/framedpage.ejs (module fileutils.js#31) at net.appjet.bodylock.InnerExecutable?.execute(bodylock.scala:84) at net.appjet.oui.execution$$anonfun$execute$4.apply(execution.scala:511) at net.appjet.oui.NoninheritedDynamicVariable?.withValue(dynamicvar.scala:38) at net.appjet.oui.ExecutionContextUtils?$.withContext(execution.scala:328) at net.appjet.oui.execution$.execute(execution.scala:498) at net.appjet.oui.execution$.execute(execution.scala:477) at net.appjet.oui.OuiServlet?.execute(execution.scala:407) at net.appjet.oui.OuiServlet?.doGet(execution.scala:354) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:707) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:820) at org.mortbay.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:502) at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:390) at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:765) at org.mortbay.jetty.handler.HandlerList?.handle(HandlerList?.java:49) at org.mortbay.jetty.handler.HandlerCollection?.handle(HandlerCollection?.java:114) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:536) at org.mortbay.jetty.HttpConnection?$RequestHandler?.headerComplete(HttpConnection?.java:913) at org.mortbay.jetty.HttpParser?.parseNext(HttpParser?.java:539) at org.mortbay.jetty.HttpParser?.parseAvailable(HttpParser?.java:212) at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:405) at org.mortbay.io.nio.SelectChannelEndPoint?.run(SelectChannelEndPoint?.java:409) at org.mortbay.thread.QueuedThreadPool?$PoolThread?.run(QueuedThreadPool?.java:582) Caused by: org.mozilla.javascript.JavaScriptException?: Not a file: /templates/framed/framedpage.ejs (module fileutils.js#31) at JS$module$fileutils$js$16.c1(module fileutils.js:31)

Comment by gouwsmei...@gmail.com, Mar 3, 2010

@kitesurfer1404 and @emilyandbrian Have you resolved your issue during compilation where you get the message ...connection attempt to server at port 46842 failed; re-trying... ??

I'm installing on an Ubuntu Gutsy box, everything is correctly set up (I set it up similarly on my Karmic Koala box - no problems).

Can anyone please help?

Comment by tehgor...@gmail.com, Mar 3, 2010

Okay, this took me way too long to figure out.

If you get this:

... Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure ...

Then you probably have TCP support disabled in your MySQL. Go edit your my.cnf and comment out the line that reads "skip-networking" and restart the MySQL server. Now it will work.

There's probably a way to get JDBC to talk to MySQL over a Unix socket, but this is the fastest way to get past the problem. Please note that your MySQL server will be listening on a network socket now, so make sure to check your security.

Comment by rjmaun...@gmail.com, Mar 8, 2010

For Ubuntu, depending on your network setup, you may need to follow adivce of google...@alvar.a-blast.org above:

So, when there are troubles in compiling, try to run:

CC=scalac bin/rebuildjar.sh

This fixed problems for me where the compile of 'common' would silently hang with :

Note: net.appjet.common/util/HttpServletRequestFactory?.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Comment by wadesign...@gmail.com, Mar 22, 2010

Hi all,

I have managed to compile etherpad, but when I try to run it I get the following exception:

etherpad.isProduction -> false
Startup execution failed with error.
java.lang.NullPointerException
        at net.appjet.oui.AutoUpdateFile.update(files.scala:258)
        at net.appjet.oui.DiskLibrary.updateExecutable(files.scala:303)
        at net.appjet.oui.DiskLibrary.executable(files.scala:318)
        at net.appjet.oui.ScopeReuseManager$.preambleExecutable(servermodel.scala:73)
        at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:124)
        at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:122)
        at net.appjet.oui.NoninheritedDynamicVariable.withValue(dynamicvar.scala:38)
        at net.appjet.oui.ExecutionContextUtils$.withContext(execution.scala:328)
        at net.appjet.oui.ScopeReuseManager$.newRunner(servermodel.scala:122)
        at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:140)
        at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:137)
        at net.appjet.oui.ScopeReuseManager$.readLocked(servermodel.scala:85)
        at net.appjet.oui.ScopeReuseManager$.getRunner(servermodel.scala:137)
        at net.appjet.oui.execution$.runOutOfBand(execution.scala:600)
        at net.appjet.oui.main$.runOnStartup(main.scala:102)
        at net.appjet.oui.main$.main(main.scala:264)
        at net.appjet.oui.main.main(main.scala)

Any idea in how to solve this issue?

Thanks in advance,

Cheers

Comment by gabito...@gmail.com, Mar 22, 2010

For all the ones getting this error.

"Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure"

I solve this issue! The problem in my case was in the /etc/hosts file. The loopback interface had an error. I just corrected: 127.0.0.1 localhost

I have test 2 configurations and both work: -mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) - mysql-connector-java-5.1.10

and

- mysql Ver 14.14 Distrib 5.1.44, for debian-linux-gnu (x86_64) - mysql-connector-java-5.1.12

netstat helped me to search the failure

Comment by wadesign...@gmail.com, Mar 23, 2010

Hi all,

I have solved the issue I was getting above:

java.lang.NullPointerException
        at net.appjet.oui.AutoUpdateFile.update(files.scala:258)
        at net.appjet.oui.DiskLibrary.updateExecutable(files.scala:303)
        at net.appjet.oui.DiskLibrary.executable(files.scala:318)

......

The problem ended up to be a path issue. I had installed "etherpad" under "/opt/etherpad", and the changes I had to make in the file etherpad.localdev-default.properties are as follows:

ajstdlibHome = ../infrastructure/framework-src/modules
modulePath = ./src
useVirtualFileRoot = ./src

to

ajstdlibHome = ../../infrastructure/framework-src/modules
modulePath = ../src
useVirtualFileRoot = ../src

So it was a matter of correcting the paths.

Cheers,

Comment by samialki...@gmail.com, Mar 27, 2010

Hello folks, anybody know why do i get this errors, i got File not Found - .java once i do the compiling part? anybody can tell me why ?

Comment by evaldas....@gmail.com, Apr 15, 2010

we have compiled and installed etherpad http://herculis.ktu.lt:9000. But after trying to access this page we get an errourneous link http://www.ktu.lt:9000/?setCookie=1&contUrl=http%3a%2f%2fherculis.ktu.lt%3a9000%2f where we are redirected to the subdomain www.ktu.lt and not herculis.ktu.lt.

Does anyone get this problem, or maybe can give a hint where to look for fixing it?

Comment by evaldas....@gmail.com, Apr 15, 2010

ok I found the solution, you need to go to src/etherpad/globals.js and put entry about your superdomain. This should be included in instructions

Comment by spongela...@gmail.com, Apr 22, 2010

More on the "identifier expected but '' found" problem, after upgrading scala from the deb files (comment dated Dec 19, 2009 by SirSunkist?), you'll likely need to kill the compilation daemon that may still be running.

Comment by faheemha...@gmail.com, Apr 23, 2010

Hi there,

I have followed the instruction to install etherpad on our Redhat linux server.

I have compiled it sucessfully but when I tried to start the server as below: ./bin/run-local.sh

It gave me the following error. I have scratched my head all the day and now it's over the experts to help me.

Using config file: ./data/etherpad.local.properties
Using mysql database type.
Startup execution failed with non-200 response: 500
net.appjet.bodylock.JSRuntimeException: Error while executing: Connections could not be acquired from the underlying database!
        at net.appjet.bodylock.InnerExecutable.execute(bodylock.scala:84)
        at net.appjet.oui.execution$$anonfun$execute$4.apply(execution.scala:502)
        at net.appjet.oui.NoninheritedDynamicVariable.withValue(dynamicvar.scala:38)
        at net.appjet.oui.ExecutionContextUtils$.withContext(execution.scala:328)
        at net.appjet.oui.execution$.execute(execution.scala:498)
        at net.appjet.oui.execution$.runOutOfBand(execution.scala:625)
        at net.appjet.oui.main$.runOnStartup(main.scala:102)
        at net.appjet.oui.main$.main(main.scala:264)
        at net.appjet.oui.main.main(main.scala)
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
        at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
        at net.appjet.ajstdlib.SQLBase.getConnectionFromPool(sqlbase.scala:73)
        at net.appjet.ajstdlib.SQLBase.withConnection(sqlbase.scala:89)
        at net.appjet.ajstdlib.SQLBase.<init>(sqlbase.scala:159)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:184)
        at org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:274)
        at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:193)
        at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2267)
        at JS$module$sqlbase$sqlcommon$js$13._c2(module sqlbase/sqlcommon.js:29)
        at JS$module$sqlbase$sqlcommon$js$13.call(module sqlbase/sqlcommon.js)
        at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
        at JS$module$main$js$8._c1(module main.js:78)
        at JS$module$main$js$8.call(module main.js)
        at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
        at JS$onstartup._c0(onstartup.js:18)
        at JS$onstartup.call(onstartup.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3004)
        at JS$onstartup.call(onstartup.js)
        at JS$onstartup.exec(onstartup.js)
        at net.appjet.bodylock.InnerExecutable$$anonfun$execute$1.apply(bodylock.scala:76)
        at net.appjet.bodylock.InnerExecutable$$anonfun$execute$1.apply(bodylock.scala:75)
        at net.appjet.bodylock.BodyLock$.runInContext(bodylock.scala:111)
        at net.appjet.bodylock.InnerExecutable.execute(bodylock.scala:75)
        ... 8 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
        at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
        at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
        at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
        ... 36 more

Thanks a lot, Hameed

Comment by faheemha...@gmail.com, Apr 25, 2010

Any help would be greatly appreciated.

Thanks a lot. Hameed

Comment by bon...@gmail.com, May 3, 2010

@faheemhameed313: try connecting with root user, comment out or delete ipv6 entries in /etc/hosts. if it works, give etherpad mysql user proper permissions for connecting trough mysql socket, or ie. change mysql hostname in etherpad config to machine ip.

Comment by faheemha...@gmail.com, May 3, 2010

Thanks bondos for your reply. I will give it a go and let you know if it worked.

Comment by faheemha...@gmail.com, May 3, 2010

Hi bondos,

I have tried your suggestion. I do not have any ipv6 in my /etc/hosts. I have used mysql root username/password in the etherpad config but still I get the same error. Do you think the issue is because of JDBC driver or something?

Thanks, Hameed

Comment by schmitt....@gmail.com, Jun 15, 2010

Hello, This is a quick howto I wrote to get Etherpad working with OpenJDK instead of Sun Java JDK on a Debian GNU/Linux Lenny (stable), and so, get an Etherpad that use only Free Software. The original howto can be found at : http://forge.bearstech.com/trac/wiki/EtherpadOpenJDK .

Etherpad building & installation (using OpenJDK instead of Sun Java JDK)

Done with Etherpad 1.0.1 on Debian GNU/Linux Lenny (stable) with

Scala 2.7.7 backported from Debian GNU/Linux Squeeze (testing).

Etherpad is a web-based collaborative real-time editor.

Get the Etherpad code from one of the sites above.

Install Scala, OpenJDK and the libmysql-java package. You will also need a MySQL server and the m4 macro processor.

On Debian Lenny (stable), the scala package needs to be backported from Squeeze (testing). http://packages.debian.org/scala

aptitude install scala openjdk-6-jdk libmysql-java mysql-server m4

According to the INSTALL recomandation, uninstall the gcj compiler and its libraries.

aptitude remove gcj '~nlibgcj'

Edit the file bin/build.sh and change the paths to match your system. Basicaly, just do a s/sun/openjdk/.

export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/" export SCALA_HOME="/usr/share/java" export SCALA_LIBRARY_JAR="/usr/share/java/scala-library.jar" export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java.jar" export JAVA="/usr/lib/jvm/java-6-openjdk/bin/java" export SCALA="/usr/bin/scala" export PATH="/usr/lib/jvm/java-6-openjdk/bin:$PATH"

Use the following workaround to fix the bug with Rhino. http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179

export JAVA_OPTS="-Xbootclasspath/p:lib/rhino-js-1.7r1.jar"

Then launch the build : ./bin/build.sh.

Edit the file bin/run.sh and change the paths to match your system. Here also a s/sun/openjdk/ is enough.

export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/" export SCALA_HOME=/usr/share/java export MYSQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar export JAVA="/usr/lib/jvm/java-6-openjdk/bin/java" export SCALA="/usr/bin/scala" export PATH="/usr/lib/jvm/java-6-openjdk/bin:$PATH"

Use the same workaround for Rhino and add the path of the Scala library.

export JAVA_OPTS="-Xbootclasspath/p:../infrastructure/lib/rhino- js-1.7r1.jar:/usr/share/java/scala-library.jar"

Edit etherpad/bin/run-local.sh to set a coherent value for the memory usage, for example MXRAM="256m".

Create a MySQL database etherpad, a database user etherpad and grant him all the privileges on his base. You will need a mysql-client and the commands will look like this :

CREATE DATABASE etherpad; GRANT ALL privileges ON etherpad. TO "etherpad"@"localhost" IDENTIFIED BY 'password';

or

CREATE DATABASE etherpad; CREATE user "etherpad"@"localhost"; SET PASSWORD FOR 'etherpad'@'localhost' = PASSWORD('password') ; GRANT ALL ON etherpad. TO "etherpad"@"localhost";

Copy etherpad/etc/etherpad.localdev-default.properties to etherpad/etc/ etherpad.local.properties and edit it to fit your needs. It contains the settings and the passwords for etherpad.

Run the ./bin/run.sh.

You can write a /etc/init.d/etherpad or edit the exemple in debian/ etherpad.init. Don't forget to execute update-rc.d etherpad defaults 99.

Comment by iles.m...@gmail.com, Sep 20, 2010

Can somebody make a virtual appliance and put it up on vmware site??

Thanks,

Matt

Comment by windows7...@hotmail.com, Dec 15, 2010

Thank you for another great weblog.In which else could I get this kind of tips composed in such an incite full way? I've a project that I am just now doing work on, and i am certain this will support me a lot..and I have been searching for such facts because from few days....Thanks!!!!! http://www.windows7productkey.net/

Comment by rauhm...@gmail.com, Feb 26, 2011

Hello, Why are you using growlnotify, if it is for the MAC???

Comment by d3vl...@gmail.com, Oct 19, 2011

how resource heavy is this fully installed on a win platform?


Sign in to add a comment
Powered by Google Project Hosting