Ticket #285 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Importer stops working after first step

Reported by: business@… Owned by: business@…
Priority: blocker Milestone: 0.6.5
Component: Import wizard Version: 0.6.3
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

The importer seems to have completely died after the refactorings and changes last Thursday. After the first steps, it gives various error messages:

2011-01-24 15:30:24,132 [TP-Processor8] ERROR builder.ClosureInvokingAction  - Exception occured invoking flow action: Your InputStream was neither an OLE2 stream, nor an OOXML stream
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:65)
	at org.apache.poi.ss.usermodel.WorkbookFactory$create.call(Unknown Source)
	at dbnp.importer.ImporterService.getWorkbook(ImporterService.groovy:42)
	at dbnp.importer.ImporterService$$FastClassByCGLIB$$3550d3b5.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at dbnp.importer.ImporterService$$EnhancerByCGLIB$$9d0e78d9.getWorkbook(<generated>)
	at dbnp.importer.ImporterService$getWorkbook.call(Unknown Source)
	at dbnp.importer.ImporterController.fileImportPage(ImporterController.groovy:336)
	at dbnp.importer.ImporterController$_closure2_closure14_closure23.doCall(ImporterController.groovy:143)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
	at java.lang.Thread.run(Thread.java:662)
2011-01-24 14:05:26,411 [TP-Processor7] ERROR builder.ClosureInvokingAction  - Exception occured invoking flow action: Cannot invoke method getCell() on null object
java.lang.NullPointerException: Cannot invoke method getCell() on null object
Caused by: java.io.FileNotFoundException: /home/tomcat/apache-tomcat-test/webapps/gscf-0.6.4-test/fileuploads (Is a directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at dbnp.importer.ImporterController.fileImportPage(ImporterController.groovy:336)
at dbnp.importer.ImporterController$_closure2_closure14_closure23.doCall(ImporterController.groovy:143)
... 6 more

Change History

Changed 3 years ago by work@…

  • status changed from new to assigned
  • owner changed from business@… to t.w.abma@…

Changed 3 years ago by work@…

  • milestone set to 0.7

Changed 3 years ago by work@…

  • component changed from Unknown to Import wizard

Changed 3 years ago by business@…

This only seems to happen when you use the attachment of #278 (NTC_Experiment_test4.xls)

Changed 3 years ago by t.w.abma@…

  • owner changed from t.w.abma@… to business@…

Null-rows are now ignored, tested with NTC_Experiment_test4.xls sheet and could persist all rows.

Changed 3 years ago by business@…

  • owner changed from business@… to t.w.abma@…

Yes, now this works for me too (tested on CI). However, if you upload for example an HTML file (which is not a valid Excel file of course) with an .xls extension (or any other extension) you still get this problem. It should just catch the error and give a proper user message such as 'Invalid or unrecognized file format.' See the first stack trace in the ticket. In principle, wherever you rely on external input such as uploaded files you should always catch errors.

Changed 3 years ago by t.w.abma@…

  • owner changed from t.w.abma@… to business@…

Uploaded file in import wizard now checked for being an Excel (formatted) file, other file (formats) will display a popup with an error message

Changed 3 years ago by business@…

  • milestone changed from 0.7 to 0.6.4

Changed 3 years ago by jannekevdp@…

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.