Opened 17 years ago

Closed 17 years ago

#987 closed defect (fixed)

NullPointerException in "Test with file" function if no "data header regexp" is specified

Reported by: Johan Vallon-Christersson Owned by: Martin Svensson
Priority: minor Milestone: BASE 2.7.1
Component: web Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

When using Annotation importer. Input file is small and contains two columns (attached). Choose to 'Test with file'. I knew that I had 2 data columns so I specified min/max. Click 'Parse the file' and get an error (below).

If I do not specify min/max data columns and click 'Parse the file' I do not receive the error.

If I specify Data header regexp '\QName Extract_Major_Type\E' and specify min/max data columns I do not receive the error.


Unexpected error
java.lang.NullPointerException on page /onk/common/plugin/parse_file.jsp
	
Version 	BASE 2.6.1 (build #4191; schema #52)
Web server 	Apache Tomcat/5.5.26
Database Server 	MySQL 5.0.51a-log
Database Dialect 	org.hibernate.dialect.MySQLInnoDBDialect
JDBC Driver 	com.mysql.jdbc.Driver (version 5.0)
Java runtime 	Java(TM) SE Runtime Environment (1.6.0_04-b12), Sun Microsystems Inc.
Operating system 	Linux i386 2.6.18-53.1.14.el5PAE
Memory 	Total: 82.3 MB
Free: 9.3 MB
Max: 976.5 MB
Browser 	Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Error message 	
Stack trace 	

java.lang.NullPointerException
...at org.apache.jsp.common.plugin.parse_005ffile_jsp._jspService(parse_005ffile_jsp.java:557)
...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

Attachments (1)

extract.export.txt (474 bytes ) - added by Johan Vallon-Christersson 17 years ago.
File for annotation import

Download all attachments as: .zip

Change History (8)

by Johan Vallon-Christersson, 17 years ago

Attachment: extract.export.txt added

File for annotation import

comment:1 by Johan Vallon-Christersson, 17 years ago

Summary: Annotation importer - error when testing to parse file without Data header regexp by with specified max/min data columnsAnnotation importer - error when testing to parse file without Data header regexp but with specified max/min data columns

comment:2 by Johan Vallon-Christersson, 17 years ago

Description: modified (diff)

comment:3 by Johan Vallon-Christersson, 17 years ago

Description: modified (diff)

comment:4 by Nicklas Nordborg, 17 years ago

Component: corepluginsweb
Description: modified (diff)
Priority: majorminor
Summary: Annotation importer - error when testing to parse file without Data header regexp but with specified max/min data columnsNullPointerException in "Test with file" function if no "data header regexp" is specified

It happens because the functionality in the "Column mappings tab" depends on the presence of a data header. Since no regexp is specified we can of course not find any header. Instead we should fall back to mapping columns by index.

comment:5 by Jari Häkkinen, 17 years ago

Milestone: BASE 2.7.1

comment:6 by Martin Svensson, 17 years ago

Owner: changed from everyone to Martin Svensson
Status: newassigned

comment:7 by Martin Svensson, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [4303]) Fixes #987 NullPointerException in "Test with file" function if no "data header regexp" is specified

Note: See TracTickets for help on using tickets.