You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Cheolsoo Park (JIRA)" <ji...@apache.org> on 2012/06/27 18:44:44 UTC

[jira] [Updated] (SQOOP-510) Improve the error message for bad connector files

     [ https://issues.apache.org/jira/browse/SQOOP-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cheolsoo Park updated SQOOP-510:
--------------------------------

    Description: 
This is related to SQOOP-505.

If a connector file contains any lines that are not in the form of key=value, Sqoop fails with the following error:

{code}
12/06/26 07:04:53 ERROR tool.BaseSqoopTool: Got error creating database manager: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1937)
	at org.apache.sqoop.ConnFactory.addManagersFromFile(ConnFactory.java:152)
	at org.apache.sqoop.ConnFactory.loadManagersFromConfDir(ConnFactory.java:224)
	at org.apache.sqoop.ConnFactory.instantiateFactories(ConnFactory.java:83)
	at org.apache.sqoop.ConnFactory.<init>(ConnFactory.java:60)
	at com.cloudera.sqoop.ConnFactory.<init>(ConnFactory.java:36)
	at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:203)
	at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:44)
	at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
	at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
	at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
{code}

We need a better error message than this.

  was:
This is related to SQOOP-505.

If a connector file doesn't contain any lines that are not in the form of key=value, Sqoop fails with the following error:

{code}
12/06/26 07:04:53 ERROR tool.BaseSqoopTool: Got error creating database manager: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1937)
	at org.apache.sqoop.ConnFactory.addManagersFromFile(ConnFactory.java:152)
	at org.apache.sqoop.ConnFactory.loadManagersFromConfDir(ConnFactory.java:224)
	at org.apache.sqoop.ConnFactory.instantiateFactories(ConnFactory.java:83)
	at org.apache.sqoop.ConnFactory.<init>(ConnFactory.java:60)
	at com.cloudera.sqoop.ConnFactory.<init>(ConnFactory.java:36)
	at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:203)
	at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:44)
	at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
	at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
	at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
{code}

We need a better error message than this.

    
> Improve the error message for bad connector files
> -------------------------------------------------
>
>                 Key: SQOOP-510
>                 URL: https://issues.apache.org/jira/browse/SQOOP-510
>             Project: Sqoop
>          Issue Type: Improvement
>    Affects Versions: 1.4.2
>            Reporter: Cheolsoo Park
>            Assignee: Cheolsoo Park
>             Fix For: 1.4.2
>
>
> This is related to SQOOP-505.
> If a connector file contains any lines that are not in the form of key=value, Sqoop fails with the following error:
> {code}
> 12/06/26 07:04:53 ERROR tool.BaseSqoopTool: Got error creating database manager: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> 	at java.lang.String.substring(String.java:1937)
> 	at org.apache.sqoop.ConnFactory.addManagersFromFile(ConnFactory.java:152)
> 	at org.apache.sqoop.ConnFactory.loadManagersFromConfDir(ConnFactory.java:224)
> 	at org.apache.sqoop.ConnFactory.instantiateFactories(ConnFactory.java:83)
> 	at org.apache.sqoop.ConnFactory.<init>(ConnFactory.java:60)
> 	at com.cloudera.sqoop.ConnFactory.<init>(ConnFactory.java:36)
> 	at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:203)
> 	at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:44)
> 	at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
> 	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
> 	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
> 	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
> 	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
> 	at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
> 	at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
> {code}
> We need a better error message than this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira