Upgrade Jira 6.2.7 to 7.2.3, Jenkins configuration -> manage Jenkins : NullPointerException
Description
Environment
Attachments
Activity

Yossi Sidi December 1, 2016 at 10:18 AM
Looks like problem is solved.
It was a null value related to the integration plugin new version.
To share my knowledge...
In the mysql server
==================
/etc/init.d/jira stop
mysql --user root
connect jiradb;
show tables;
Found in the tables list AO_3FB43F_SITE_MAPPING
mysql> describe AO_3FB43F_SITE_MAPPING;
--------------------------------------------+------------------------
Field | Type | Null | Key | Default | Extra |
--------------------------------------------+------------------------
APPLINK_ID | varchar(255) | YES |
| NULL |
|
AUTO_LINK | tinyint(1) | YES |
| NULL |
|
ID | int(11) | NO | PRI | NULL | auto_increment |
NAME | varchar(255) | YES |
| NULL |
|
SUPPORTS_BACK_LINK | tinyint(1) | YES |
| NULL |
|
SITE_TYPE | varchar(255) | YES |
| NULL |
|
RPC_URL | varchar(255) | YES |
| NULL |
|
USE_CRUMBS | tinyint(1) | YES |
| NULL |
|
USER | varchar(255) | YES |
| NULL |
|
DISPLAY_URL | varchar(255) | YES |
| NULL |
|
USER_TOKEN | varchar(255) | YES |
| NULL |
|
--------------------------------------------+------------------------
11 rows in set (0.01 sec)
mysql> select * from AO_3FB43F_SITE_MAPPING;
-------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------
APPLINK_ID | AUTO_LINK | ID | NAME | SUPPORTS_BACK_LINK | SITE_TYPE | RPC_URL | USE_CRUMBS | USER | DISPLAY_URL | USER_TOKEN |
-------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------
dbdc4687-ebf3-31c9-92a5-8f195aa74b84 | 0 | 3 | Jenkins | 1 | NULL | NULL | NULL | NULL | NULL | NULL |
-------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------
7 rows in set (0.00 sec)
update AO_3FB43F_SITE_MAPPING set NAME="Jenkin", SITE_TYPE="JENKINS", RPC_URL="http://jenkins-srv/", DISPLAY_URL="http://jenkins-srv/", USER="J-USER", USER_TOKEN="J-PASS" where ID=3;
/etc/init.d/jira start

Mark Rekveld November 30, 2016 at 10:35 AM
Hi ,
Code changes have been made to limit the effects of this bug that was released in 2.0.0.
Because of the problem in the database, its not possible to provide a fix that would always work.
I'm also no database expert, and am not sure which SQL comments you will need to update the documented fields in the table from the article, since this can be very database engine specific.

Yossi Sidi November 30, 2016 at 10:21 AM
Hi Mark,
Thank you for your quick reply.
I'm not a DB expert at all.
Is there a procedure I can run on my mysql db ? or set of known commands ?
Is there an expected date for an official fix instead of directly modify of the DB ?

Mark Rekveld November 30, 2016 at 9:33 AM
Hi ,
Please refer to the linked issue. This is a know issue and the linked issue has a link to a article that explains a workaround to fix it in the database.
Cheers, Mark
Details
Details
Assignee

Reporter

After Jira upgrade, trying to Jenkins configuration -> manage Jenkins sites,
I got:
An error occurred whilst rendering this message.
Please contact the administrators, and inform them of this bug.
Details: ------- org.apache.velocity.exception.MethodInvocationException: Invocation of method 'loadSites' in class org.marvelution.jira.plugins.jenkins.webwork.ConfigureJenkinsIntegration
threw exception java.lang.NullPointerException: Name is null
at com.marvelution.jira.plugins.jenkins:configuration_actions//templates/configure-jenkins.vm[line 38, column 36]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:282)
etc...
upgrade is on hold.
My Jenkins: Jenkins ver. 2.34