Reply
New Contributor
Posts: 2
Registered: ‎09-10-2016

Sqoop Import into Hive - Error with configuration

[ Edited ]

Hi,

 

I am trying to import data from a mysql table into hive and i am facing this error.

Could someone please help me overcome this problem?

 

I have searched for wrong version of xerces jar and don't have very old versions mixed up in my libraries.

Another post suggested to remove hsqldb jar present outside of CDH installation and that didn't help either.

I don't have core-default.xml in my system.

 

>sqoop import --connect jdbc:mysql://xxxxx:3306/gopidbp --username=hdp --password=xxxxx --table=accounts --hive-import --hive-table=default.acctcopy --target-dir=/user/root/sample -m 1 

The HIVE_HOME is /opt/cloudera/parcels/CDH/lib/hive/lib
The HIVE_CONF_DIR is /opt/cloudera/parcels/CDH/lib/hive/lib/../conf
Warning: /opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/bin/../lib/sqoop/../accumulo does not exist! Accumulo impor
ts will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
16/09/10 16:38:06 FATAL conf.Configuration: error parsing conf core-default.xml
javax.xml.parsers.ParserConfigurationException: Feature 'http://apache.org/xml/features/xinclude' is not recognized.
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2541)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2503)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2409)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:982)
at org.apache.sqoop.tool.SqoopTool.loadPluginsFromConfDir(SqoopTool.java:170)
at org.apache.sqoop.tool.SqoopTool.loadPlugins(SqoopTool.java:140)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:208)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
Exception in thread "main" java.lang.RuntimeException: javax.xml.parsers.ParserConfigurationException: Feature 'http://apache.org/xml/features/xinclude' is not recognized.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2659)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2503)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2409)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:982)
at org.apache.sqoop.tool.SqoopTool.loadPluginsFromConfDir(SqoopTool.java:170)
at org.apache.sqoop.tool.SqoopTool.loadPlugins(SqoopTool.java:140)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:208)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
Caused by: javax.xml.parsers.ParserConfigurationException: Feature 'http://apache.org/xml/features/xinclude' is not recognized.
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2541)

New Contributor
Posts: 2
Registered: ‎09-13-2016

Re: Sqoop Import into Hive - Error with configuration

Hi ,

 

One thing is core-default.xml will be available in the hadoop jar file. So it won't apper for you. 

 

And to resolve the issue try to remove old xercesImpl*.jar and copy the latest xercesImpl jar to skip from xm parsing configuration error.

New Contributor
Posts: 2
Registered: ‎09-10-2016

Re: Sqoop Import into Hive - Error with configuration

Thanks for responding..

 

I have another node in my cluster where sqoop works properly. 

I compared the xerces*.jars in both the nodes and they match exactly. So I am not sure the problem is with an old xerces* jar.

 

This seems like a configuration error because even "sqoop help" fails in this node.

Please help..

 

Explorer
Posts: 7
Registered: ‎09-08-2016

Re: Sqoop Import into Hive - Error with configuration

I am having the exact problem, did you find any solution.

 

Please take a look at https://community.cloudera.com/t5/Data-Ingestion-Integration/CDH-5-3-and-Sqoop2-startup-and-use-erro..., may help you. This one didn't solve my problem yet, still exploring.

 

Let me know if you find any solution

New Contributor
Posts: 1
Registered: ‎07-08-2016

Re: Sqoop Import into Hive - Error with configuration

I found that I had accidentally pulled in xalan-j2 and xerces-j2 while installing maven on that node. Uninstalling them using yum solved the issue.
New Contributor
Posts: 6
Registered: ‎03-25-2016

Re: Sqoop Import into Hive - Error with configuration

Were you able to find a solution? If so, please can you share it. After upgrading to CDH 5.9, we have encountered a similar issue.

 

Thanks

Champion
Posts: 422
Registered: ‎05-16-2016

Re: Sqoop Import into Hive - Error with configuration

error parsing conf core-default.xml

 to me this denotes there is some issue in XML file  either the tag is not properly closed or it is  not a proper XML. 

also please let us know the Jar version .

 

New Contributor
Posts: 6
Registered: ‎03-25-2016

Re: Sqoop Import into Hive - Error with configuration

This happens even if we do a simple "sqoop help" command. There is some information floating around in the replies and the fourm about multiple xercesImpl jars in the system, but no one seems to have a definitive answer!

 

New Contributor
Posts: 6
Registered: ‎03-25-2016

Re: Sqoop Import into Hive - Error with configuration

After upgrading to Java 8 and CDH 5.9, sqoop stopped working with the exception:

 

javax.xml.parsers.ParserConfigurationException: Feature 'http://apache.org/xml/features/xinclude' is not recognized.
 
the fix for us was to go to the /usr/bin/sqoop script and modify the line 

SQOOP_JARS=`ls -f /var/lib/sqoop/*.jar /usr/share/java/*.jar 2>/dev/null`

 

to 

 

SQOOP_JARS=`ls -f /opt/cloudera/parcels/CDH/lib/sqoop/lib/*.jar 2>/dev/null`

 

Stuff worked after this. The JDBC connectors can be added as needed. 

 

This workaround is kludgy, but it works for us

Announcements
New solutions