Hi Isomorphic,
I'm using DataImporter from a servlet with v10.1p_2016-04-12.
I'm switching to a importDataSourceRecords()-overload with columnRemap-parameter (this one).
Before it worked as expected. The columnRemap is built with this code:
I now get an exception in importDataSourceRecords()-code where you can tell me for sure what is going wrong:
Thank you & Best regards
Blama
I'm using DataImporter from a servlet with v10.1p_2016-04-12.
I'm switching to a importDataSourceRecords()-overload with columnRemap-parameter (this one).
Before it worked as expected. The columnRemap is built with this code:
Code:
private Map<String, String> getImportColumnMapping(String importDS) throws Exception { Map<String, String> columnMap = new LinkedHashMap<String, String>(); DataSource uploadDS = DataSourceManager.get(importDS); for (String fieldName : uploadDS.getFieldNames()) { DSField field = uploadDS.getField(fieldName); String uploadFieldName = field.getProperty("uploadFieldName"); if (uploadFieldName != null) columnMap.put(fieldName, uploadFieldName); } DataSourceManager.free(uploadDS); return columnMap; }
Code:
[B]java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at com.isomorphic.tools.DataImport.importToRows(DataImport.java:1191) at com.isomorphic.tools.DataImport.importDataSourceRecords(DataImport.java:903) at com.isomorphic.tools.DataImport.importDataSourceRecords(DataImport.java:775)[/B] at com.lmscompany.lms.server.ReceiveMail.receiveEmail(ReceiveMail.java:207) at com.lmscompany.lms.server.ReceiveMail.doGet(ReceiveMail.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:260) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
Blama
Comment