Tuesday, 15 March 2011

windows 7 - Unable to load Xuggle library: java.lang.UnsatisfiedLinkError -



windows 7 - Unable to load Xuggle library: java.lang.UnsatisfiedLinkError -

i'm designing java web applet stream video via rtsp video server. in order render video, xuggler 5.4 library (xuggle-xuggler.jar) used. currently, video rendered when run on windows xp , ubuntu 10.04 machines. when seek run on windows 7, however, next error:

10:10:13.370 [thread-13] warn com.xuggle.ferry.jnilibrary - failure: library load of library: xuggle; url: c:\users\justin\appdata\local\temp\xuggle\xuggle8376027568348573783.dll; error: java.lang.unsatisfiedlinkerror: c:\users\justin\appdata\local\temp\xuggle\xuggle8376027568348573783.dll: can't find dependent libraries 10:10:13.448 [thread-13] error com.xuggle.ferry.jnilibraryloader - not load library: xuggle; version: 5; visit http://www.xuggle.com/xuggler/faq/ find mutual solutions problem exception in thread "thread-13" java.lang.unsatisfiedlinkerror: no xuggle in java.library.path @ java.lang.classloader.loadlibrary(unknown source) @ java.lang.runtime.loadlibrary0(unknown source) @ java.lang.system.loadlibrary(unknown source) @ com.xuggle.ferry.jnilibraryloader.loadlibrary0(jnilibraryloader.java:268) @ com.xuggle.ferry.jnilibraryloader.loadlibrary(jnilibraryloader.java:171) @ com.xuggle.ferry.jnilibrary.load(jnilibrary.java:161) @ com.xuggle.ferry.ferryjni.<clinit>(ferryjni.java:16) @ com.xuggle.ferry.ferry.<clinit>(ferry.java:25) @ com.xuggle.xuggler.xugglerjni.<clinit>(xugglerjni.java:19) @ com.xuggle.xuggler.icodec$id.<clinit>(icodec.java:760) @ com.ioindustries.videoserver.rtpsession.run(rtpsession.java:86) @ java.lang.thread.run(unknown source)

i've tried extracting xuggle-5.dll , placing in web directory, linking windows %path% , windows %classpath%, video still not render when , error disappears (at point, i'm not sure happening). i've tried running xuggle-5.dll through dependency walker, although error ieshim.dll shown in screenshot below:

of course, same error ieshim.dll occurs when run on windows xp , on ubuntu 10.04 machines.

i have xuggle-xuggler.jar file referenced in under html document used launch web applet.

at point, i'm not sure why xuggler fails run on windows 7 (32-bit) machine specifically, utilize development. help on matter appreciated.

as note, trying run gpl version of xuggle 5.4 (which should not require installation unlike previous versions of xuggle) available on xuggle website.

here snippet of html document:

<div id="applet_box" class="applet box"> <applet id="applet" code="com.videoserver.clientapplet" archive="videoserverclient.jar, xuggle-xuggler-5.4.jar, slf4j-api-1.6.4.jar, logback-classic-1.0.0.jar, logback-core-1.0.0.jar" mayscript> </applet> </div>

my coworker figured out why java.lang.unsatisfiedlinkerrorwas occurring, credit goes him (i simply observer).

refer first line of error log above:

10:10:13.370 [thread-13] warn com.xuggle.ferry.jnilibrary - failure: library load of library: xuggle; url: c:\users\justin\appdata\local\temp\xuggle\xuggle8376027568348573783.dll; error: java.lang.unsatisfiedlinkerror: c:\users\justin\appdata\local\temp\xuggle\xuggle8376027568348573783.dll: can't find dependent libraries

basically, happening in case java runtime environment had cached re-create of xuggle dll file, came old xuggle jar archive had used experiment java applet video output 2 months ago. able arrive @ conclusion given fact dll file referenced in temporary directory (c:\users\justin\appdata\local\temp\xuggle\xuggle8376027568348573783.dll) had different dependencies in comparing recent xuggle dll file extracted recent xuggle-xuggler-5.4.jar when verified through dependency walker application above.

as result, when tried display video in java web applet, java runtime environment seek access aged xuggle dll file instead of loading dll file within xuggle-xuggler-5.4.jar. hence, above java.lang.unsatisfiedlinkerror occurred.

in order forcefulness java runtime environment load dll file within dll file within xuggle-xuggler-5.4.jar, next steps executed:

open java command panel. in windows, done going start menu , accessing command panel. if java runtime environment installed, java should appear alternative in windows command panel. click java.

once in java command panel, under general tab, under temporary net files, click settings... button.

uncheck checkbox says, "keep temporary files on computer."

then click delete files button , delete temporary files (select checkboxes). depending on preferences are, may want select subset of these checkboxes, although selected them all.

click ok. click ok again. click ok 3rd time close java command panel.

close web browser if open , seek relaunch java web applet. if issue having, java.lang.unsatisfiedlinkerror should no longer occur , video should displayed assuming code right , have right xuggle jars, xuggle's dependencies, loaded. in case, web applet jar placed in same directory html file used embed in web browser, along required xuggle jars , xuggle dependency jars.

it should noted java runtime environment in ubuntu has java command panel looks similar 1 in windows , similar steps can executed resolve issue in ubuntu if problem ever arises.

the above solution should work if opening html file straight in web browser. if using apache tomcat or glassfish deploy web applet, may not work - in case, may want refer solution, although haven't tested thoroughly myself:

http://wiki.xuggle.com/frequently_asked_questions#i_get_an_.22unsatisfiedlinkerror.22_when_i_run_xuggler-based_applications_in_tomcat

java windows-7 applet japplet xuggle

No comments:

Post a Comment