Hunspell UnsatisfiedLinkError

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Hunspell UnsatisfiedLinkError

Post by Denis »

Hi,

we are using Eclipse Oxygen Author in version 15.2.

If I want to use the hunspell spell checker I get the following error:

Code: Select all


6:02:06,374 0 ERROR [ main ] ro.sync.azcheck.ui.spellcontrol.hunspell.d - The hunspell library or dictionary could not be loaded, due to java.lang.UnsatisfiedLinkError: jnidispatch (/com/sun/jna/win32-x86/jnidispatch.dll) not found in resource path
java.lang.UnsatisfiedLinkError: jnidispatch (/com/sun/jna/win32-x86/jnidispatch.dll) not found in resource path
at com.sun.jna.Native.loadNativeLibraryFromJar(Unknown Source)
at com.sun.jna.Native.loadNativeLibrary(Unknown Source)
at com.sun.jna.Native.<clinit>(Unknown Source)
at ro.sync.azcheck.ui.spellcontrol.hunspell.c.<init>(Unknown Source)
at ro.sync.azcheck.ui.spellcontrol.hunspell.c.e(Unknown Source)
at ro.sync.azcheck.ui.spellcontrol.hunspell.d$_c.<init>(Unknown Source)
at ro.sync.azcheck.ui.spellcontrol.hunspell.d.eb(Unknown Source)
at ro.sync.azcheck.ui.spellcontrol.f.p(Unknown Source)
at ro.sync.azcheck.ui.n.w(Unknown Source)
at ro.sync.azcheck.ui.n.o(Unknown Source)
at ro.sync.azcheck.ui.n.qb(Unknown Source)
at ro.sync.azcheck.ui.n.ib(Unknown Source)
at ro.sync.azcheck.ui.n.m(Unknown Source)
at ro.sync.azcheck.ui.m.<init>(Unknown Source)
at com.oxygenxml.b.b.f.<init>(Unknown Source)
at com.oxygenxml.editor.editors.OxygenBaseEditor.createPartControl(Unknown Source)
at com.oxygenxml.editor.editors.e.e.createPartControl(Unknown Source)
I figured out that the jnidispatch.dll is not in the jna.jar file. I have tried to use another jna.jar, which contains the jnidispatch.dll the error do not occur and I can use the spell checker.

Best regards
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Re: Hunspell UnsatisfiedLinkError

Post by Denis »

Additional information:
I used the jna 3.4.1 from http://www.java2s.com/Code/Jar/j/Downloadjna341jar.htm

Is there another solution to fix the issue?
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Hunspell UnsatisfiedLinkError

Post by adrian »

Hi,

We are not aware of such an issue with the Hunspell library in Eclipse.

What version, distribution (Classic, JavaEE, etc) and architecture (32/64) of Eclipse are you using?
Do you have other Eclipse plugins installed that use JNA?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Re: Hunspell UnsatisfiedLinkError

Post by Denis »

Hi,

version: 3.6
JavaSE
architekture: 32

We do not use JNA in another plugin.
Is there a way to configure the classpath?
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Hunspell UnsatisfiedLinkError

Post by adrian »

Hi,

Please look in Eclipse in menu > Help > About Eclipse and tell me the name (first row), version and build id of Eclipse that you are using.

Did you install Oxygen via the Eclipse update site, or did you use the .ZIP distribution?

Check if you have the .dll in question in the correct location from your Eclipse/Oxygen plugin installation:
- if installed from the update site:

Code: Select all

Eclipse\plugins\com.oxygenxml.author_15.2.0.v2014040317\lib\com\sun\jna\win32-x86\jnidispatch.dll
- if dropins/ZIP distribution is used:

Code: Select all

Eclipse\dropins\oxygenxml.author_15.2\plugins\com.oxygenxml.author_15.2.0.v2014040317\lib\com\sun\jna\win32-x86\jnidispatch.dll
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Re: Hunspell UnsatisfiedLinkError

Post by Denis »

Hi,

I have Oxygen added as dependency in a eclipse application.

I am develop on Luna Service Release 1 (4.4.1) Build id: 20140925-1800
a 3.6 eclipse application.
The file is in this location:

Code: Select all

Application\plugins\com.oxygenxml.author_15.2.0.v2014012017\lib\com\sun\jna\win32-x86\jnidispatch.dll
Regards
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Hunspell UnsatisfiedLinkError

Post by adrian »

Hi,

By what means do you pick the dependency for your Eclipse application? Where in your Eclipse project are you configuring this?

I should also point out that v15.2 does not officially support Eclipse 4.4 (Luna), but that's another story.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Re: Hunspell UnsatisfiedLinkError

Post by Denis »

I saw you use the jna version 3.4.0. I have take a look at this jar here. There is the jnidispatch.dll in the jar included.
I assume that you extract the file from the jna.jar and put it into your lib folder.

Now I would to like know:
  • Why you extract these files from the jar?
  • Can I configure the classpath? In the manifest or somewhere else to get the hunspell functionality.
  • Can I include the extracted folders and files back to the jar to get the hunspell functionality?
Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Hunspell UnsatisfiedLinkError

Post by Radu »

Just to update the post, in Denis' Oxygen plugin in the "Manifest.mf" the Bundle-ClassPath: key was missing a reference to the lib/ folder.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply