classpath

Hive error : Exception in thread “main” java.lang.NoClassDefFoundError: scala/collection/Iterable

喜你入骨 提交于 2019-11-29 08:46:45
I am facing an error when I try to query a table in hive when hive uses spark. For example, when I do: select count(*) from ma_table; I get this: Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/Iterable at org.apache.hadoop.hive.ql.parse.spark.GenSparkProcContext.<init>(GenSparkProcContext.java:163) at org.apache.hadoop.hive.ql.parse.spark.SparkCompiler.generateTaskTree(SparkCompiler.java:195) at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:267) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10947)

Why is my updated Eclipse / Android setup not building my APK anymore?

社会主义新天地 提交于 2019-11-29 07:47:10
问题 I had a working Eclipse setup with 3.6.2 and SDK tools from version 11, and it has been building my main project just fine for quite a while. For a different project, I thought I needed to upgrade my SDK to the latest and greatest - at this point API 14 (ICS 4.0). I cannot even reconstruct the steps I went through, but what happened was that my project would seem to build, but I would see that it would say that it was skipping a post-compiler step, and at the end I would have no APK. I also

Howto print java class garbage collection events?

喜你入骨 提交于 2019-11-29 06:46:48
java version "1.5.0_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode) I'm trying to debug a NullPointerException I'm getting for passing a reference to statically defined field. To be more specific, I'm setting a global on a Drools3 working memory instance. workingMemory.setGlobal("log", workingMemorieslog); My assumption is that the Class where the field is statically defined is being garbage collected. (The receiving class must be using WeakReference or something like that, I don't really know) How would you

java.lang.ClassNotFoundException / NoClassDefFoundError for com/fasterxml/jackson/databind/ObjectMapper with Maven

给你一囗甜甜゛ 提交于 2019-11-29 06:27:05
I get the following error when trying to run a java program that uses jackon's ObjectMapper class: Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper at com.inin.dynamotransfer.DynamoTransfer.importData(DynamoTransfer.java:133) at com.inin.dynamotransfer.DynamoTransfer.main(DynamoTransfer.java:67) Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController

You need to run build with JDK or have tools.jar on the classpath

↘锁芯ラ 提交于 2019-11-29 06:09:39
I'm using Eclipse Luna to develop java maven applications. I am, or was, but am again now, using jdk1.7 as my default installed JRE. After an update from SVN that I made, I started getting this error on my pom.xml files: You need to run build with JDK or have tools.jar on the classpath. If this occures during eclipse build make sure you run eclipse under JDK as well (com.mysema.maven:apt-maven-plugin:1.0.6:process:default:generate-sources) I noticed that my jdk1.7 installation was GONE from eclipse somehow. I've tried all the options that I've found here on stackoverflow about re-adding that

Java -classpath option

ⅰ亾dé卋堺 提交于 2019-11-29 06:06:41
问题 Will the use of -classpath option with java , add to or replace the contents of the CLASSPATH env variable? 回答1: Using the classpath variable it overrides the CLASSPATH of Environment variable but only for that session. If you restart the application you need to again set the classpath variable. 回答2: Yes. Quoted from the java(1) man page: -classpath classpath -cp classpath Specifies a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver when executing JAR

陌路散爱 提交于 2019-11-29 04:55:44
I am attempting to connect to my local MySQL server with the following code: dbURL = "jdbc:mysql://localhost:3306:/" + dbname; try{ Class.forName("com.mysql.jdbc.Driver"); try{ con = DriverManager.getConnection(dbURL, dbuser, dbpass); } catch (SQLException ex){ System.out.println("ERROR: Could not connection to SQL DB"); con = null; } } catch (ClassNotFoundException e){ System.out.println("Error: "); e.printStackTrace(); } I then get java.lang.ClassNotFoundException: com.mysql.jdbc.Driver I understand that Java cannot find the proper driver for connecting the Java environment to the MySQL

Loading a configuration file from the classpath

会有一股神秘感。 提交于 2019-11-29 04:54:48
I'm working on making my Java app easy to deploy to other computers and am writing an ant script to do so, that is going fine. I'm having trouble loading resources that are listed in the classpath named in the manifest file of the jar. Folder structure looks like this: /MyProgram.jar /lib/<dependencies> /config/configuration.xml I can not for the life of me access the configuration.xml file using the ClassLoader. It, along with all the dependencies are listed explicitly in the Class-Path entry to the manifest file. I've tried many variants of the following: this.xml = Thread.currentThread()

How to configure .dll file in Java?

…衆ロ難τιáo~ 提交于 2019-11-29 04:22:42
I am using Jacob jar file in my java application. This Jacob jar file comes with a .dll file. I have added Jacob jar file to my classpath. But when I execute my application a runtime error occurs as "couldn't load jacob-1.15-M3-x86.dll file" How can I load this .dll file? Edited:================================================================================= I had set the "path" environment varaible to the dir that contains my .dll file and loading that .dll file as follows static { System.loadLibrary("jacob-1.15-M3-x86.dll"); } but the following error occured java.lang.UnsatisfiedLinkError:

how to add a jar to my lib/ directory in intelliJ and have the classes available for my web.xml?

江枫思渺然 提交于 2019-11-29 03:39:00
I have tried many combinations and every time I try to add the jars from the lib directory, intelliJ puts the path down as the src directory. I don't know why. When I move the jars to the src/ directory, intelliJ then switches the path to the lib/ directory. I am not sure how to get this to work correctly. I'm using Intellij IDEA 11.1, trying to add the Selenium Standalone Server 2 JAR to my new Java project, which already has a module. I could not add the .jar to the Project settings Module (as suggested in another answer), but I can add it to either the project or global libraries. This