PDA

View Full Version : Workbench don't start up on linux



jemarroyo
01-17-2008, 07:32 AM
I'm using ubuntu and when I try to start up the workbench I get the folowing error:
jorge@batmen:/opt/pentaho/workbench$ ./workbench.sh
bash: ./workbench.sh: /bin/sh^M: bad interpreter: No such file or directory

And when I try to load the jar I get the following error:
jorge@batmen:/opt/pentaho/workbench$ java -jar lib/workbench.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at mondrian.gui.Workbench.<clinit>(Workbench.java:71)

jemarroyo
01-17-2008, 08:44 AM
Following this link http://www.jroller.com/jcraze/entry/dipping_my_toe_in_data
I found the workbench.sh that realy work. Is this and you have to make a driver directory and place there your db drivers.

workbench.sh
#!/bin/sh

# mondrian jars
CP="lib/commons-dbcp.jar:lib/commons-collections.jar:lib/commons-pool.jar"
CP=$CP:"lib/eigenbase-properties.jar:lib/eigenbase-resgen.jar:lib/eigenbase-xom.jar"
CP=$CP:"lib/javacup.jar:lib/log4j-1.2.12.jar:lib/mondrian.jar"
CP=$CP:"lib/jlfgr-1_0.jar:lib/jmi.jar:lib/mof.jar:lib/commons-math-1.0.jar"
CP=$CP:"lib/commons-vfs.jar:lib/commons-logging.jar"

# Workbench GUI code and resources

CP=$CP:"lib/workbench.jar"

# local directory is ~/.schemaWorkbench

if test ! -d ~/.schemaWorkbench; then
mkdir ~/.schemaWorkbench
fi

# copy mondrian.properties and log4j.xml if necessary

if test ! -e ~/.schemaWorkbench/mondrian.properties; then
cp mondrian.properties ~/.schemaWorkbench/mondrian.properties
fi

if test ! -e ~/.schemaWorkbench/log4j.xml; then
cp log4j.xml ~/.schemaWorkbench/log4j.xml
fi

CP=$CP:~/.schemaWorkbench


# or
# set the log4j.properties system property
# "-Dlog4j.properties=path to <.properties or .xml file>"
# in the java command below to adjust workbench logging

# add all needed JDBC drivers to the classpath

for i in `ls drivers/*.jar`; do
CP=$CP:$i
done

echo $CP

java -Xms100m -Xmx500m -cp "$CP" -Dlog4j.configuration=file:$HOME/.schemaWorkbench/log4j.xml mondrian.gui.Workbench

crafter
02-19-2008, 06:21 PM
Your file is bad. Try not copying it from a dos partition.

You should be able to clear your control M characters using an editor / I use vi - its painless.