Skip to content

Release from v2.047 for ODEUM

Compare
Choose a tag to compare
@dkapoor dkapoor released this 16 Aug 19:52
· 438 commits to master since this release

Karma Tomcat Installation

  1. Install JDK 1.7 and set JAVA_HOME environment variable to point to it. Add JAVA_HOME/bin to your PATH environment variable.
  2. Install Tomcat 7.
  3. Setting Tomcat

a. If tomcat is running, shut it down.
b. Make sure unpackWars is set to true in conf/server.xml

      <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true">

c. Remove the ROOT Tomcat webapp

  cd apache-tomcat-7.0.55/webapps
  rm –rf ROOT

d. Copy all war files from the Release's Downloads to the tomcat webapps folder

cp karmaRelease/*.war apache-tomcat-7.0.55/webapps
4. You would need to increase the amount of memory allocated to karma. To do so, change CATALINA_OPTS to use memory greater than Xmx1024m.
Example:

 export CATALINA_OPTS="$CATALINA_OPTS -Xms2048m" 
 export CATALINA_OPTS="$CATALINA_OPTS -Xmx4096m"
  1. Start tomcat
cd apache-tomcat-7.0.55/bin
/startup.sh

Karma will now be available on port 8080: http://localhost:8080

Troubleshooting

  1. Tomcat cannot start. Port 8080 is already in use

    Change the port in apache-tomcat-7.0.55/conf/server.xml. Search for 8080 and replace it with a different port, say 8888

 <Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" />
  1. I get java.lang.ClassNotFoundException: com.mysql.jdbc.Driver when I load a table from MySQL

    Copy the mysql-connector-java-xx.jar to apache-tomcat-7.0.55/lib folder and restart tomcat

Karma Batch Mode

Follow instructions on the wiki for working with karma in batch mode once you have created the karma models - https://github.com/usc-isi-i2/Web-Karma/wiki/Batch-Mode
For using it in a closed environment, instead of the commands that use maven on the wiki

mvn exec:java -Dexec.mainClass="edu.isi.karma.rdf.OfflineRdfGenerator" -Dexec.args="
--sourcetype <sourcetype> \
--filepath <filepath> \
--modelfilepath <modelfilepath> \
--sourcename <sourcename> \
--outputfile <outputfile>" -Dexec.classpathScope=compile

Use the version below that uses the karma-offline JAR instead

java -cp karma-offline-0.0.1-SNAPSHOT-shaded.jar edu.isi.karma.rdf.OfflineRdfGenerator \
--sourcetype <sourcetype> \
--filepath <filepath> \
--modelfilepath <modelfilepath> \
--sourcename <sourcename> \
--outputfile <outputfile>