Jira 5.0.4 import from bugzilla fails

com.atlassian.jira.plugins.importer.SQLRuntimeException: Invalid value for getFloat() - ' ' in column 2
	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:177)
	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:146)
	at com.atlassian.jira.plugins.importer.imports.bugzilla.transformer.IssueTransformer.transform(IssueTransformer.java:181)
	at com.atlassian.jira.plugins.importer.imports.bugzilla.transformer.IssueTransformer.transform(IssueTransformer.java:33)
	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:164)
	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:146)
	at com.atlassian.jira.plugins.importer.imports.bugzilla.BugzillaDataBean.getIssuesIterator(BugzillaDataBean.java:85)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:741)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:354)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:27)
	at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:16)
	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:359)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61)
	at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160)
	at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:249)
	at java.lang.Thread.run(Thread.java:679)
Caused by: java.sql.SQLException: Invalid value for getFloat() - ' ' in column 2
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
	at com.mysql.jdbc.ResultSetImpl.getFloatFromString(ResultSetImpl.java:2631)
	at com.mysql.jdbc.ResultSetImpl.getNativeFloat(ResultSetImpl.java:4107)
	at com.mysql.jdbc.ResultSetImpl.getFloat(ResultSetImpl.java:2563)
	at com.mysql.jdbc.ResultSetImpl.getFloat(ResultSetImpl.java:2578)
	at com.atlassian.jira.plugins.importer.imports.bugzilla.transformer.WorklogTransformer.transform(WorklogTransformer.java:31)
	at com.atlassian.jira.plugins.importer.imports.bugzilla.transformer.WorklogTransformer.transform(WorklogTransformer.java:14)
	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:164)
	... 20 more

2 answers

1 accepted

This widget could not be displayed.

Ok! Finally i found solution! The problem lies here:

java.sql.SQLException: Invalid value for getFloat() - ' ' in column 2

Somewhere in database stored an empty string. MySQL JDBC driver tries to get that value as float and fails in com.mysql.jdbc.ResultSetImpl.java getFloatFromString method

I've got that drivers sources and modified, the code listed below works:
private final float parseFloatSkipErrors(String val)
            return Float.parseFloat(val);
        catch (NumberFormatException ex)
            return 0.0f;

    private final double parseDoubleSkipErrors(String val)
            return Double.parseDouble(val);
        catch (NumberFormatException ex)
            return 0.0f;

	private final float getFloatFromString(String val, int columnIndex)
			throws SQLException {
		try {
			if ((val != null)) {
				if (val.length() == 0) {
					return convertToZeroWithEmptyCheck();

				float f = parseFloatSkipErrors(val);

				if (this.jdbcCompliantTruncationForReads) {
					if (f == Float.MIN_VALUE || f == Float.MAX_VALUE) {
						double valAsDouble = parseDoubleSkipErrors(val);

						// Straight comparison is not reliable when at
						// absolute endpoints of Float.MIN_VALUE or 
						// Float.MAX_VALUE, so use epsillons with DOUBLEs

			            if ((valAsDouble < Float.MIN_VALUE - MIN_DIFF_PREC)
			                || (valAsDouble > Float.MAX_VALUE - MAX_DIFF_PREC)) {
			              throwRangeException(String.valueOf(valAsDouble), columnIndex,

				return f;

			return 0; // for NULL
		} catch (NumberFormatException nfe) {
			try {
				Double valueAsDouble = parseDoubleSkipErrors(val);
				float valueAsFloat = valueAsDouble.floatValue();
				if (this.jdbcCompliantTruncationForReads) {

					if (this.jdbcCompliantTruncationForReads && 
							valueAsFloat == Float.NEGATIVE_INFINITY ||
							valueAsFloat == Float.POSITIVE_INFINITY) {
								columnIndex, Types.FLOAT);

				return valueAsFloat;
			} catch (NumberFormatException newNfe) {
				; // ignore, it's not a number

			throw SQLError.createSQLException(
							+ val //$NON-NLS-1$
							+ Messages.getString("ResultSet.___in_column__201")
							+ columnIndex, SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor()); //$NON-NLS-1$

 All issues will be imported, but importer plugin is very raw. It doesn't maps custom things

This widget could not be displayed.

Hi Dmitry,

It seems that JIRA Importer plugin is trying to retrieve a float value, but instead the value on BugZilla is not a valid one.

Please raise a support case at https://support.atlassian.com because we're gonna need to take a look at your logs.

In the support case you create, please attach the following:

* Enable your SQL Logging

** You can do this via Administration > System > Troubleshooting and Support > Logging & Profiling (tab). Then enable the SQL log and then the SQL dump log. Make sure that both are enabled.

Once you have enabled the extra SQL Logging, replicate the problem and attach the following files to this ticket:
* The entirety of your latest [JIRA logs|] ({{$JIRA_HOME/log/atlassian-jira.log}}) and your application server log files:
** *UNIX:* {{$JIRA_INSTALL/logs/catalina.out}}
** *Windows:* {{$JIRA_INSTALL/logs/stdout}} and {{stderr}}

Also, please let us know which version of BugZilla you are using, which version of MySQL and driver, and the version of the JIRA Importers Plugin as well.



Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Jul 25, 2018 in Marketplace Apps

Jira Cloud and Bitbucket Cloud Integration with Microsoft Teams

One of the newest products in the Microsoft family - Microsoft Teams,  is a chat-based hub for teamwork that integrates all the people, content, and tools your team needs to be more engaged and ...

718 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you