Donate Share

Butterfly XML Editor

Tracker: Bugs

5 Linux 2.4 Java 1.3 & 1.4 run time error - ID: 919630
Last Update: Comment added ( simon_brooke )

The following error was experienced when running
butterflyXMLEditor1.0.Beta with Java 1.3 or Java 1.4:

[root@BH6 Butterfly]# ./run.sh
Exception in thread "main" java.lang.NoSuchFieldError: java.awt.
Color: field BLACK not found
at butterfly.xmlview.test.Main.main(Main.java:125)

schiavone@acm.org


Gene Schiavone ( genes2003 ) - 2004-03-19 16:43

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )




Date: 2007-08-17 09:27
Sender: simon_brooke


If you'd like to assign this bug (and any other Linux specific bugs) to
me, I'll produce a patch.


Date: 2007-08-17 09:25
Sender: simon_brooke


I think this is probably that Butterfly looks for resources relative to
the CWD, not to its own home directory. Suppose Butterfly is installed in

/home/simon/tmp/butterfly1.1

(which it currently is on my machine)

and the CWD is

/home/simon/workspace/mapping-generator

and you run

$BUTTERFLY_HOME/run.sh dbdef2hibernate-mapping.xsl

(which is what I just did) butterfly fails with

simon@apu:~/workspace/mapping-generator$ java.io.FileNotFoundException:
/home/simon/workspace/mapping-generator/butterfly.conf (No such file or
directory)

Having suggested this is the problem, I don't have a quick cure. I've
personally altered run.sh on my machine to

/----
#!/bin/sh

if [ "$BUTTERFLY_HOME" = "" ]
then
BUTTERFLY_HOME=/home/simon/tmp/butterfly1.1
fi

for lib in butterfly.jar lib/jlz.jar lib/xml-apis.jar
lib/avalon-excalibur.jar \
lib/avalon-framework.jar lib/commons-collections-1.0.jar
lib/commons-JXPath.jar \
lib/commons-logging-1.0.jar lib/log4j.jar lib/logkit.jar lib/xep.jar
lib/xerces.jar \
lib/fop.jar lib/batik.jar lib/xalan.jar
do
CLASSPATH=$CLASSPATH:$BUTTERFLY_HOME/$lib
done

java -Djava.endorsed.dirs="$BUTTERFLY_HOME/lib/endorsed" -classpath
$CLASSPATH \
butterfly.xmlview.test.Main go
\----

This doesn't solve the problem, because Butterfly continues to look for
its own resources relative to the CWD. What's needed (may actually be
there, I haven't investigated in enough depth) is a command line arg to
specify to Butterfly where it should look for resources e.g.

java -Djava.endorsed.dirs="lib/endorsed" -classpath $CLASSPATH
butterfly.xmlview
.test.Main -butterfly-home $BUTTERFLY_HOME go

Like the artwork, BTW. Definitely adds personality - a sense that this is
a real person's product and not some anonymous corporate production.



Date: 2004-03-31 03:13
Sender: jcwonline

Logged In: YES
user_id=1010037

I'm on a Windows2K box and had the same error. I removed
Java 1.3 and installed Java 1.4 and the error was resolved.


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.