General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Exception in thread "main" java.lang.UnsatisfiedLinkError: no SQJNILib in java.l
-
Sailesh May 5, 2010 at 6:11 pm
Exception in thread "main" java.lang.UnsatisfiedLinkError: no SQJNILib in java.l
May 5, 2010 at 6:11 pmParticipants 1Replies 2Last Activity 12 years, 10 months agoI am using SQJavaAPI.jar to run the below Java code to accept all changes in an XML document edited using XMetal.
I am working with Java application (JDK version 1.4) which I am using to control XMetal Author (Version#: 5.5.0.221)Code
___________________________________________________import com.sq.types.SQVariant;
import com.sq.xmetal.api.Application;
import com.sq.xmetal.api.Documents;
import com.sq.xmetal.api._Document;public class AcceptAllXmetalChanges {
public static void main(String[] args) throws Exception {
Application xmetal = new Application();
xmetal.setVisible(false);
Documents docs = xmetal.getDocuments();
_Document doc = docs.Open(“/EDITED_XML_WITH_TRACK_CHANGES_ON.xml”);
doc.AcceptAllChanges();
SQVariant sqV = new SQVariant(“/XML_WITH_ALL_CHANGES_ACCEPTED.xml”);
doc.SaveAs(sqV);
System.out.println(“All change accepted”);
}
}
___________________________________________________I am getting the following error message:
___________________________________________________Exception in thread “main” java.lang.UnsatisfiedLinkError: no SQJNILib in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.sq.types.SQDispatch.(SQDispatch.java:18)
___________________________________________________Regards,
SaileshSailesh May 5, 2010 at 6:33 pm
Reply to: Exception in thread "main" java.lang.UnsatisfiedLinkError: no SQJNILib in java.l
May 5, 2010 at 6:33 pmOne correction: The above code is working fine when run from desktop. I am getting the error message when I am running this code in Linux server.
Derek Read May 5, 2010 at 10:19 pm
Reply to: Exception in thread "main" java.lang.UnsatisfiedLinkError: no SQJNILib in java.l
May 5, 2010 at 10:19 pmWe're not sure how you could be running Java code on a Linux server that would be controlling XMetaL Author. Even if is somehow possible to get XMetaL Author running on Linux (perhaps using WINE?) we are unable to help with this issue as we do not test our products on platforms except those specified in the install-readme.html file that comes with each version. For XMetaL Author Essential 5.5 and XMetaL Author Enterprise 5.5 the versions of Windows supported include Windows XP and Vista (only). Following is from the install-readme.html for 5.5:
System requirements
* Microsoft Windows XP or Vista
* Pentium 133 MHz processor
* 256 MB of available RAM (512 MB recommended)
* VGA display, 640 x 480 resolution or higher
* Minimum 300 MB of disk space (400 MB recommended)
* Microsoft Internet Explorer, version 6.00.2600.0000 or laterThe only thing we can guess is that your Java code is running on Linux but trying to control XMetaL Author installed on a separate Windows machine, perhaps attempting to use DCOM or something? We do not test this and do not support it so you are on your own in this case as well. If DCOM is involved you may need to create a wrapper of some kind to enable SQJavaAPI.jar to work with it or find some other solution.
-
AuthorPosts
- You must be logged in to reply to this topic.