sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bejoy ks <bejo...@gmail.com>
Subject Re: Fw: Fw: [sqoop-user] sqoop import shows ORA-00933: SQL command notproperlyended error
Date Wed, 27 Jul 2011 13:06:03 GMT
Hi Arvind
        A few more identifications on top of this. I tried framing a simple
Jdbc program and ran it on the Linux box that holds the name node of our
cluster. I tried a couple of queries using the same and below are the
results
*Simple Select Query*
Select * from ENGINE_RAW_OUTPUT;
It worked absolutely fine retrieving the results.

*Sqoop generated Select Query*
SELECT t.* FROM ENGINE_RAW_OUTPUT AS t WHERE 1=0;
It threw an error as, 'SQL command not properly ended'

Is the import getting failed because of the syntax issues in SQL queries
fired by SQOOP to oracle db? I'm not a db savy, it'd be great if you could
just briefly explain what does this '1=0' mean in SQOOP import generated
queries.

Also I tried a free form query import as
sqoop import -D oraoop.disabled=true --driver oracle.jdbc.OracleDriver
--connect jdbc:oracle:thin:@servername:port:SID --username <user name>
--password <password> --query "Select * from ENGINE_RAW_OUTPUT where
ENGINE_POSITION=1 $CONDITIONS" --split-by AIRCRAFT_ID --target-dir
/userdata/bejoys/sqoop/ttdata

But the command fails with the error as 'java.sql.SQLSyntaxErrorException:
ORA-00907: missing right parenthesis' and the Sqoop generated query is
'Select * from ENGINE_RAW_OUTPUT where ENGINE_POSITION=1  (1 = 0)'
Seems like that error due to the SQL Query generated by SQOOP. Can we have
your Thoughts on this issue?

The error log is as follows
11/07/27 08:11:04 INFO oraoop.OraOopManagerFactory: Quest® Data Connector
for Oracle and Hadoop is disabled.
11/07/27 08:11:04 INFO tool.CodeGenTool: Beginning code generation
11/07/27 08:11:05 INFO manager.SqlManager: Executing SQL statement: Select *
from ENGINE_RAW_OUTPUT where ENGINE_POSITION=1  (1 = 0)
11/07/27 08:11:05 ERROR manager.SqlManager: Error executing statement:
java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis

11/07/27 08:11:05 INFO manager.SqlManager: Executing SQL statement: Select *
from ENGINE_RAW_OUTPUT where ENGINE_POSITION=1  (1 = 0)
11/07/27 08:11:06 ERROR manager.SqlManager: Error executing statement:
java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis

java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
        at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
        at
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
        at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
        at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
        at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
        at
oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
        at
com.cloudera.sqoop.manager.SqlManager.execute(SqlManager.java:442)
        at
com.cloudera.sqoop.manager.SqlManager.getColumnNamesForRawQuery(SqlManager.java:112)
        at
com.cloudera.sqoop.manager.SqlManager.getColumnNamesForQuery(SqlManager.java:103)
        at com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:927)
        at
com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
        at
com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
        at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
        at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
        at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
        at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
11/07/27 08:11:06 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.NullPointerException
java.lang.NullPointerException
        at
com.cloudera.sqoop.orm.ClassWriter.cleanColNames(ClassWriter.java:889)
        at com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:951)
        at
com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
        at
com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
        at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
        at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
        at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
        at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)



On Tue, Jul 26, 2011 at 5:02 PM, bejoy ks <bejoyks@gmail.com> wrote:

> Hi Arvind
>             I did make  some deep dive to analye the same and below are a
> few findings from my end. Hope it helps you to guide us in identifying the
> root cause.
>
> *Analysis 1*
> Tried the Sqoop import with oraoop enabled for the same query that failed
> with the default jdbc driver
> *Sqoop command*
>
> sqoop import -D oraoop.disabled=true --driver oracle.jdbc.OracleDriver
> --connect jdbc:oracle:thin:@servername:
> port:SID --username <user name> --password <password>  --table
> ENGINE_RAW_OUTPUT --split-by ENGINE_POSITION  --warehouse-dir
> /userdata/bejoys/sqoop/ --num-mappers 15
> *Result*
> Getting an error as table or view doesn not exist.
> *Console log*
>
> 11/07/26 05:45:51 WARN oraoop.OraOopManagerFactory: Unable to determine the
> Oracle-type of the object named ENGINE_RAW_OUTPUT owned by <user name>.
>
> Error:
>
> ORA-00942: table or view does not exist
>
>
>
> 11/07/26 05:45:51 WARN oraoop.OraOopManagerFactory: Unable to determine
> whether the Oracle table <user name>.ENGINE_RAW_OUTPUT is an index-organized
> table.
>
> Error:
>
> ORA-00942: table or view does not exist
>
>
>
> 11/07/26 05:45:51 INFO oraoop.OraOopManagerFactory:
>
> ******************************************************************
>
> *** Using Quest® Data Connector for Oracle and Hadoop 1.3.0.81 ***
>
> *** Copyright 2011 Quest Software, Inc.                        ***
>
> *** ALL RIGHTS RESERVED.                                       ***
>
> ******************************************************************
>
> 11/07/26 05:45:51 INFO oraoop.OraOopManagerFactory: Oracle Database
> version: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
>
> 11/07/26 05:45:51 INFO oraoop.OraOopManagerFactory: This Oracle database is
> not a RAC.
>
> 11/07/26 05:45:51 INFO tool.CodeGenTool: Beginning code generation
>
> 11/07/26 05:45:52 ERROR sqoop.Sqoop: Got exception running Sqoop:
> java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942:
> table or view does not exist
>
>
>
> java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942:
> table or view does not exist
>
>
>
>         at
> com.quest.oraoop.OraOopConnManager.getColumnNamesInOracleTable(OraOopConnManager.java:119)
>
>         at
> com.quest.oraoop.OraOopConnManager.getSelectedColumnNamesInOracleTable(OraOopConnManager.java:130)
>
>         at
> com.quest.oraoop.OraOopConnManager.getColTypesQuery(OraOopConnManager.java:193)
>
>         at
> com.cloudera.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:160)
>
>         at
> com.quest.oraoop.OraOopConnManager.getColumnTypes(OraOopConnManager.java:455)
>
>         at
> com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:908)
>
>         at
> com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
>
>         at
> com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
>
>         at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
>
>         at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
>
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>
>         at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
>
>         at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
>
>         at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
>
> Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does
> not exist
>
>
>
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
>
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
>
>         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
>
>         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
>
>         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
>
>         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
>
>         at
> oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
>
>         at
> oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
>
>         at
> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
>
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
>
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
>
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
>
>         at
> oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
>
>         at
> com.quest.oraoop.OraOopOracleQueries.getTableColumns(OraOopOracleQueries.java:432)
>
>         at
> com.quest.oraoop.OraOopOracleQueries.getTableColumns(OraOopOracleQueries.java:538)
>
>         at
> com.quest.oraoop.OraOopOracleQueries.getTableColumnNames(OraOopOracleQueries.java:389)
>
>         at
> com.quest.oraoop.OraOopConnManager.getColumnNamesInOracleTable(OraOopConnManager.java:109)
>
>         ... 14 more
>
> *Analysis 2*
> Tried the Sqoop list tables command to check whether the table
> ENGINE_RAW_OUTPUT would be listed
> *Sqoop command*
>
> sqoop list-tables --driver oracle.jdbc.OracleDriver --connect
> jdbc:oracle:thin:@servername:
> port:SID --username <user name> --password <password>
> *Result*
> The table name 'ENGINE_RAW_OUTPUT' is in the output list
>
> *Analysis 3*
> Checked whether I could execute a Select Query on the database table using
> Sqoop Eval tool
> *Sqoop command*
>
> sqoop eval --driver oracle.jdbc.OracleDriver --connect
> jdbc:oracle:thin:@servername:
> port:SID --username <user name> --password <password>
>
> --query "select * from ENGINE_RAW_OUTPUT"
>
> *Result*
>
> Command executed sucessfully returing the records
>
>
> *Analysis 4*
>
> Tried to execute the SQOOP generated sql query while doing SQOOP import
> with SQOOP eval tool
>
> *Sqoop command*
>
> sqoop eval --driver oracle.jdbc.OracleDriver --connect
> jdbc:oracle:thin:@servername:
> port:SID --username <user name> --password <password>
>
> --query "SELECT t.* FROM ENGINE_RAW_OUTPUT AS t WHERE 1=0"
>
> *Result*
>
> Error is thrown stating the SQL command is not properly ended.
>
> *Console Log*
>
> 11/07/26 06:06:50 WARN tool.EvalSqlTool: SQL exception executing statement:
> java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
>
>
>
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
>
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
>
>         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
>
>         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
>
>         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
>
>         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
>
>         at
> oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
>
>         at
> oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
>
>         at
> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
>
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
>
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
>
>         at
> oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)
>
>         at
> oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
>
>         at com.cloudera.sqoop.tool.EvalSqlTool.run(EvalSqlTool.java:68)
>
>         at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
>
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>
>         at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
>
>         at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
>
>         at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
>
>
>
>
> On Tue, Jul 26, 2011 at 12:03 PM, Reju R <rejurs@gmail.com> wrote:
>
>> Hi Arvind,
>>      We have tried without the schema.table. I am providing the complete
>> command and the error again I have got.
>>
>>
>> Details regarding sqoop installation
>>
>> sqoop Installation : git commit id
>> 455acc8dee10b6a3579358cccc3635241076391b
>> Compiled by hudson@ubuntu-slave02 on Fri Mar 25 16:25:35 PDT 2011
>>
>> JDBC driver: ojdbc6.jar
>>
>> java version: 1.6.0_21
>>
>> hadoop version: Hadoop 0.20.2-cdh3u0
>> Subversion  -r 81256ad0f2e4ab2bd34b04f53d25a6c23686dd14
>> Compiled by root on Fri Mar 25 20:07:24 EDT 2011
>> From source with checksum 6c1f62dddc4eac69b6b973c18bbc0f55
>>
>> Oracle database version: Oracle9i Enterprise Edition Release 9.2.0.8.0
>> - 64bit
>>                                      PL/SQL Release 9.2.0.8.0
>>                                      "CORE 9.2.0.8.0"
>>                                       TNS for Solaris: Version  9.2.0.8.0
>>                                      NLSRTL Version 9.2.0.8.0
>>
>>
>>
>>
>>
>> OS Information
>>
>> Linux  2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64
>> x86_64 x86_64 GNU/Linux
>>
>>
>> sqoop import  -D oraoop.disabled=true --driver oracle.jdbc.OracleDriver
>> --connect jdbc:oracle:thin:@evnctpp1.ae.ge.com:1523:evnctpp1 --username
>> OPS\$NFNE049 -P --table ENGINE_RAW_OUTPUT --split-by AIRCRAFT_ID
>> --warehouse-dir
>> /userdata/aviation/ETL_PoC/engine_raw_output/engine_raw_output_oracle_test
>> --hive-import --hive-table engine_raw_output_oracle_test --verbose
>>
>> 11/07/26 02:29:43 DEBUG tool.BaseSqoopTool: Enabled debug logging.
>> Enter password:
>> 11/07/26 02:30:02 INFO tool.BaseSqoopTool: Using Hive-specific delimiters
>> for output. You can override
>> 11/07/26 02:30:02 INFO tool.BaseSqoopTool: delimiters with
>> --fields-terminated-by, etc.
>> 11/07/26 02:30:02 DEBUG util.ClassLoaderStack: Checking for existing
>> class: com.quest.oraoop.OraOopManagerFactory
>> 11/07/26 02:30:02 DEBUG util.ClassLoaderStack: Class is already available.
>> Skipping jar /usr/lib/sqoop/lib/oraoop-1.3.0.81.jar
>> 11/07/26 02:30:02 DEBUG sqoop.ConnFactory: Added factory
>> com.quest.oraoop.OraOopManagerFactory in jar
>> /usr/lib/sqoop/lib/oraoop-1.3.0.81.jar specified by
>> /usr/lib/sqoop/conf/managers.d/oraoop
>> 11/07/26 02:30:02 DEBUG sqoop.ConnFactory: Loaded manager factory:
>> com.quest.oraoop.OraOopManagerFactory
>> 11/07/26 02:30:02 DEBUG sqoop.ConnFactory: Loaded manager factory:
>> com.cloudera.sqoop.manager.DefaultManagerFactory
>> 11/07/26 02:30:02 DEBUG sqoop.ConnFactory: Trying ManagerFactory:
>> com.quest.oraoop.OraOopManagerFactory
>> 11/07/26 02:30:02 DEBUG oraoop.OraOopUtilities: Enabled OraOop debug
>> logging.
>> 11/07/26 02:30:02 DEBUG oraoop.OraOopManagerFactory: Quest® Data
>> Connector for Oracle and Hadoop can be called by Sqoop!
>> 11/07/26 02:30:02 INFO oraoop.OraOopManagerFactory: Quest® Data Connector
>> for Oracle and Hadoop is disabled.
>> 11/07/26 02:30:02 DEBUG sqoop.ConnFactory: Trying ManagerFactory:
>> com.cloudera.sqoop.manager.DefaultManagerFactory
>> 11/07/26 02:30:02 DEBUG sqoop.ConnFactory: Instantiated ConnManager
>> com.cloudera.sqoop.manager.GenericJdbcManager@5e7808b9
>> 11/07/26 02:30:02 INFO tool.CodeGenTool: Beginning code generation
>> 11/07/26 02:30:03 INFO manager.SqlManager: Executing SQL statement: SELECT
>> t.* FROM ENGINE_RAW_OUTPUT AS t WHERE 1=0
>> 11/07/26 02:30:03 ERROR manager.SqlManager: Error executing statement:
>> java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
>> 11/07/26 02:30:03 INFO manager.SqlManager: Executing SQL statement: SELECT
>> t.* FROM ENGINE_RAW_OUTPUT AS t WHERE 1=0
>> 11/07/26 02:30:04 ERROR manager.SqlManager: Error executing statement:
>> java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
>>  java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
>> ended
>>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
>>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
>>         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
>>         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
>>         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
>>         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
>>         at
>> oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
>>         at
>> oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
>>         at
>> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
>>         at
>> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
>>         at
>> oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
>>         at
>> oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
>>         at
>> oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
>>         at
>> com.cloudera.sqoop.manager.SqlManager.execute(SqlManager.java:442)
>>         at
>> com.cloudera.sqoop.manager.SqlManager.getColumnNamesForRawQuery(SqlManager.java:112)
>>         at
>> com.cloudera.sqoop.manager.SqlManager.getColumnNames(SqlManager.java:96)
>>         at
>> com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:924)
>>         at
>> com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
>>         at
>> com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
>>         at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
>>         at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
>>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>>         at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
>>         at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
>>         at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
>> 11/07/26 02:30:04 ERROR sqoop.Sqoop: Got exception running Sqoop:
>> java.lang.NullPointerException
>>
>> java.lang.NullPointerException
>>         at
>> com.cloudera.sqoop.orm.ClassWriter.cleanColNames(ClassWriter.java:889)
>>         at
>> com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:951)
>>         at
>> com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
>>         at
>> com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
>>         at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
>>         at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
>>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>>         at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
>>         at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
>>         at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
>>
>>
>> On Tue, Jul 26, 2011 at 10:34 AM, <bejoyks@gmail.com> wrote:
>>
>>> Reju
>>>     Arvind's response to the post. Please respond with the details on to
>>> sqoop-user@incubator.apache.org , the new mailing list
>>>
>>> Regards
>>> Bejoy K S
>>>
>>> -----Original Message-----
>>> From: Arvind Prabhakar <arvind@apache.org>
>>> Date: Mon, 25 Jul 2011 13:08:27
>>> To: <sqoop-user@incubator.apache.org>; <bejoyks@gmail.com>
>>> Subject: Re: Fw: [sqoop-user] sqoop import shows ORA-00933: SQL command
>>> not
>>>  properlyended error
>>>
>>> Bejoy,
>>>
>>> In the import statement, are you providing the table name using a
>>> schema qualifier prefix (schema.table)? If so, that could be the
>>> problem. See SQOOP-222 [1] for details.  If this indeed is the issue
>>> you are running into, a work-around would be to change the table name
>>> to a simple table name and use the username/password of the account
>>> that owns the schema.
>>>
>>> If doing the above does not fix the problem, please provide more
>>> details about the version of Sqoop, and the complete command you
>>> issued (with masked password).
>>>
>>> [1] https://issues.cloudera.org/browse/SQOOP-222
>>>
>>> Thanks,
>>> Arvind
>>>
>>> On Mon, Jul 25, 2011 at 10:16 AM,  <bejoyks@gmail.com> wrote:
>>> > Redirecting the message to new apache sqoop mailing list
>>> > Regards
>>> > Bejoy K S
>>> >
>>> > -----Original Message-----
>>> > From: reju <rejurs@gmail.com>
>>> > Date: Mon, 25 Jul 2011 09:41:29
>>> > To: Sqoop Users<sqoop-user@cloudera.org>
>>> > Reply-To: sqoop-user@cloudera.org
>>> > Subject: [sqoop-user] sqoop import shows ORA-00933: SQL command not
>>> properly
>>> >  ended error
>>> >
>>> > sqoop import  -D  oraoop.disabled=true --driver
>>> > oracle.jdbc.OracleDriver --connect
>>> > jdbc:oracle:thin:@servername:port:SID --username username -password
>>> >
>>> > password --table tablename --split-by fielname --warehouse-dir
>>> > warehusedirectory --hive-import --hive-table tabelname --verbose
>>> >
>>> > 11/07/25 12:37:43 DEBUG tool.BaseSqoopTool: Enabled debug logging.
>>> > 11/07/25 12:37:43 WARN tool.BaseSqoopTool: Setting your password on
>>> > the command-line is insecure. Consider using -P instead.
>>> > 11/07/25 12:37:43 INFO tool.BaseSqoopTool: Using Hive-specific
>>> > delimiters for output. You can override
>>> > 11/07/25 12:37:43 INFO tool.BaseSqoopTool: delimiters with --fields-
>>> > terminated-by, etc.
>>> > 11/07/25 12:37:43 DEBUG util.ClassLoaderStack: Checking for existing
>>> > class: com.quest.oraoop.OraOopManagerFactory
>>> > 11/07/25 12:37:43 DEBUG util.ClassLoaderStack: Class is already
>>> > available. Skipping jar /usr/lib/sqoop/lib/oraoop-1.3.0.81.jar
>>> > 11/07/25 12:37:43 DEBUG sqoop.ConnFactory: Added factory
>>> > com.quest.oraoop.OraOopManagerFactory in jar /usr/lib/sqoop/lib/
>>> > oraoop-1.3.0.81.jar specified by
>>> >
>>> > /usr/lib/sqoop/conf/managers.d/oraoop
>>> > 11/07/25 12:37:43 DEBUG sqoop.ConnFactory: Loaded manager factory:
>>> > com.quest.oraoop.OraOopManagerFactory
>>> > 11/07/25 12:37:43 DEBUG sqoop.ConnFactory: Loaded manager factory:
>>> > com.cloudera.sqoop.manager.DefaultManagerFactory
>>> > 11/07/25 12:37:43 DEBUG sqoop.ConnFactory: Trying ManagerFactory:
>>> > com.quest.oraoop.OraOopManagerFactory
>>> > 11/07/25 12:37:43 DEBUG oraoop.OraOopUtilities: Enabled OraOop debug
>>> > logging.
>>> > 11/07/25 12:37:43 DEBUG oraoop.OraOopManagerFactory: Quest® Data
>>> > Connector for Oracle and Hadoop can be called by Sqoop!
>>> > 11/07/25 12:37:43 INFO oraoop.OraOopManagerFactory: Quest® Data
>>> > Connector for Oracle and Hadoop is disabled.
>>> > 11/07/25 12:37:43 DEBUG sqoop.ConnFactory: Trying ManagerFactory:
>>> > com.cloudera.sqoop.manager.DefaultManagerFactory
>>> > 11/07/25 12:37:43 DEBUG sqoop.ConnFactory: Instantiated ConnManager
>>> > com.cloudera.sqoop.manager.GenericJdbcManager@851052d
>>> > 11/07/25 12:37:43 INFO tool.CodeGenTool: Beginning code generation
>>> > 11/07/25 12:37:44 INFO manager.SqlManager: Executing SQL statement:
>>> > SELECT t.* FROM ENGINE_RAW_OUTPUT AS t WHERE 1=0
>>> > 11/07/25 12:37:44 ERROR manager.SqlManager: Error executing statement:
>>> > java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
>>> > ended
>>> >
>>> > 11/07/25 12:37:44 INFO manager.SqlManager: Executing SQL statement:
>>> > SELECT t.* FROM ENGINE_RAW_OUTPUT AS t WHERE 1=0
>>> > 11/07/25 12:37:44 ERROR manager.SqlManager: Error executing statement:
>>> > java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
>>> > ended
>>> >
>>> > java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
>>> > ended
>>> >
>>> >        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:
>>> > 440)
>>> >        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:
>>> > 396)
>>> >        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
>>> >        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
>>> >        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
>>> >        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
>>> >        at
>>> >
>>> oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:
>>> > 207)
>>> >        at
>>> >
>>> oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:
>>> > 863)
>>> >        at
>>> >
>>> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:
>>> > 1153)
>>> >        at
>>> >
>>> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:
>>> > 1275)
>>> >        at
>>> >
>>> oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:
>>> > 3576)
>>> >        at
>>> >
>>> oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:
>>> > 3620)
>>> >        at
>>> >
>>> oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:
>>> > 1491)
>>> >        at
>>> > com.cloudera.sqoop.manager.SqlManager.execute(SqlManager.java:442)
>>> >        at
>>> >
>>> com.cloudera.sqoop.manager.SqlManager.getColumnNamesForRawQuery(SqlManager.java:
>>> > 112)
>>> >        at
>>> > com.cloudera.sqoop.manager.SqlManager.getColumnNames(SqlManager.java:
>>> > 96)
>>> >        at
>>> > com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:924)
>>> >        at
>>> > com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
>>> >        at
>>> > com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
>>> >        at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
>>> >        at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
>>> >        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>>> >        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>>> >        at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
>>> >        at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
>>> >        at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
>>> > 11/07/25 12:37:44 ERROR sqoop.Sqoop: Got exception running Sqoop:
>>> > java.lang.NullPointerException
>>> > java.lang.NullPointerException
>>> >        at
>>> > com.cloudera.sqoop.orm.ClassWriter.cleanColNames(ClassWriter.java:889)
>>> >        at
>>> > com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:951)
>>> >        at
>>> > com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
>>> >        at
>>> > com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
>>> >        at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
>>> >        at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
>>> >        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>>> >        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>>> >        at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
>>> >        at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
>>> >        at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)
>>> >
>>> > --
>>> > NOTE: The mailing list sqoop-user@cloudera.org is deprecated in favor
>>> of Apache Sqoop mailing list sqoop-user@incubator.apache.org. Please
>>> subscribe to it by sending an email to
>>> incubator-sqoop-user-subscribe@apache.org.
>>> >
>>>
>>
>>
>>
>> --
>> Thanks and Regards
>> Reju. R
>>
>>
>
>
> --
> Regards
>        Bejoy
>



-- 
Regards
       Bejoy

Mime
View raw message