xuggler give me such error please help me what i do? - xuggler

2013-06-21 07:25:59,162 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-xuggler; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem
Exception in thread "main" java.lang.UnsatisfiedLinkError: no xuggle-xuggler 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.xuggle.ferry.JNILibraryLoader.loadLibrary0(JNILibraryLoader.java:265)
at com.xuggle.ferry.JNILibraryLoader.loadLibrary(JNILibraryLoader.java:168)
at com.xuggle.xuggler.XugglerJNI.(XugglerJNI.java:19)
at com.xuggle.xuggler.IContainer.(IContainer.java:1457)
at com.xuggle.mediatool.MediaReader.(MediaReader.java:137)
at com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
at com.xuggle.xuggler.demo.GetContainerinfo.main(GetContainerinfo.java:22)

This problem occurs for Library Dependency. I solved this problem by adding jars sequentially as bellow:
1) commons-cli-1.1.jar
2) commons-lang-2.1.jar
3) logback-classic-1.0.0.jar
4) logback-core-1.0.0.jar
5) slf4j-api-1.6.4.jar
6) xuggle-xuggler-5.4.jar

There's a list of reasons that could cause this on the Xuggler FAQ, these seem to be the main causes I think.
This error can occur if you are using the 32 bit version of Xuggler with a 64 bit Java JVM, or if you are using the 64 bit version of Xuggler with a 32 bit Java JVM.
It can also occur if you are using Xuggler without having it installed, which i see you're using Xuggler version 3 in that stack trace, and the no-install build of Xuggler started with version 5.3, so that's another possibility.
It could ALSO occur if you don't have your environment variables set up correctly.
You can also take a look at the FAQ if none of those are the problem in your case.

Related

Getting an Illegal Argument Exception/Runtime Exception when using Jetty in Eclipse

I know this might be difficult to answer, but I have tried everything and cannot get a solution. I am trying to create a web project in Java for the first time, using Eclipse and Jetty and JSF, and everything works well until I introduce a Java class. I write in HTMl/XHTML and run the programs, but when I add a Java class - even with nothing in the class, I get the following exceptions:
java.lang.RuntimeException: Error scanning file C:\Users\****\eclipse-workspace\donationFinder\target\classes\com\testingClass\Test.class
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:783)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:876)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:165)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:552)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by:
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:986)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:777)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:876)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:165)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:552)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.base/java.lang.Thread.run(Thread.java:835)
Does anyone know what might be causing this? Thanks in advance.
The version of asm you are using is too old for your JVM runtime.
For Jetty 9.4.x you should be using (at least) asm-7.1.jar if you want to scan bytecode produced for Java 8 thru Java 13.
Use asm-7.2.jar if you want to scan bytecode produced for Java 8 thru 14.
Use asm-7.3.1.jar if you want to scan bytecode produced for Java 8 thru 15.
See prior answer for details.
https://stackoverflow.com/a/26496604/775715

maven-scr-plugin fails with SCRDescriptorException "unable to scan files ... Class file format probably not supported by ASM ?"

Using the following dependencies (amongst others, the bundle is supposed to be installed to AEM 6.1)
runtime is java8
maven-scr-plugin 1.15.0
org.apache.felix.scr.annotations: 1.9.8
org.apache.felix.scr.ds-annotations: 1.2.8
I get this exception
Caused by: org.apache.felix.scrplugin.SCRDescriptorException: Unable to scan class files: ...
(Class file format probably not supported by ASM ?)
at org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:219)
at org.apache.felix.scrplugin.helper.ClassScanner.process(ClassScanner.java:161)
at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:146)
at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:146)
at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:221)
... 22 more
Caused by: java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.(Unknown Source)
at org.objectweb.asm.ClassReader.(Unknown Source)
at org.objectweb.asm.ClassReader.(Unknown Source)
at org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:201)
The class in question does not contain any osgi annotations at all, but is merely imported in some other #Component annotated classes.
Did anyone encounter this and found a solution?
I ran into this issue today. This happens when you are running maven-scr-plugin with scanClasses=true option. Older versions of maven-scr-plugin cannot scan classfile generated by java8. you will have to either switch to a newer version of scr plugin (I upgraded to 1.22) or set you maven-compiler-plugin target config to 1.7
I found out that my Felix SCR Annotation Processor plugin that I installed to my Intellij as a prerequisite to using the aem-ide-tooling-4-intellij from headwirecom is causing the issue. It was working for quite a while until today suddenly giving me an issue in running my unit tests (needless to say, there were no changes made in my java, mvn versions or in my IDE).
This forced me to update my java version, intellij version but didn't fix the issue. But disabled the SCR annotation plugin fixed it.
As you can see, this plugin is really old (2014). I hope they will release a newer version soon.

Klocwork plugin failed to run in eclipse with error "java.lang.UnsatisfiedLinkError: no sqlite_jni in java.library.path"

I just installed Klocwork plugin for Eclipse. But when I start to scan a project, it gives me the following error:
java.lang.UnsatisfiedLinkError: no sqlite_jni 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.klocwork.desktopdb.SqliteJniLoader.initDefaultLibraries(SqliteJniLoader.java:28)
at com.klocwork.desktopdb.SqliteAgent.<clinit>(SqliteAgent.java:21)
at com.klocwork.desktopdb.migration.MigrateDesktopDb.<init>(MigrateDesktopDb.java:48)
at com.klocwork.desktopdb.migration.MigrateDesktopDb.migrate(MigrateDesktopDb.java:44)
at com.klocwork.desktopdb.KwlpProblemsStorageUtil.migrateOrCreateStorage(KwlpProblemsStorageUtil.java:32)
at com.klocwork.kwcheck.commands.AbstractCommand.convertToDB(AbstractCommand.java:82)
at com.klocwork.kwcheck.commands.BuildCommand.execute(BuildCommand.java:110)
at com.klocwork.util.CommandLineParser2.parse(CommandLineParser2.java:360)
at com.klocwork.kwcheck.KwCheckMain.main(KwCheckMain.java:22)
kwcheck: WARNING: Exception occured in java application
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true -Djava.library.path=".;C:\Program Files (x86)\myLib\win32"
Exception in thread "main"
I found several threads with similar issues:
http://thelogofthewook.blogspot.de/2011/12/updating-problems-myproject-no.html
https://developer.klocwork.com/community/forums/klocwork-general/user-tools/eclipse-plugin-error
They all mentioned some 32bit/64bit issue. But I am using 32bit Eclipse + 32bit JVM.
And as I checked, there are 2 different sqlite_jni.dll files existing in the plugin's lib and lib64 folders respectively. So I guess no file is missing.
So what could be wrong?
Currently, I am trying to troubleshoot it in the following ways:
Figure out how a plugin locates its native libraries.
How to configure java.library.path for a plugin.
A little patience pays off...
I read carefully the error message and it clearly says:
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
-Djava.library.path=".;C:\Program Files (x86)\myLib\win32"
So I suddenly recall that I once set a environmental variable like this:
_JAVA_OPTIONS = -Djava.net.preferIPv4Stack=true -Djava.library.path=".;C:\Program Files (x86)\myLib\win32"
After I changed it to below, things begin to work.
_JAVA_OPTIONS = -Djava.net.preferIPv4Stack=true
And some background reference:
http://examples.javacodegeeks.com/java-basics/java-library-path-what-is-it-and-how-to-use/

facing issue with GWT designer mode

I'm working with Eclipse Helios 3.6 (32-bit). I installed the GWT plug-in and created a new Web application. In the Client folder I was trying to open a file with GWT designer, but unfortunately I was getting an error:
Internal Error encountered unexpected internal error. This could be caused by a bug or by a misconfiguration issue, conflict, partial update, etc.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
Stack trace:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.loadImpl
(HostedModeSupport.java:110)
at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.<init>
(HostedModeSupport.java:83)
at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupportFactory.create
(HostedModeSupportFactory.java:32)
at com.google.gdt.eclipse.designer.model.widgets.support.GwtState.getHostedModeSupport
(GwtState... (missing part here)
...org.eclipse.wb.internal.core.editor.errors.ExceptionComposite$3.widgetSelected
(ExceptionComposite.java:129)
--- etc
I have JavaCompiler in project properties 1.6 and from preferences->java->installed JDK/JRE using 1.6.
I am not sure of the specifics but most likely you are trying to run the designer with JDK 1.5. That is the cause of that error. I would recheck everything.
Also off the top of my head I would verify 32 bit versus 64 bit java sdk.
Generally when anything is wrong in JavaCompiler Project properties it will throw error of major/minor version 51.0 . So here most probably by checking the java version installed in the system and the version through which you are working are differnet. Make both of them compatible and the error will be solved.

Working IntelliJ Scala Plugin Tutorial?

I'm having some trouble getting the scala plugin to work with IntelliJ IDEA 10.5.1 Community Edition on Mac OSX 10.6.8. I'm following these instructions but whenever I try to run the simple HelloWorld application, I get this error:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Didea.launcher.port=7533 -Didea.launcher.bin.path=/Applications/IntelliJ IDEA 10 CE.app/bin -Dfile.encoding=UTF-8 -classpath /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/deploy.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/dt.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/javaws.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jconsole.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/management-agent.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/plugin.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/sa-jdi.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/alt-rt.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/alt-string.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/charsets.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/classes.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Users/A482930/IdeaProjects/ScalaPractice/out/production/ScalaPractice:/Users/A482930/scala/lib/scala-library.jar:/Users/A482930/scala/lib/scala-swing.jar:/Users/A482930/scala/lib/scala-dbc.jar:/Applications/IntelliJ IDEA 10 CE.app/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain HelloWorld
Exception in thread "main" java.lang.ClassNotFoundException: HelloWorld
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
Process finished with exit code 1
I checked the module settings and the compiler library seems to be set up correctly. The version of scala I'm using is the 2.9.0.1 with the IzPack Installer. I've tried both the IDEA plugin listed under available plugins as well as the July 5 2011 nightly here.
Rather then helping me troubleshoot my specific issue, does anyone know of a step by step tutorial that actually works without issues for a configuration similar to mine? I'm ok with using older versions of scala and even IDEA as long as they work.
I'm not sure you still need help with this, but I just ran a simple example with Scala 2.9.0.1 and it worked. I've been having tons of issues with the plugin though, so I guess it would help to know the exact steps you followed.
In my case, I did this:
Created Project
Added Scala Facet in the Project Wizard and added the Scala libs as a global lib (there are a few issues with this, but it should work here)
Create your HelloWorld example
Create a new Scala Compilation Server Runner. Add the Classpath of your project
Run the project
A colleague of mine created this some months ago, after having some issues getting started:
https://github.com/runeflobakk/sbt-idea-scalatest
Guess it is more SBT focused, but maybe you can find some use in it anyway?