Skip to main content

get rid of "Could not find mediaLib accelerator wrapper classes"

5 replies [Last post]
darwinjob
Offline
Joined: 2004-11-16

Hi
How can I get rid of the exception "Could not find mediaLib accelerator wrapper classes.Continuing in pure Java mode."? I use Java (no native acceleration) jai-1_1_3-lib.zip on purpose. So I know that there are no wrapper classes and it should be that way. Is there any way to suppress the exception or should I catch it manually?

Error: Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode.
Occurs in: com.sun.media.jai.mlib.MediaLibAccessor
java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image
at com.sun.media.jai.mlib.MediaLibAccessor$1.run(MediaLibAccessor.java:248)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.media.jai.mlib.MediaLibAccessor.setUseMlib(MediaLibAccessor.java:245)
at com.sun.media.jai.mlib.MediaLibAccessor.useMlib(MediaLibAccessor.java:177)
at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:357)
at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:315)
at com.sun.media.jai.mlib.MlibScaleRIF.create(MlibScaleRIF.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:799)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
at javax.media.jai.JAI.createNS(JAI.java:1099)
at javax.media.jai.JAI.create(JAI.java:973)
at javax.media.jai.JAI.create(JAI.java:1395)
at ResampleFast.main(ResampleFast.java:57)

Best regards
Dmitri Darine

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chess4u
Offline
Joined: 2008-03-28

include the following in your code:

/**
* this gets rid of exception for not using native acceleration
*/
static
{
System.setProperty("com.sun.media.jai.disableMediaLib", "true");
}

sallu
Offline
Joined: 2012-12-16

Thank you so much dude for telling this.. this error also eats my brain a
lot ..but now its fixed . :D

could you please tell me that why you add this statement specifically
in static block ? and what it will do exactly to avoid error ?

thanks !

bpb
Offline
Joined: 2004-06-23

Not a bad idea: simple and direct.

Thanks,

Brian

> include the following in your code:
>
> /**
> * this gets rid of exception for not using native
> acceleration
> */
> static
> {
>
> ystem.setProperty("com.sun.media.jai.disableMediaLib",
> "true");
> }

Brian Burkhalter

Set a

http://download.java.net/media/jai/javadoc/1.1.3/jai-apidocs/javax/media...

on the default instance of JAI using

http://download.java.net/media/jai/javadoc/1.1.3/jai-apidocs/javax/media/jai/JAI.html#setImagingListener(javax.media.jai.util.ImagingListener)

On Fri, 8 Jun 2007, jai-interest@javadesktop.org wrote:

> Hi
> How can I get rid of the exception "Could not find mediaLib accelerator wrapper classes.Continuing in pure Java mode."? I use Java (no native acceleration) jai-1_1_3-lib.zip on purpose. So I know that there are no wrapper classes and it should be that way. Is there any way to suppress the exception or should I catch it manually?
>
>
> Error: Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode.
> Occurs in: com.sun.media.jai.mlib.MediaLibAccessor
> java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image
> at com.sun.media.jai.mlib.MediaLibAccessor$1.run(MediaLibAccessor.java:248)
> at java.security.AccessController.doPrivileged(Native Method)
> at com.sun.media.jai.mlib.MediaLibAccessor.setUseMlib(MediaLibAccessor.java:245)
> at com.sun.media.jai.mlib.MediaLibAccessor.useMlib(MediaLibAccessor.java:177)
> at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:357)
> at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:315)
> at com.sun.media.jai.mlib.MlibScaleRIF.create(MlibScaleRIF.java:67)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
> at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
> at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
> at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
> at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
> at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
> at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
> at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:799)
> at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
> at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
> at javax.media.jai.JAI.createNS(JAI.java:1099)
> at javax.media.jai.JAI.create(JAI.java:973)
> at javax.media.jai.JAI.create(JAI.java:1395)
> at ResampleFast.main(ResampleFast.java:57)
>
> Best regards
> Dmitri Darine
> [Message sent by forum member 'darwinjob' (darwinjob)]
>
> http://forums.java.net/jive/thread.jspa?messageID=221209
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>

----------------
Brian Burkhalter
Java Media, Imaging, and Graphics
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

jxc
Offline
Joined: 2005-02-24

http://download.java.net/media/jai/builds/release/1_1_3/INSTALL.html#dis...

For example,

java -Dcom.sun.media.jai.disableMediaLib=true YourApp