i want to develop a Java-Application with Guido. It should read MusicXML and
display and play the Notes...
For the beginning i tried to get the guidoviewer.java running.
i put the libmusicxml2.dll, jniGUIDOEngine.dll and GUIDOEngine.dll into the
project-folder in Eclipse and added the guidoengine.jar to the build path.
i get the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
guidoengine.guidopageformat.GetDefault()V
at guidoengine.guidopageformat.GetDefault(Native Method)
at guidoengine.guidopageformat.<init>(guidopageformat.java:70)
at guidoviewerGUI.<init>(guidoviewer.java:243)
at guidoviewer.main(guidoviewer.java:40)
Can anyone help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
It works on my side but I don't use eclipse.
Can you check the following:
- open a terminal (command prompt or msys)
- cd to your GuidoJava-v.1.21 folder
- compile the viewer: javac guidoviewer.java
make sure you have a copy of the GUIDOEngine.dll in the GuidoJava-v.1.21
folder
- and run the viewer: java guidoviewer
do you still have the problem ?
Dominique
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-10-12
same exception...
i tested in a fresh installed VM with Windows XP SP3 and JDK 7
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
strange...
I can force the exception if I remove the GUIDOEngine.dll. Thus everything
looks like there is a problem with loading native dlls. Could it be an
architecture issue: do you run a 64 bits JVM ? Otherwise can you check the
GUIDOEngine.dll version ?
--
Dominique
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
but I have new issues when creating a project with netbeans ;)
I copied jniGUIDOEngine.dll and GUIDOEngine.dll into my project folder
Where java looks for the native dll may depend on your dev environment.
What are you using as IDE ? Actually, I don't use any, I'm using makefiles (but that's because I don't have to manage a large set of source files).
If you put the dll with the system dll, java will probably find them, but that's not very clean :-(
Have you tried to launch your application from the command line (from the project folder)?
--
Dominique
Can you try to run the sample guidoviewer that is included in the guidojava1.21 distribution?
It runs correctly on my side. If it does for you too, it means that the problem is linked to your environment.
Otherwise, check that your are using the pair of dlls that are included in the distribution. Don't mix different versions, that could result in link error and I don't know if java can detect them for indirect dependancies.
--
Dominique
Le 14 nov. 2012 à 20:32, lbenedix a écrit :
i followed a tutorial for another .dll-Lib and Netbeans. I should put the dlls into my project folder. when i remove the two dlls i get the following warning:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no jniGUIDOEngine in java.library.path
when the files are in the project-root the following:
it looks like to work with 1.20
with 1.21 and according to the 'ls' output, the GUIDOEngine.dll is missing
that's the reason of the 'UnsatisfiedLinkError'
When I add this line to the guidoviewer.java before loading the jniGuidoEngine it seems to work:
System.loadLibrary("GUIDOEngine");
BUT:
when i try to open a guidofile it crashes:
GUIDOEngine version 1.4.9 - JNI interface version 1.2.1 initialized.
Execution protection violation
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000, pid=8004, tid=1436
#
# JRE version: 7.0_09-b05
# Java VM: Java HotSpot(TM) Client VM (23.5-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C 0x00000000
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# Z:\lbenedix\workspace\foo\hs_err_pid8004.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Last edit: lbenedix 2012-11-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But only on Windows. On Mac OS i still get the Exception, that it can't find the lib.
Can you tell me, what files i need on mac os and where to save them?
But only on Windows. On Mac OS i still get the Exception, that it can't find the lib.
Can you tell me, what files i need on mac os?
you need to copy the GUIDOEngine.framework into /Library/Frameworks (see readme.txt)
but before that and due to a kind of packaging bug, you should open the 'GUIDOEngine.framework/Versions' folder and rename the 'C' folder to 'B'.
The problem is identified for a couple of days https://sourceforge.net/p/guidolib/bugs/17/
It is now corrected (meaning you can also download the new GuidoJava-v.1.21.zip from sourceforge)
--
Dominique
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no GUIDOEngine in java.library.path
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: guidoengine.guidoscore.ParseFile(Ljava/lang/String;)I
at guidoengine.guidoscore.ParseFile(Native Method)
at GUI.scorePanel.setGMN(guidoviewer.java:79)
at GUI.guidoviewerGUI.setGMNFile(guidoviewer.java:290)
at GUI.guidoviewerGUI$OpenAction.actionPerformed(guidoviewer.java:316)
at java.awt.MenuItem.processActionEvent(MenuItem.java:650)
at java.awt.MenuItem.processEvent(MenuItem.java:609)
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/guidolib/discussion/233476/
I re-downloaded the corrected files and put them where the readme says (GUIDOEngine.framework into /Library/Frameworks and libjniGUIDOEngine.dylib into /usr/local/lib, but also tried /usr/lib). Still I get the error:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no GUIDOEngine in java.library.path
I re-downloaded the corrected files and put them where the readme says (GUIDOEngine.framework into /Library/Frameworks and libjniGUIDOEngine.dylib into /usr/local/lib, but also tried /usr/lib). Still I get the error:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no GUIDOEngine in java.library.path
here is the value of java.library.path:
/Users/me/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
I have a similar java.library.path on my computer but it works.
Actually I think java resolves direct dependencies but indirect dependencies are solved by the system.
You can check how the libjniGUIDOEngine.dylib expects to find the framework using:
otool -L libjniGUIDOEngine.dylib
and you should get the list of dependencies
Could give more information when reporting a problem:
- did you run the application from the command line?
- could you send all the error messages (and not the first line only)
- are you running java 32 or 64 bits?
Johannes-Rechner:lib johannes$ otool -L libjniGUIDOEngine.dylib
libjniGUIDOEngine.dylib:
libjniGUIDOEngine.dylib (compatibility version 0.0.0, current version 1.21.0)
/Library/Frameworks/GUIDOEngine.framework/Versions/B/GUIDOEngine (compatibility version 1.0.0, current version 1.49.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 34.0.0)
Johannes-Rechner:GuidoTest johannes$ java -jar guidoviewer.jar
JVM Bit size: 64
/Users/johannes/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no GUIDOEngine in java.library.path
Johannes-Rechner:GuidoTest johannes$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
do you have the problem running from the command line? (I guess so)
did you tried to put the framework somewhere in the java library path?
Le 19 nov. 2012 à 18:22, lbenedix a écrit :
here:
Johannes-Rechner:lib johannes$ otool -L libjniGUIDOEngine.dylib
libjniGUIDOEngine.dylib:
libjniGUIDOEngine.dylib (compatibility version 0.0.0, current version 1.21.0)
/Library/Frameworks/GUIDOEngine.framework/Versions/B/GUIDOEngine (compatibility version 1.0.0, current version 1.49.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 34.0.0)
Johannes-Rechner:GuidoTest johannes$ java -jar guidoviewer.jar
JVM Bit size: 64
/Users/johannes/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no GUIDOEngine in java.library.path
Johannes-Rechner:GuidoTest johannes$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/guidolib/discussion/233476/
It won't work either from command line or directly. I tried putting the GUIDOEngine.framework into each of these folders (/Users/johannes/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java) as well as into the folder where the guidoviewer.jar resides. Still no luck with OS X Lion (1.7.3) and Java 7. I also tried it with another Mac using Snow Leopard and Java 7, but again the same UnsatisfiedLinkError
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I confess that I have no idea at this stage.
The only hypothesis that comes to my mind is a small discrepancy in the framework: the 'Current' alias is broken.
I'll make the correction but you can check yourself with the appropriate link :
ln -sf B Current
from the GUIDOEngine.framework/Versions folder
Otherwise I'm using java version 1.6 on this station (I have to check on the other computer) but anyway, that shouldn't make a difference.
Are you running java in 32 or 64 bits mode?
--
Dominique
Le 22 nov. 2012 à 14:27, lbenedix a écrit :
It won't work either from command line or directly. I tried putting the GUIDOEngine.framework into each of these folders (/Users/johannes/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java) as well as into the folder where the guidoviewer.jar resides. Still no luck with OS X Lion (1.7.3) and Java 7. I also tried it with another Mac using Snow Leopard and Java 7, but again the same UnsatisfiedLinkError
Is there any chance you could check this with a different Mac on your end? I have done the ln -sf B Current, then tried it with Java 7, with Java 6 and with Java 6 in 64bit and 32bit (with 32/64 compiled versions of the viewer). No luck at all, sadly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any chance you could check this with a different Mac on your end? I have done the ln -sf B Current, then tried it with Java 7, with Java 6 and with Java 6 in 64bit and 32bit (with 32/64 compiled versions of the viewer). No luck at all, sadly.
I'll check with another mac. Another idea concerning the problem: could you have another instance of the GUIDOEngine.framework installed somewhere and that java could try to load first?
Otherwise, the best would be to be able to access your computer : do you have a fixed IP ? could you create a new account for me just to test?
If the answer is yes, send me an email directly to fober@grame.fr with the access information.
Hi,
i want to develop a Java-Application with Guido. It should read MusicXML and
display and play the Notes...
For the beginning i tried to get the guidoviewer.java running.
i put the libmusicxml2.dll, jniGUIDOEngine.dll and GUIDOEngine.dll into the
project-folder in Eclipse and added the guidoengine.jar to the build path.
i get the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
guidoengine.guidopageformat.GetDefault()V
at guidoengine.guidopageformat.GetDefault(Native Method)
at guidoengine.guidopageformat.<init>(guidopageformat.java:70)
at guidoviewerGUI.<init>(guidoviewer.java:243)
at guidoviewer.main(guidoviewer.java:40)
Can anyone help me?
Hi,
It works on my side but I don't use eclipse.
Can you check the following:
- open a terminal (command prompt or msys)
- cd to your GuidoJava-v.1.21 folder
- compile the viewer: javac guidoviewer.java
make sure you have a copy of the GUIDOEngine.dll in the GuidoJava-v.1.21
folder
- and run the viewer: java guidoviewer
do you still have the problem ?
Dominique
same exception...
i tested in a fresh installed VM with Windows XP SP3 and JDK 7
strange...
I can force the exception if I remove the GUIDOEngine.dll. Thus everything
looks like there is a problem with loading native dlls. Could it be an
architecture issue: do you run a 64 bits JVM ? Otherwise can you check the
GUIDOEngine.dll version ?
--
Dominique
I got it to work in the VM.
but I have new issues when creating a project with netbeans ;)
I copied jniGUIDOEngine.dll and GUIDOEngine.dll into my project folder
run:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: Z:\lbenedix\workspace\foo\jniGUIDOEngine.dll: Can't find dependent libraries
Le 13 nov. 2012 à 16:05, lbenedix a écrit :
i followed a tutorial for another .dll-Lib and Netbeans. I should put the dlls into my project folder.
when i remove the two dlls i get the following warning:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no jniGUIDOEngine in java.library.path
when the files are in the project-root the following:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: Z:\lbenedix\workspace\foo\jniGUIDOEngine.dll: Can't find dependent libraries
so i think it gets the lib but there is some error in it.
btw: i use the 1.20 because the 1.21 does not work when running the guidoviewer from shell.
Last edit: lbenedix 2012-11-14
Can you try to run the sample guidoviewer that is included in the guidojava1.21 distribution?
It runs correctly on my side. If it does for you too, it means that the problem is linked to your environment.
Otherwise, check that your are using the pair of dlls that are included in the distribution. Don't mix different versions, that could result in link error and I don't know if java can detect them for indirect dependancies.
--
Dominique
Le 14 nov. 2012 à 20:32, lbenedix a écrit :
here is what happens with 1.20 and 1.21
http://lb.bombenlabor.de/dev/guido121.PNG
http://lb.bombenlabor.de/dev/guido120.PNG
I copied both dlls from 1.20 zipfile into my netbeans-Project
Last edit: lbenedix 2012-11-15
it looks like to work with 1.20
with 1.21 and according to the 'ls' output, the GUIDOEngine.dll is missing
that's the reason of the 'UnsatisfiedLinkError'
Le 15 nov. 2012 à 15:02, lbenedix a écrit :
okay... with the GUIDOEngine.dll from guidolib-1.49-devkit-win32.zip I get the 1.21 to run from the shell.
Now back to the Netbeans-IDE:
I loaded the guidoengine.jar to my project and imported the guidoviewer.java.
Without the dlls in the projectfolder I get the following Error:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no jniGUIDOEngine in java.library.path
When I copy the two .dlls from the 1.21 folder (what worked from shell) I get the following Error:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: Z:\lbenedix\workspace\foo\jniGUIDOEngine.dll: Can't find dependent libraries
Last edit: lbenedix 2012-11-16
When I add this line to the guidoviewer.java before loading the jniGuidoEngine it seems to work:
System.loadLibrary("GUIDOEngine");
BUT:
when i try to open a guidofile it crashes:
Last edit: lbenedix 2012-11-16
with 1.20 the jvm is not crashing, but it also doesn't work:
http://lb.bombenlabor.de/dev/netbeans_guido120.PNG
Last edit: lbenedix 2012-11-16
I got it to Work! YAY!!!
But only on Windows. On Mac OS i still get the Exception, that it can't find the lib.
Can you tell me, what files i need on mac os and where to save them?
Last edit: lbenedix 2012-11-16
Le 16 nov. 2012 à 16:06, lbenedix a écrit :
you need to copy the GUIDOEngine.framework into /Library/Frameworks (see readme.txt)
but before that and due to a kind of packaging bug, you should open the 'GUIDOEngine.framework/Versions' folder and rename the 'C' folder to 'B'.
The problem is identified for a couple of days https://sourceforge.net/p/guidolib/bugs/17/
It is now corrected (meaning you can also download the new GuidoJava-v.1.21.zip from sourceforge)
--
Dominique
I re-downloaded the corrected files and put them where the readme says (GUIDOEngine.framework into /Library/Frameworks and libjniGUIDOEngine.dylib into /usr/local/lib, but also tried /usr/lib). Still I get the error:
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no GUIDOEngine in java.library.path
here is the value of java.library.path:
Le 17 nov. 2012 à 16:18, lbenedix a écrit :
here:
.
Last edit: lbenedix 2012-11-19
do you have the problem running from the command line? (I guess so)
did you tried to put the framework somewhere in the java library path?
Le 19 nov. 2012 à 18:22, lbenedix a écrit :
It won't work either from command line or directly. I tried putting the GUIDOEngine.framework into each of these folders (/Users/johannes/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java) as well as into the folder where the guidoviewer.jar resides. Still no luck with OS X Lion (1.7.3) and Java 7. I also tried it with another Mac using Snow Leopard and Java 7, but again the same UnsatisfiedLinkError
I confess that I have no idea at this stage.
The only hypothesis that comes to my mind is a small discrepancy in the framework: the 'Current' alias is broken.
I'll make the correction but you can check yourself with the appropriate link :
Le 22 nov. 2012 à 14:27, lbenedix a écrit :
Is there any chance you could check this with a different Mac on your end? I have done the ln -sf B Current, then tried it with Java 7, with Java 6 and with Java 6 in 64bit and 32bit (with 32/64 compiled versions of the viewer). No luck at all, sadly.
Le 24 nov. 2012 à 22:31, lbenedix a écrit :