Project Export Error - The index 13 is out of range

I have successfully been able to export a number of projects from the Developer Edition instance to import into the Enterprise Edition but unfortunately I have 8 projects which I receive the same Index 13 is out of range error message when viewing the error log. Looked at the logs on the server and the remaining lines did not add anything extra of note).

Appreciate if anyone has any suggestions, all project using the same SQL Server, nothing different that I can spot about the languages being used or the number of lines of code etc.

Error Details

java.lang.IllegalStateException: Ad-hoc rules export failed after processing 0 rules successfully
	at org.sonar.ce.task.projectexport.rule.ExportAdHocRulesStep.execute(ExportAdHocRulesStep.java:87)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:80)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:71)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:58)
	at org.sonar.ce.task.projectexport.ProjectExportProcessor.process(ProjectExportProcessor.java:35)
	at org.sonar.ce.task.projectexport.taskprocessor.ProjectExportTaskProcessor.processProjectExport(ProjectExportTaskProcessor.java:62)
	at org.sonar.ce.task.projectexport.taskprocessor.ProjectExportTaskProcessor.process(ProjectExportTaskProcessor.java:49)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The index 13 is out of range.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:237)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.verifyValidColumnIndex(SQLServerResultSet.java:600)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getterGetColumn(SQLServerResultSet.java:2048)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2077)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2063)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2349)
	at org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
	at org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
	at org.sonar.ce.task.projectexport.util.ResultSetUtils.defaultIfNull(ResultSetUtils.java:31)
	at org.sonar.ce.task.projectexport.rule.ExportAdHocRulesStep.convertToAdHocRule(ExportAdHocRulesStep.java:110)
	at org.sonar.ce.task.projectexport.rule.ExportAdHocRulesStep.execute(ExportAdHocRulesStep.java:80)
	... 21 more

Hi,

Welcome to the community!

We don’t support project export from Developer Editon. So I guess you did some DB magic? You may just need to roll that back and contact your sales rep to see about getting a temporary license upgrade for the DE server so you can do this move in a supported way.

(BTW, it’s always helpful to state your SQ version up front.)

 
Ann

Thank you Ann.

There may be some confusion as I believe you do support Project Export from Developer Edition, but correct you dont support Project Import for that to work you have to be Enterprise Edition.

The version in use is 9.5.0.56709

Hi,

You’re right! I forgot that we moved export into DE. So sorry about that! So to confirm, you used the native export feature to get the project out of your DE instance and then used Enterprise’s native import functionality to pull the project in…?

Also:

  • There were no errors on import?
  • There were no errors on subsequent restart? (If you’ve restarted since then…?)
  • You see an error when one of these imported projects is subsequently analyzed in the EE instance?

Do you see any comonalities / patterns across the 8 projects?

 
Ann

Ann

I am struggling with the naitive export from DE for 8 projects, the other 14 projects I have on this DE server exported without issue. I was then able to successfully import into EE (other than Fixed issues dont appear to have come across, but not worried about that right now).

The projects which work and dont work are similar mix of languages and number of lines.

Almost sounds like it is data related but one of the projects has not had any issues commented on so it isnt related to user input.

Any ideas what Index 13 is referring to?

Regards
Paul

Hi Paul,

No clue yet. That’s why I’m trying to draw out as much information as possible. And, I’ve flagged this for more expert attention. While we wait for them to get here, I’m going to see if we can find anything pertinent…

To be clear, you did export them and are having trouble after the import into your EE?

Could you check the project key and project name lengths on the 8?

 
Ann

Ann

Thank you

To be clear it is failing in under 1 second after clicking Export, if click on the See Details then can see the 400-600ms it took to fail and Index 13 error.

The project key name and lengths on the 8 are the same and in some cases shorter than the ones that worked.

1 Like

Hi Paul,

Thanks for reporting the issue.
It relates to a bug that we’ve already identified (SONAR-16643) and that will be fixed with SonarQube 9.6.

Chris

Chris

Thank you for confirming the issue and that it has been resolved. What is the realistic release date for 9.6 as this is now a blocker to my migration project?

Regards
Paul

Hey Paul,

SonarQube 9.6 is currently planned for mid-August.

Chris

Chris

Thankyou.

Is there anything I can do to workaround the issue given it is a one time function and it is only affecting 8 projects so can run scripts to ‘tweak’ sql as needed?

Regards
Paul

Hi Paul,

The problem is linked to the fact that some third-party issues generated by an external analyzer are imported into these projects (Importing Third-Party Issues | SonarQube Docs).
I don’t know any specific workaround, except maybe temporarily stop importing these issues if you are doing it explicitly.

Out of curiosity, why are you doing an export of your projects into your Enterprise Edition? Can’t you make an upgrade, for example from on a copy of your Developer Edition database?

Chris

Chris

Thank you. I will have to wait then until you release 9.6

The reason I cant upgrade is that I already have an Enterprise Server used for other teams and now moving the Developer Edition projects to consolidate.

Regards
Paul

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.