android on ubuntu 14.04 - java

I followed this link to get android running on my Ubuntu 14.04
but when I ran android and I got this on my terminal
Exception in thread "main" java.lang.NoClassDefFoundError:
com/android/utils/ILogger at
java.lang.Class.getDeclaredMethods0(Native Method) at
java.lang.Class.privateGetDeclaredMethods(Class.java:2625) at
java.lang.Class.getMethod0(Class.java:2866) at
java.lang.Class.getMethod(Class.java:1676) at
sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) at
sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at
java.net.URLClassLoader$1.run(URLClassLoader.java:355) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:354) at
java.lang.ClassLoader.loadClass(ClassLoader.java:425) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at
java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 6 more

Related

java.lang.NoClassDefFoundError: ./oozie-setup.sh sharelib create -fs hdfs://localhost:9000

I built Oozie and was creating share lib in hdfs but it is giving the following error.
I followed all the steps but this is the only one that went wrong.
setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/io/filefilter/IOFileFilter
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
at java.lang.Class.getMethod0(Class.java:2866)
at java.lang.Class.getMethod(Class.java:1676)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.filefilter.IOFileFilter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
thank you for the help.
copy hadoop libs in extlib directory and prepare war then try it.
cp $HADOOP_HOME/share/hadoop/*/hadoop-*.jar./libext/
cp $HADOOP_HOME /share/hadoop/*/lib/*.jar./libext/
cp mysql-connector-java-5.1.29-bin.jarlibext/
bin/oozie-setup.sh prepare-war
run this after copy and prepare.
./bin/oozie-setup.sh sharelib create -fs hdfs://IP(HOSTNAME):9000

Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.Handler

I am working on YouTube broadcast sample java program. I have created a sample program imported code from
https://github.com/youtube/api-samples/tree/master/java
And, I have imported necessary dependencies/jars. But, when I try to run program, it throws exception on this line :
LocalServerReceiver localReceiver = new LocalServerReceiver.Builder().setPort(8080).build();
below exception :
Throwable: org/mortbay/jetty/Handler
java.lang.NoClassDefFoundError: org/mortbay/jetty/Handler
at com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver$Builder.build(LocalServerReceiver.java:169)
at com.google.api.services.samples.youtube.cmdline.live.Auth.authorize(Auth.java:80)
at com.google.api.services.samples.youtube.cmdline.live.CreateBroadcast.main(CreateBroadcast.java:55)
Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.Handler
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 3 more
And when I import org.mortbay.jetty.jar
I get this exception :
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/api/client/extensions/java6/auth/oauth2/VerificationCodeReceiver
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver$Builder.build(LocalServerReceiver.java:180)
at HelloWorld.main(HelloWorld.java:7)
Caused by: java.lang.ClassNotFoundException: com.google.api.client.extensions.java6.auth.oauth2.VerificationCodeReceiver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 14 more
If you are using maven, please include this jar in your pom.xml
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.5</version>
</dependency>
Otherwise, you can download this jar org.mortbay.jetty.jar and include it.

java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionBindingListener

Don't know how this was working earlier, but I guess I am doing something wrong with my libraries in my web app on tomcat.
It is when I am trying to run a class, from a project deployed on tomcat, I am getting following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionBindingListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpSessionBindingListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 18 more
Please help.
jar containing javax/servlet/http/HttpSessionBindingListener is missing.so download this jar
and then set your classpath

Plus.Activities.Search.execute() throws java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod

Using the 1.17 rc version of the google api client and the services plus I get a ClassDefFoundError whenever I execute the following code:
Plus.Activities.Search req = service.activities().search(q);
ActivityFeed feed = req.execute();
Stacktrace:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod
at com.google.api.client.extensions.appengine.http.UrlFetchTransport.buildRequest(UrlFetchTransport.java:125)
at com.google.api.client.extensions.appengine.http.UrlFetchTransport.buildRequest(UrlFetchTransport.java:51)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:863)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:283)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:248)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at googleplus.GPGet.SearchActivities(GPGet.java:70)
at googleplus.GPGet.main(GPGet.java:53)
Caused by: java.lang.ClassNotFoundException: com.google.appengine.api.urlfetch.HTTPMethod
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 15 more

Gremlin.sh Error Exception in thread "main" java.lang.NoClassDefFoundError: org/fusesource/jansi/AnsiRenderWriter

When I execute a recently installed Gremlin by /bin/gremlin.sh I got:
Exception in thread "main" java.lang.NoClassDefFoundError: org/fusesource/jansi/AnsiRenderWriter
at com.tinkerpop.gremlin.groovy.console.Console.<init>(Console.java:71)
at com.tinkerpop.gremlin.groovy.console.Console.main(Console.java:96)
Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.AnsiRenderWriter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
What could be wrong?
The jansi library is not in your classpath.

Categories