die: command not found
Closed this issue · 6 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Download svn trunk of the project
2.
3.
What is the expected output? What do you see instead?
I expect an error message, informing me that SAXON env vars are not set. but
instead get:
./xspec.sh: line 57: die: command not found
./xspec.sh: line 74: die: command not found
Creating Test Stylesheet...
Exception in thread "main" java.lang.NoClassDefFoundError:
net/sf/saxon/Transform
Caused by: java.lang.ClassNotFoundException: net.sf.saxon.Transform
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: net.sf.saxon.Transform. Program will exit.
*** Error compiling the test suite
What version of the product are you using? On what operating system?
svn trunk
Please provide any additional information below.
Original issue reported on code.google.com by sbs....@gmail.com
on 17 Sep 2010 at 2:25
Attachments:
GoogleCodeExporter commented
Thanks for reporting this, Bernhard. Actually, that's exactly what the script
tries to do on line 57, by calling the function 'die', but it says it does not
find it. I can find two reasons for that:
1/ the function definition must be before its first usage; that's not what I am
used to with my Bash, but I imagine it could be the case with some variant.
Could you try to move it from lines 99-103 (from "die() {" to "}") to before
its first use (like right after the first comments at the top of the file)?
2/ you are not using Bash. In that case you could try to call it explicitly
(by typing something like "bash xspec.sh") and see if that solves the problem.
I think anyway we'd best avoid the dependence on Bash and make the necessary
changes to be POSIX sh-compliant.
Any info on this last point more than welcome :-)
Original comment by fgeorges
on 17 Sep 2010 at 7:16
GoogleCodeExporter commented
Original comment by fgeorges
on 17 Sep 2010 at 7:16
- Changed state: Accepted
- Added labels: Milestone-Release0.3
GoogleCodeExporter commented
Well, actually I was able to reproduce the problem after all. I moved the
function declarations at the top of the file, in revision 188. Thanks!
Original comment by fgeorges
on 17 Sep 2010 at 7:45
- Changed state: Fixed
GoogleCodeExporter commented
I forgot, please let me know if that solves your problem, so I can flag the
issue as verified.
Original comment by fgeorges
on 17 Sep 2010 at 7:45
GoogleCodeExporter commented
It does solve the problem to move the die function up. That's what I had
submitted in my patch, too (see the patch I attached when I opened the issue).
Original comment by sbs....@gmail.com
on 21 Sep 2010 at 12:55
GoogleCodeExporter commented
He he right, I hadn't see you patch (I still have to get used to the Google
Code interface, but after a while it starts to prove rather efficient).
Thanks for your help!
Original comment by fgeorges
on 21 Sep 2010 at 1:21
- Changed state: Verified