Hi Jarcec, Your solution worked like a charm. Thank you so much. On Tue, Feb 21, 2012 at 1:06 PM, Jarek Jarcec Cecho wrote: > Hi Anil, > unfortunately I do not have experience with Oracle, but there were plenty > of issues regarding proper case in table names and user names. Would you > mind trying uppercase table name? There is an explanation available on > troubleshooting section on sqoop user guide: > > > http://incubator.apache.org/sqoop/docs/1.4.1-incubating/SqoopUserGuide.html#_oracle_case_sensitive_catalog_query_errors > > To your last question, Sqoop is calling query that won't return anything > to get table's metadata (column names, data types, ...) in database > independent way. > > Jarcec > > On Tue, Feb 21, 2012 at 12:52:59PM -0800, anil gupta wrote: > > Hi All, > > > > I am using sqoop cdh3u3 along with Hadoop cdh3u2. I am trying to > > import a Oracle table but i get the following error: > > "ERROR tool.ImportTool: Imported Failed: Attempted to generate class > > with no columns!" > > > > Here is the console snippet: > > [root@namenode ~]# sudo -u hdfs sqoop import --connect > > jdbc:oracle:thin:@dev_db:1521:RiskStg --username db_user --password > > db_password --table import_table_name --target-dir /user/hdfs -- > > verbose > > 12/02/21 09:50:47 DEBUG tool.BaseSqoopTool: Enabled debug logging. > > 12/02/21 09:50:47 WARN tool.BaseSqoopTool: Setting your password on > > the command-line is insecure. Consider using -P instead. > > 12/02/21 09:50:47 DEBUG sqoop.ConnFactory: Loaded manager factory: > > com.cloudera.sqoop.manager.DefaultManagerFactory > > 12/02/21 09:50:47 DEBUG sqoop.ConnFactory: Trying ManagerFactory: > > com.cloudera.sqoop.manager.DefaultManagerFactory > > 12/02/21 09:50:47 DEBUG manager.DefaultManagerFactory: Trying with > > scheme: jdbc:oracle:thin:@dev_db:1521 > > 12/02/21 09:50:47 DEBUG manager.OracleManager$ConnCache: Instantiated > > new connection cache. > > 12/02/21 09:50:47 INFO manager.SqlManager: Using default fetchSize of > > 1000 > > 12/02/21 09:50:47 DEBUG sqoop.ConnFactory: Instantiated ConnManager > > com.cloudera.sqoop.manager.OracleManager@1cb8deef > > 12/02/21 09:50:47 INFO tool.CodeGenTool: Beginning code generation > > 12/02/21 09:50:47 DEBUG manager.OracleManager: Using column names > > query: SELECT t.* FROM import_table_name t WHERE 1=0 > > 12/02/21 09:50:47 DEBUG manager.OracleManager: Creating a new > > connection for jdbc:oracle:thin:@dev_db:1521:RiskStg, using username: > > db_user > > 12/02/21 09:50:47 DEBUG manager.OracleManager: No connection > > paramenters specified. Using regular API for making connection. > > 12/02/21 09:50:48 INFO manager.OracleManager: Time zone has been set > > to GMT > > 12/02/21 09:50:48 DEBUG manager.SqlManager: Using fetchSize for next > > query: 1000 > > 12/02/21 09:50:48 INFO manager.SqlManager: Executing SQL statement: > > SELECT t.* FROM import_table_name t WHERE 1=0 > > 12/02/21 09:50:48 DEBUG manager.OracleManager$ConnCache: Caching > > released connection for jdbc:oracle:thin:@dev_db:1521:RiskStg/db_user > > 12/02/21 09:50:48 DEBUG orm.ClassWriter: selected columns: > > 12/02/21 09:50:48 ERROR tool.ImportTool: Imported Failed: Attempted to > > generate class with no columns! > > > > Also, I would like to know why sqoop is running a query which wont > > return any rows viz. "SELECT t.* FROM import_table_name t WHERE 1=0" > > > > Any help would be highly appreciated. > > Thanks, > > Anil > -- Thanks & Regards, Anil Gupta