I am using Sqoop to try import a sql server table into Hive. The connection string is working correctly but the import is failing. Below is the output. I am getting the same error if I try import into HDFS as well. Does anyone know what the issue might be?
[cloudera#ushydgnadipalvx sqoop]$ sqoop import --connect "jdbc:sqlserver://[server];username=[username];password=[password];database=[dbname]" --table [tablename] --hive-import
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/07/10 15:31:41 INFO sqoop.Sqoop: Running Sqoop version: 1.4.3-cdh4.7.0
15/07/10 15:31:41 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
15/07/10 15:31:41 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
15/07/10 15:31:41 INFO manager.SqlManager: Using default fetchSize of 1000
15/07/10 15:31:41 INFO tool.CodeGenTool: Beginning code generation
15/07/10 15:31:43 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM [SocialDatas] AS t WHERE 1=0
15/07/10 15:31:45 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/lib/hadoop-0.20-mapreduce
/tmp/sqoop-cloudera/compile/0159bb09ed314f098b249cb4c7c97130/SocialDatas.java:206: cannot find symbol
symbol : method readString(java.io.DataInput)
location: class java.lang.String
this.Language = Text.readString(__dataIn);
^
/tmp/sqoop-cloudera/compile/0159bb09ed314f098b249cb4c7c97130/SocialDatas.java:211: cannot find symbol
symbol : method readString(java.io.DataInput)
location: class java.lang.String
this.Platform = Text.readString(__dataIn);
^
/tmp/sqoop-cloudera/compile/0159bb09ed314f098b249cb4c7c97130/SocialDatas.java:216: cannot find symbol
symbol : method readString(java.io.DataInput)
location: class java.lang.String
this.Text = Text.readString(__dataIn);
^
/tmp/sqoop-cloudera/compile/0159bb09ed314f098b249cb4c7c97130/SocialDatas.java:257: cannot find symbol
symbol : method writeString(java.io.DataOutput,java.lang.String)
location: class java.lang.String
Text.writeString(__dataOut, Language);
^
/tmp/sqoop-cloudera/compile/0159bb09ed314f098b249cb4c7c97130/SocialDatas.java:263: cannot find symbol
symbol : method writeString(java.io.DataOutput,java.lang.String)
location: class java.lang.String
Text.writeString(__dataOut, Platform);
^
/tmp/sqoop-cloudera/compile/0159bb09ed314f098b249cb4c7c97130/SocialDatas.java:269: cannot find symbol
symbol : method writeString(java.io.DataOutput,java.lang.String)
location: class java.lang.String
Text.writeString(__dataOut, Text);
^
Note: /tmp/sqoop-cloudera/compile/0159bb09ed314f098b249cb4c7c97130/SocialDatas.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors
15/07/10 15:31:47 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Error returned by javac
at org.apache.sqoop.orm.CompilationManager.compile(CompilationManager.java:217)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:97)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:396)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
Errors in output shown above are due to hadoop jars not being in CLASSPATH. Try to import after setting proper CLASSPATH. Below is example for tcsh shell.
setenv CLASSPATH $HADOOP_HOME/lib/*:$CLASSPATH
The issue turned out to be that I had a column name called "Text" and that was causing the error. I fixed it by renaming my column.
Related
I'm quite new to gauge and have problems running a set of gauge tests. When I try to gauge run I get the following console output:
src\main\java\de\...\qa\Common.java:3: error: package com.github.....gauge.graphql does not exist
import com.github.....gauge.graphql.GraphqlSetup;
^
symbol: class VariableStorage
location: class Pricing
src\main\java\de\...\qa\testcraft\GaugeTestCraft.java:3: error: package com.github.....gauge.random.data does not exist
import com.github.....gauge.random.data.VariableStorage;
^
src\main\java\de\...\qa\testcraft\TestCraftExecutor.java:4: error: package org.tinylog does not exist
import org.tinylog.Logger;
^
src\test\java\de\...\qa\PricingTest.java:8: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
^
src\test\java\de\...\qa\PricingTest.java:9: error: package org.yaml.snakeyaml does not exist
import org.yaml.snakeyaml.Yaml;
^
src\test\java\de\...\qa\TestVariableStorage.java:3: error: package com.github.....gauge.random.data does not exist
import com.github.....gauge.random.data.VariableStorage;
^
src\test\java\de\...\qa\TestVariableStorage.java:9: error: cannot find symbol
public class TestVariableStorage implements VariableStorage {
^
symbol: class VariableStorage
src\test\java\de\...\qa\PricingTest.java:26: error: cannot find symbol
#Test
^
symbol: class Test
location: class PricingTest
src\test\java\de\...\qa\PricingTest.java:33: error: cannot find symbol
#Test
^
symbol: variable Logger
location: class TestCraftExecutor
src\test\java\de\...\qa\TestVariableStorage.java:12: error: method does not override or implement a method from a supertype
#Override
^
src\test\java\de\...\qa\TestVariableStorage.java:17: error: method does not override or implement a method from a supertype
#Override
^
src\test\java\de\...\qa\TestVariableStorage.java:22: error: method does not override or implement a method from a supertype
#Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
55 errors
Error occurred while waiting for runner process to finish.
Error : exit status 1
Error ----------------------------------
[Gauge]
Failed to start gauge API: Error occurred while waiting for runner process to finish.
Error : exit status 1
Get Support ----------------------------
Docs: https://docs.gauge.org
Bugs: https://github.com/getgauge/gauge/issues
Chat: https://spectrum.chat/gauge
Your Environment Information -----------
windows, 1.1.1, 6e0d83f
html-report (4.0.12), java (0.7.9), python (0.3.11), screenshot (0.0.1), xml-report (0.2.3)
Does someone know how this happens and how to solve it? Here are some additional informations:
Java version:14.0.2
Gauge version: 1.1.1
Maven version: 3.6.3
I just resolve the problem.
You should check your project's gauge.log. The Traceback is in the file, that will help you.
Don`t see the output, it will not work.
Am trying to build openJDK8 in windows 64-bit. Following https://stas-blogspot.blogspot.com/2012/09/building-openjdk-on-windows.html for building.
OS: Windows 7-64-bit
Installed Cygwin, Visual studio 2013, Microsoft SDK, Ant and set all the paths in environment variable.
Built make and freetype 64-bit. Using jdk7 from Oracle as boot-jdk. configure was success. Then when i given
make clean images
Getting build error in jdk:
d:\Preethi\openjdk8\jdk\src\share\classes\java\io\PrintStream.java:31: error: cannot access IllegalCharsetNameException
import java.nio.charset.IllegalCharsetNameException;
^
bad source file: d:\Preethi\openjdk8\build\windows-x86_64-normal-server-release\jdk\gensrc\java\nio\charset\IllegalCharsetNameException.java
file does not contain class java.nio.charset.IllegalCharsetNameException
Please remove or make sure it appears in the correct subdirectory of the sourcepath.
d:\Preethi\openjdk8\jdk\src\share\classes\java\io\ObjectOutputStream.java:37: error: cannot find symbol
import static java.io.ObjectStreamClass.processQueue;
^
symbol: static processQueue
location: class
d:\Preethi\openjdk8\jdk\src\share\classes\java\io\ObjectInputStream.java:44: error: cannot find symbol
import static java.io.ObjectStreamClass.processQueue;
^
symbol: static processQueue
location: class
d:\Preethi\openjdk8\jdk\src\share\classes\java\lang\annotation\Retention.java:44: error: cannot find symbol
#Retention(RetentionPolicy.RUNTIME)
^
symbol: method value()
location: #interface Retention
d:\Preethi\openjdk8\jdk\src\share\classes\java\lang\SuppressWarnings.java:52: error: cannot find symbol
#Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
^
symbol: variable TYPE
d:\Preethi\openjdk8\jdk\src\share\classes\java\lang\SuppressWarnings.java:52: error: cannot find symbol
#Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
^
symbol: variable FIELD
d:\Preethi\openjdk8\jdk\src\share\classes\java\lang\SuppressWarnings.java:52: error: cannot find symbol
#Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
^
symbol: variable METHOD
d:\Preethi\openjdk8\jdk\src\share\classes\java\lang\SuppressWarnings.java:52: error: cannot find symbol
#Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
^
symbol: variable PARAMETER
d:\Preethi\openjdk8\jdk\src\share\classes\java\lang\SuppressWarnings.java:52: error: cannot find symbol
#Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
^
symbol: variable CONSTRUCTOR
d:\Preethi\openjdk8\jdk\src\share\classes\java\lang\SuppressWarnings.java:52: error: cannot find symbol
#Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
^
symbol: variable LOCAL_VARIABLE
java.lang.AssertionError: annotationType(): unrecognized Attribute kind <error> (class com.sun.tools.javac.code.Attribute$Error)
at com.sun.tools.javac.util.Assert.error(Assert.java:133)
at com.sun.tools.javac.code.TypeAnnotations.annotationType(TypeAnnotations.java:180)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.separateAnnotationsKinds(TypeAnnotations.java:294)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.visitMethodDef(TypeAnnotations.java:1066)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.scan(TypeAnnotations.java:275)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.visitClassDef(TypeAnnotations.java:1042)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.scan(TypeAnnotations.java:275)
at com.sun.tools.javac.code.TypeAnnotations$1.run(TypeAnnotations.java:127)
at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:152)
at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:512)
at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
at com.sun.tools.javadoc.JavadocEnter.main(JavadocEnter.java:78)
at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:186)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:346)
at com.sun.tools.javadoc.Start.begin(Start.java:219)
at com.sun.tools.javadoc.Start.begin(Start.java:205)
at com.sun.tools.javadoc.Main.execute(Main.java:64)
at com.sun.tools.javadoc.Main.main(Main.java:54)
javadoc: error - fatal error
makegensrc/GensrcSwing.gmk:77: recipe for target `/cygdrive/d/Preethi/openjdk8/build/windows-x86_64-normal-server-release/jdk/gensrc_no_srczip/_the.generated_be
aninfo' failed[2]: *** [/cygdrive/d/Preethi/openjdk8/build/windows-x86_64-normal-server-release/jdk/gensrc_no_srczip/_the.generated_beaninfo] Error 1
make[2]: *** Waiting for unfinished jobs....
BuildJdk.gmk:55: recipe for target `gensrc-only' failedmake[1]: *** [gensrc-only] Error 2
/cygdrive/d/Preethi/openjdk8//make/Main.gmk:116: recipe for target `jdk-only' failed
make: *** [jdk-only] Error 2
can somebody point-out the issue?
boot-jdk : java version "1.7.0_80" downloaded from Oracle. That blog is meant for openjdk 7 only. But i tried the same steps for building openjdk8 2 years back and it got success.
I'm trying to build a ROM for Android and everything is going smooth, but then i added Proximity Wake feature from CM and got this error:
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:148: cannot find symbol symbol :
variable advancedPrefs location: class com.android.settings.DisplaySettings
advancedPrefs.removePreference(findPreference(KEY_PROXIMITY_WAKE)); ^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:149: cannot find symbol symbol :
variable PROXIMITY_ON_WAKE location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.PROXIMITY_ON_WAKE, 1);
^ Note: Some input files use or override a deprecated API. Note: Recompile
with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors
when i open up the file i find this lines:
advancedPrefs.removePreference(findPreference(KEY_PROXIMITY_WAKE));
Settings.System.putInt(getContentResolver(), Settings.System.PROXIMITY_ON_WAKE, 1);
The error states that it cannot find a symbol, what is wrong?
I have a java applet (SetWatch.class) which I wish to modify. It only supports an offset of 30 minutes and I want 120. I'd like to parameterise the value eventually, but I'd settle for a hard code value as an interim step. I have decompiled it using the website www. showmycode. com. The class file and the resulting .java file are here:
http://www.edcint.co.nz/tmp/SetWatch/
I have programming skills but not java skills so I am unable to verify if the .java file looks good. So I before I modify it I thought I'd try and compile it.
I am running Fedora 19 and using java-1.7.0-openjdk.
I try a basic
javac SetWatch.java
Which gives:
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable javax
location: class SetWatch
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable sound
location: class SetWatch
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable sampled
location: class SetWatch
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable SourceDataLine
location: class SetWatch
4 errors
So I set about trying to find javax.sound.sampled.DataLine.Info.
I find javax/sound/sampled/DataLine$Info.class inside /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.i386/jre/lib/rt.jar. Close, maybe that will work?
javac -classpath /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.i386/jre/lib/rt.jar SetWatch.java
No. Same errors. So I try unzip /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.i386/jre/lib/rt.jar into /tmp (which does seem dodgy to me) and then try
javac -classpath /tmp/javax/sound/sampled SetWatch.java which gives different errors:
SetWatch.java:674: error: cannot access AudioFormat
AudioFormat audioformat;
^
bad class file: /tmp/javax/sound/sampled/AudioFormat.class
class file contains wrong class: javax.sound.sampled.AudioFormat
Please remove or make sure it appears in the correct subdirectory of the classpath.
This looks worse to me like it has sort of worked but caused other problems.
I know I only have javax/sound/sampled/DataLine$Info.class which is not exactly what I want. Where do I get javax.sound.sampled.DataLine.Info from?
I've grepped inside every file from the java RPMs looking for DataLine\.Info but I can not find it.
This is the problem when using a decompiler, you often get junk code in the resultant "source" file. The class literal argument has been mangled:
info =
new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine,
audioformat);
^--------------------------------^
it should be
info =
new javax.sound.sampled.DataLine.Info(javax.sound.sampled.SourceDataLine.class,
audioformat);
Read: DataLine.Info javadoc
I ran the following command to compile a servlet called BeerSelect.java from HeadFirst Servlets and JSP book.
D:\Apache Tomcat\apache-tomcat-5.5.36\apache-tomcat-5.5.36\webapps\Coffee>javac
-classpath /common/lib servlet-api.jar:classes: -d classes src/com/example/web/B
eerSelect.java
My servlet-api.jar is located in D:\Apache Tomcat\apache-tomcat-5.5.36\apache-tomcat-5.5.36\common\lib
MESSAGE
javac: invalid flag: servlet-api.jar:classes:
Usage: javac <options> <source files> use -help for a list of possible options
Cannot understand how to fix this command and compile the servlet. Doing it for the first time new to servlets.
Then I changed the command to be
D:\Apache Tomcat\apache-tomcat-5.5.36\apache-tomcat-5.5.36\webapps\Coffee\WEB-IN
F\src\com\example\web>javac -classpath "D:\Apache Tomcat\apache-tomcat-5.5.36\ap
ache-tomcat-5.5.36\common\lib\servlet-api.jar";classes BeerSelect.java
MESSAGE
BeerSelect.java:3: package com.example.model does not exist
import com.example.model.*;
^
BeerSelect.java:15: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
BeerSelect.java:15: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
BeerSelect.java:32: cannot find symbol
symbol : variable out
location: class com.example.web.BeerSelect
out.println("<br>try: " + it.next());
^
4 errors
Why cannot it find the com.example.model package ?
IMAGE
It looks like you have three issues with your command: extra spaces, Unix-style pathnames, and missing additional Java source files. Try the following instead:
javac -classpath "D:\Apache Tomcat\apache-tomcat-5.5.36\apache-tomcat-5.5.36\common\lib\servlet-api.jar";classes -d classes src\com\example\web\*.java src\com\example\model\*.java
I've removed extra spaces, converted Unix paths to Windows paths, changed the classpath separator from the Unix-style ':' to Windows-style ';', and added your other Java sources - compiling them all together should resolve your first three compiler errors.
As for the last compiler error, that appears to be a genuine source code error - try prepending System. to the out.println("<br>try: " + it.next()); line. (It can also be resolved by a static import, but that would be unconventional.)
D:\Apache Tomcat\apache-tomcat-5.5.36\apache-tomcat-5.5.36\webapps\Coffee>javac -classpath "D:\Apache Tomcat\apache-tomcat-5.5.36\apache-tomcat-5.5.36\common\lib\servlet-api.jar";"D:\Apache Tomcat\apache-tomcat-5.5.36\apache-tomcat-5.5.36\webapps\Coffee\WEB-INF\src" WEB-INF\src\com\example\web\BeerSelect.java
This command works and compiles the class BeerSelect.java.