Details
Description
Ad loader jar file is unable to load Ad files that contain data within double quotes like these
"Great Service, Competitive Pricing."
Command used to run the Ad loader:
[amlops@aml-qa7-monman1 adloader]$ java -jar aml-ad-load-cli-1.0.1-giraffe-20160715.225822-4-jar-with-dependencies.jar -d /backup/amlops_QA4/US_Taxonomy/business_taxonomy/sem/ads_giraffee/eta -h aml-qa4-mysql1:3306 -u spike -l 2
Error in the log:
2016-11-16 07:40:31 ERROR AdLoaderWorker:69 - Error running AdLoaderWorker for /backup/amlops_QA4/US_Taxonomy/business_taxonomy/sem/ads_giraffee/eta/etas-banquet_facilities-182-11160-0.csv
java.lang.RuntimeException: java.io.IOException: (line 82) invalid char between encapsulated token and delimiter
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:444)
at org.apache.commons.csv.CSVParser$1.hasNext(CSVParser.java:454)
at com.admaxlocal.content.AdLoaderWorker.parseCsv(AdLoaderWorker.java:101)
at com.admaxlocal.content.AdLoaderWorker.call(AdLoaderWorker.java:65)
at com.admaxlocal.content.AdLoaderWorker.call(AdLoaderWorker.java:32)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.IOException: (line 82) invalid char between encapsulated token and delimiter
at org.apache.commons.csv.Lexer.parseEncapsulatedToken(Lexer.java:275)
at org.apache.commons.csv.Lexer.nextToken(Lexer.java:152)
at org.apache.commons.csv.CSVParser.nextRecord(CSVParser.java:500)
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:441)
... 9 more
2016-11-16 07:40:31 INFO AdLoaderWorker:61 - --------------- pool-1-thread-3 - Starting AdLoaderWorker for /backup/amlops_QA4/US_Taxonomy/business_taxonomy/sem/ads_giraffee/eta/etas-parking_lot_and_driveway_sealing-48-12589-0.csv
2016-11-16 07:40:31 INFO ContentGroupDAO:47 - Inside getContentGroup : ContentTypeID [9] BusinessAreaID [12589] LocationID [0] LocationType [0] Language [2] SubGroupID [0]
2016-11-16 07:40:31 ERROR AdLoaderWorker:69 - Error running AdLoaderWorker for /backup/amlops_QA4/US_Taxonomy/business_taxonomy/sem/ads_giraffee/eta/etas-gazebos-98-11314-0.csv
java.lang.RuntimeException: java.io.IOException: (line 322) invalid char between encapsulated token and delimiter
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:444)
at org.apache.commons.csv.CSVParser$1.hasNext(CSVParser.java:454)
at com.admaxlocal.content.AdLoaderWorker.parseCsv(AdLoaderWorker.java:101)
at com.admaxlocal.content.AdLoaderWorker.call(AdLoaderWorker.java:65)
at com.admaxlocal.content.AdLoaderWorker.call(AdLoaderWorker.java:32)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.IOException: (line 322) invalid char between encapsulated token and delimiter
at org.apache.commons.csv.Lexer.parseEncapsulatedToken(Lexer.java:275)
at org.apache.commons.csv.Lexer.nextToken(Lexer.java:152)
at org.apache.commons.csv.CSVParser.nextRecord(CSVParser.java:500)
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:441)
... 9 more
Example files that fail to load:
etas-banquet_facilities-182-11160-0.csv
etas-gazebos-98-11314-0.csv
Refer jira id parseCsv for details about Ad loader.