Hello,
I am trying SQLToNoSQLImporter to import data to a couchDB database
from a Postgresql database.
I configured correctly the import.properties and db-data-config files.
When I execute run.bat command (I am using windows), I get the
following result:
07:50:14,568 INFO DataImporter:134 - Data Configuration loaded
successfully
07:50:18,477 ERROR DataImporter:178 - ***** Data import failed.
**********
Reason is :
org.apache.http.HttpException: HTTP/1.1 400 Bad Request
at
net.sathis.export.sql.couch.CouchWriter.post(CouchWriter.java:68)
at
net.sathis.export.sql.couch.CouchWriter.writeToNoSQL(CouchWriter.java:
52)
at net.sathis.export.sql.DocBuilder.execute(DocBuilder.java:
142)
at
net.sathis.export.sql.DataImporter.doFullImport(DataImporter.java:174)
at
net.sathis.export.sql.DataImporter.doDataImport(DataImporter.java:93)
at
net.sathis.export.sql.SQLToNoSQLImporter.main(SQLToNoSQLImporter.java:
19)
As you can see, the configuration file is loaded correctly. In the
couchDB database log file, I get the following error:
[debug] [<0.147.0>] Invalid JSON: {{error,
{126,
"lexical error: invalid bytes
in UTF8 string.\n"}},
<<"{\"docs\":[{\"_id\":\"0\",\"label
\":\"Pas de taches\"},{\"_id\":\"1\",\"description\":\"Le pourcentage
de recouvrement est < 2 %\",\"label\":\"Très peu nombreuses\"},{\"_id
\":\"2\",\"description\":\"Le p.......
I think the problem happens because the text contained in the table
has special characters ("è", etc.).
The postgresql database is coded in UTF-8.
Anyone can help me to solve this issue?
Thank you
Best regards