Closed GoogleCodeExporter closed 9 years ago
Hi
The reason is because there are missing jars on the classpath: js.jar and
js-engine.jar (maybe more I didn't get further yet)
(FYI the javax.net.ScriptEngineManager searches for service providers such as
js-engine.jar - in the current distribution of Umlet there are none).
I solved it by building it myself
* cd <somedir>
* svn co https://svn.java.net/svn/scripting~svn/trunk/
* cd trunk/engines/javascript/make
* ant
=> creates a js-engine.jar in trunk/engines/javascript/build folder
* cp trunk/engines/javascript/build/js-engine.jar $UMLET_HOME/lib/
=> where $UMLET_HOME is just the location of your Umlet folder (it should
contain a lib folder inside)
* cp trunk/engines/javascript/lib/js.jar $UMLET_HOME/lib/
=> need to copy both jars to the place where you have Umlet installed
* open umlet.jar and edit the META-INF/MANIFEST.MF
** Update - at the bottom - the Class-Path by adding lib/js.jar
lib/js-engine.jar
* rerun the umlet executable
Regards
Original comment by dieter.v...@gmail.com
on 9 Jan 2012 at 1:22
I'm also affected by this. Any chance of fixing this by including those jars by
default?
Original comment by johnpatc...@googlemail.com
on 31 Jan 2012 at 8:32
Dieter Vekeman and John Patcher, could you please tell me your OS and Java
version?
We have not detected any error under Windows 7 (Java 6 or 7).
I've tried to include those 2 libraries into the classpath (as described by
Dieter), but then I get the following error popup at startup:
org.mozilla.javascript.EcmaError: ReferenceError: "javax" is not defined.
(<Inknown source>#3) in <Unknown source> at line number 3
The program still starts as usual, but the error will appear everytime I
restart the program.
If I only add "js.jar" it works, but the "js-engine.jar" causes the error.
Original comment by AFDiaX
on 12 Feb 2012 at 10:30
Hi
CentOS release 5.5
Linux 2.6.18-194.26.1.el5.centos.plus x86_64 x86_64 x86_64 GNU/Linux
java version "1.6.0_17"
OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
Original comment by dieter.v...@gmail.com
on 13 Feb 2012 at 8:34
I am having the same problem and Dieter's workaround did not fix it
unfortunately. I am pasting below the information you may find useful
$ java -cp /usr/share/java/js.jar:/usr/share/java/js-engine.jar -jar
/usr/share/umlet/umlet.jar
lut 20, 2012 11:46:25 AM jsyntaxpane.DefaultSyntaxKit loadConfig
INFO: unable to load configuration for: class com.umlet.gui.UmletSyntaxKit
from: com/umlet/gui/UmletSyntaxKit/config.properties
1 | ERROR | com.baselet.gui.StartUpHelpText - ""
java.io.FileNotFoundException: /usr/share/umlet/html/startuphelp.html (Brak
dostępu)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
at java.io.FileWriter.<init>(FileWriter.java:90)
at com.baselet.gui.StartUpHelpText.replaceSystemspecificMetakey(StartUpHelpText.java:112)
at com.baselet.gui.StartUpHelpText.showHTML(StartUpHelpText.java:88)
at com.baselet.gui.StartUpHelpText.<init>(StartUpHelpText.java:52)
at com.baselet.diagram.DrawPanel.<init>(DrawPanel.java:54)
at com.baselet.diagram.DiagramHandler.<init>(DiagramHandler.java:52)
at com.baselet.diagram.CustomPreviewHandler.<init>(CustomPreviewHandler.java:10)
at com.umlet.custom.CustomElementHandler.<init>(CustomElementHandler.java:41)
at com.baselet.gui.standalone.StandaloneGUI.init(StandaloneGUI.java:334)
at com.baselet.gui.BaseGUI.initGUI(BaseGUI.java:62)
at com.baselet.control.Main.init(Main.java:119)
at com.baselet.control.Main.main(Main.java:107)
51 | ERROR | com.baselet.control.Main - "Initialization or uncaught outer Exception"
java.lang.NullPointerException
at jsyntaxpane.actions.ScriptAction.getScriptFromURL(ScriptAction.java:89)
at jsyntaxpane.actions.ScriptAction.config(ScriptAction.java:76)
at jsyntaxpane.DefaultSyntaxKit.addActions(DefaultSyntaxKit.java:373)
at jsyntaxpane.DefaultSyntaxKit.install(DefaultSyntaxKit.java:337)
at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:1055)
at javax.swing.JEditorPane.setContentType(JEditorPane.java:979)
at com.umlet.gui.CustomCodeSyntaxPane.initJSyntaxPane(CustomCodeSyntaxPane.java:40)
at com.umlet.custom.CustomElementHandler.<init>(CustomElementHandler.java:48)
at com.baselet.gui.standalone.StandaloneGUI.init(StandaloneGUI.java:334)
at com.baselet.gui.BaseGUI.initGUI(BaseGUI.java:62)
at com.baselet.control.Main.init(Main.java:119)
at com.baselet.control.Main.main(Main.java:107)
$ ls -l /usr/share/umlet/html/startuphelp.html
-rwxr-xr-x 1 root root 921 02-20 11:47 /usr/share/umlet/html/startuphelp.html
$ java -version
java version "1.7.0_03-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.1) (ArchLinux build 7.b147_2.1-1-x86_64)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
Original comment by tomasz....@gmail.com
on 20 Feb 2012 at 10:52
[deleted comment]
@AFDiaX: I tried running it with sudo. The error with startuphelp.html did not
appear, but the latter part did and umlet failed not start.
But thanks for sharing this information. I will pass it to the umlet packager
in Arch Linux, because now the default installation sets r-x permissions for
the non-root user.
Original comment by tomasz....@gmail.com
on 20 Feb 2012 at 11:57
@tomasz.zok: Your problem is a different one.
UMLet needs write access to the file "<umletdir>/html/startuphelp.html" (it
replaces some characters (which are OS dependend) in the file at every startup).
I have opened Issue 72 and already fixed the bug you mentioned.
Please check if it works if you have write permission to the startuphelp.html
file, so that I can delete these 2 comments which are unrelated to Issue 69
Thanks for reporting the "bad design" in this case ;)
Original comment by AFDiaX
on 20 Feb 2012 at 12:02
Please try to unzip it to a directory where you have full access to every file
in the umlet dir, to make sure it's not an issue which is related to the
read/write permissions
(the error message chearly indicated that the java FileWriter has no access to
the file, so it should not be an umlet specific error)
Original comment by AFDiaX
on 20 Feb 2012 at 12:04
I have now imported the project to Eclipse and added the js.jar and
js-engine.jar to the classpath - the problem persists.
The js.jar comes from Mozilla's Rhino project (http://www.mozilla.org/rhino/),
the js-engine.jar is an archive I built using Dieter's suggestion.
For me it looks like this line from jsyntaxpane.actions.ScriptAction is
returning null:
engine = (new ScriptEngineManager()).getEngineByExtension("js");
Original comment by tomasz....@gmail.com
on 20 Feb 2012 at 1:18
I have not found a fix for the second bug at the moment. It's a third party
library and I have no experience with the js*.jars
@tomasz.zok: Does it work if you add those 2 libraries to the build path?
Original comment by AFDiaX
on 20 Feb 2012 at 2:38
Yes, it works! When I add it to the build path, I can run umlet.
Original comment by tomasz....@gmail.com
on 20 Feb 2012 at 2:58
I had this exact problem using IcedTea 1.7 -- evidently it does not include
some libs that are included with the Oracle 7 JRE, which I have installed on
the same (linux) system. Running with the default icedtea generates this
error, but running with (my alternate) oracle java it works fine.
Original comment by halfcoun...@gmail.com
on 11 Jun 2012 at 3:04
Original comment by umlet.bu...@gmail.com
on 13 Aug 2012 at 2:24
We hope that this problem will be solved by IcedTea or JSyntaxPanel, but at the
moment we cannot offer another solution.
Original comment by AFDiaX
on 13 Aug 2012 at 2:49
We have switched from JSyntaxPane to RSyntaxTextArea for several reasons.
So UMLet v12 should fix this problem.
Original comment by AFDiaX
on 2 Sep 2012 at 6:19
Issue 111 has been merged into this issue.
Original comment by AFDiaX
on 14 Feb 2013 at 10:58
Issue 112 has been merged into this issue.
Original comment by AFDiaX
on 14 Feb 2013 at 10:58
Original issue reported on code.google.com by
legacypr...@gmail.com
on 30 Dec 2011 at 12:15