[JIRA] 从低版本升级到高版本(3.6.2->6.0.8)

 前言:

JIRA是Atlassian公司出品的项目与事务跟踪工具,被广泛应用于缺陷跟踪、客户服务、需求收集、流程审批、任务跟踪、项目跟踪和敏捷管理等工作领域。

公司原来用的是JIRA 3.6.2版本,Atlassian官方已不推荐使用JIRA 4.4之前的版本,之前的版本有漏洞也已不再更新,同事已经安装好了JIRA6.0.8版本,新版的JIRA界面扁平化设计,支持移动端浏览,很符合移动互联网企业的风格,现在JIRA升级到了新的版本JIRA 6.1.7,但是在迁移数据的时候,直接从3.6.2迁移到6.0.8失败,google了很久,才发现需要在4.4.5上面将数据转换一下,在此记录一下数据迁移步骤。

思路:(1),安装Jira4.4.5;(2),将Jira3.6.2的数据导入到Jira4.4.5后再导出;(3),再将从4.4.5导出的数据导入到6.0.8版本中,这样就完成了数据的迁移工作,升级也完成了。
      准备工作,JIRA3.6.2以及JIRA6.0.8已经安装,还需要安装的是中间的过度版本4.4.5


1,下载Jira4.4.5

Jira下载地址:http://pan.baidu.com/s/1eQcQeL8


2,安装Jira4.4.5

[root@name01 ~]# tar -xvf atlassian-jira-4.4.5.tar.gz

[root@name01 ~]# cd atlassian-jira-4.4.5-standalone/

[root@name01 atlassian-jira-4.4.5-standalone]# find / -name start-jira.sh

/root/atlassian-jira-4.4.5-standalone/bin/start-jira.sh

[root@name01 atlassian-jira-4.4.5-standalone]#

[root@name01 atlassian-jira-4.4.5-standalone]#

[root@name01 atlassian-jira-4.4.5-standalone]# /root/atlassian-jira-4.4.5-standalone/bin/start-jira.sh

To run JIRA in the foreground, start the server with start-jira.sh -fg

Server startup logs are located in /root/atlassian-jira-4.4.5-standalone/logs/catalina.out

executing as current user

 

      MMMMMMMMMMM .,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMM. OMM. ~MM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMDMMZ7MMMMMMMMN7DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMDMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMZ  IMMM ..MMN= ,8MO   8   IN     +DM8    ?MMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMM ..OI . 8I...MMMO   8   IN       M7    ,MMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMN,   .   +MMMMMO   8   IN  =O   M~  ~..$MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMM~...  +MMMMMMO   8   IN  . . IN   I..+MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMMMI . OMMMMMMMO   8   IN  :=  ,O  =8   MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMD ...  .MMMMMMO   8   IN  =O   +      .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMM,  =N. .7MMMM~.   8   IN  =O   :. =M. .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMM, . MMD. .+MMM=  :$M   IN  =O   ,  IM: .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

 

 __  __               __                        _                           __

 \ \/ /___  __  __   / /_  ____ __   _____     (_)___________  _____  _____/ /

  \  / __ \/ / / /  / __ \/ __ `/ | / / _ \   / / ___/ ___/ / / / _ \/ ___/ /

  / / /_/ / /_/ /  / / / / /_/ /| |/ /  __/  / (__  |__  ) /_/ /  __(__  )_/ 

 /_/\____/\__,_/  /_/ /_/\__,_/ |___/\___/  /_/____/____/\__,_/\___/____(_)  

 

JIRA Standalone Edition

   Version : 4.4.5

              

Detecting JVM PermGen support...

PermGen switch is supported. Setting to 256m

 

If you encounter issues starting or stopping JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide

 

Using CATALINA_BASE:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_HOME:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp

Using JRE_HOME:        /usr/lib/jvm/jdk1.7.0_60/jre

Using CLASSPATH:       /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar

Using CATALINA_PID:    /root/atlassian-jira-4.4.5-standalone/work/catalina.pid

[root@name01 atlassian-jira-4.4.5-standalone]#

 

3Jira4.4.5配置过程

安装完后可以直接访问http://192.168.171.230:8080/,进行Jira配置步骤。


3.1,访问报错问题


如果访问出现该页面,是因为我们还没有配置JIRA HOME的路径,需要设置java_home路径,先去查看下JAVA_HOME路径为:

[root@name01 atlassian-jira-4.4.5-standalone]# echo $JAVA_HOME

/usr/lib/jvm/jdk1.7.0_60

[root@name01 atlassian-jira-4.4.5-standalone]#

找到jira的配置文件

[root@name01 atlassian-jira-4.4.5-standalone]# find /root/atlassian-jira-4.4.5-standalone -name jira-application.properties

/root/atlassian-jira-4.4.5-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties

[root@name01 atlassian-jira-4.4.5-standalone]#

[root@name01 atlassian-jira-4.4.5-standalone]# vim /root/atlassian-jira-4.4.5-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties

# Do not modify this file unless instructed. It is here to store the location of the JIRA home directory only and is typically written to by the installer.

jira.home = /usr/lib/jvm/jdk1.7.0_60

 

在jira.home = 后面添加上JAVA_HOME的路径,保存配置文件后再重启JIRA。

3.2,配置好jira.home后重启Jira

[root@name01 atlassian-jira-4.4.5-standalone]# /root/atlassian-jira-4.4.5-standalone/bin/shutdown.sh

 

      MMMMMMMMMMM .,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMM. OMM. ~MM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMDMMZ7MMMMMMMMN7DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMDMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMZ  IMMM ..MMN= ,8MO   8   IN     +DM8    ?MMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMM ..OI . 8I...MMMO   8   IN       M7    ,MMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMN,   .   +MMMMMO   8   IN  =O   M~  ~..$MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMM~...  +MMMMMMO   8   IN  . . IN   I..+MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMMMI . OMMMMMMMO   8   IN  :=  ,O  =8   MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMD ...  .MMMMMMO   8   IN  =O   +      .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMM,  =N. .7MMMM~.   8   IN  =O   :. =M. .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMM, . MMD. .+MMM=  :$M   IN  =O   ,  IM: .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

 

 __  __               __                        _                           __

 \ \/ /___  __  __   / /_  ____ __   _____     (_)___________  _____  _____/ /

  \  / __ \/ / / /  / __ \/ __ `/ | / / _ \   / / ___/ ___/ / / / _ \/ ___/ /

  / / /_/ / /_/ /  / / / / /_/ /| |/ /  __/  / (__  |__  ) /_/ /  __(__  )_/ 

 /_/\____/\__,_/  /_/ /_/\__,_/ |___/\___/  /_/____/____/\__,_/\___/____(_)  

 

JIRA Standalone Edition

   Version : 4.4.5

                 

Detecting JVM PermGen support...

PermGen switch is supported. Setting to 256m

 

If you encounter issues starting or stopping JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide

 

Using CATALINA_BASE:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_HOME:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp

Using JRE_HOME:        /usr/lib/jvm/jdk1.7.0_60/jre

Using CLASSPATH:       /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar

Using CATALINA_PID:    /root/atlassian-jira-4.4.5-standalone/work/catalina.pid

[root@name01 atlassian-jira-4.4.5-standalone]#

 

再重新启动jira:

[root@name01 atlassian-jira-4.4.5-standalone]# /root/atlassian-jira-4.4.5-standalone/bin/start-jira.sh

 

To run JIRA in the foreground, start the server with start-jira.sh -fg

 

Server startup logs are located in /root/atlassian-jira-4.4.5-standalone/logs/catalina.out

executing as current user

 

      MMMMMMMMMMM .,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMM. OMM. ~MM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMDMMZ7MMMMMMMMN7DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMDMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMZ  IMMM ..MMN= ,8MO   8   IN     +DM8    ?MMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMM ..OI . 8I...MMMO   8   IN       M7    ,MMMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMN,   .   +MMMMMO   8   IN  =O   M~  ~..$MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMM~...  +MMMMMMO   8   IN  . . IN   I..+MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMMMI . OMMMMMMMO   8   IN  :=  ,O  =8   MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMD ...  .MMMMMMO   8   IN  =O   +      .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMM,  =N. .7MMMM~.   8   IN  =O   :. =M. .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMM, . MMD. .+MMM=  :$M   IN  =O   ,  IM: .MMMMMMMMMMMMMMMMMMMMMMMM

      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

 

 __  __               __                        _                           __

 \ \/ /___  __  __   / /_  ____ __   _____     (_)___________  _____  _____/ /

  \  / __ \/ / / /  / __ \/ __ `/ | / / _ \   / / ___/ ___/ / / / _ \/ ___/ /

  / / /_/ / /_/ /  / / / / /_/ /| |/ /  __/  / (__  |__  ) /_/ /  __(__  )_/ 

 /_/\____/\__,_/  /_/ /_/\__,_/ |___/\___/  /_/____/____/\__,_/\___/____(_)  

 

JIRA Standalone Edition

   Version : 4.4.5

                  

Detecting JVM PermGen support...

PermGen switch is supported. Setting to 256m

 

If you encounter issues starting or stopping JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide

 

Using CATALINA_BASE:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_HOME:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp

Using JRE_HOME:        /usr/lib/jvm/jdk1.7.0_60/jre

Using CLASSPATH:       /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar

Using CATALINA_PID:    /root/atlassian-jira-4.4.5-standalone/work/catalina.pid

[root@name01 atlassian-jira-4.4.5-standalone]#

 

3.3,配置jira数据库

再次访问http://192.168.171.xxx:8080/,如下显示正常:


点击下一步,录入各项信息,准备创建DB



3.4,报错信息


JIRA Startup Failed

Gadget Directory Plugin (com.atlassian.gadgets.directory)

Atlassian OAuth Admin Plugin (com.atlassian.oauth.admin)Atlassian JIRA - Plugins - Shared Application Access Layer (SAL) Plugin (com.atlassian.sal.jira)Atlassian JIRA - Plugins - Look And Feel Logo Upload Plugin (com.atlassian.jira.lookandfeel)Atlassian REST - Module Types (com.atlassian.plugins.rest.atlassian-rest-module)Atlassian JIRA - Plugins - REST Plugin (com.atlassian.jira.rest)Opensocial Plugin (com.atlassian.gadgets.opensocial)

 

重新关闭启动,报错如下:

……

Using CATALINA_BASE:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_HOME:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp

Using JRE_HOME:        /usr/lib/jvm/jdk1.7.0_60/jre

Using CLASSPATH:       /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar

Using CATALINA_PID:    /root/atlassian-jira-4.4.5-standalone/work/catalina.pid

Existing PID file found during start.

Tomcat appears to still be running with PID 32194. Start aborted.

[root@name01 logs]#

Kill 掉已经存在的进程32194

[root@name01 logs]# kill -9 32194

[root@name01 logs]#

再重新启动jira进程,启动信息如下:

Using CATALINA_BASE:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_HOME:   /root/atlassian-jira-4.4.5-standalone

Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp

Using JRE_HOME:        /usr/lib/jvm/jdk1.7.0_60/jre

Using CLASSPATH:       /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar

Using CATALINA_PID:    /root/atlassian-jira-4.4.5-standalone/work/catalina.pid

Existing PID file found during start.

Removing/clearing stale PID file.

[root@name01 logs]#

 

查看日志文件,有如下信息:

[root@name01 logs]# more catalina.out

九月 11, 2014 5:41:41 下午 org.apache.catalina.core.AprLifecycleListener init

信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/l

ib64:/lib:/usr/lib

九月 11, 2014 5:41:41 下午 org.apache.coyote.http11.Http11Protocol init

信息: Initializing Coyote HTTP/1.1 on http-8080

九月 11, 2014 5:41:41 下午 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 1007 ms

九月 11, 2014 5:41:41 下午 org.apache.catalina.realm.JAASRealm setContainer

信息: Set JAAS app name Catalina

九月 11, 2014 5:41:41 下午 org.apache.catalina.core.StandardService start

信息: Starting service Catalina

九月 11, 2014 5:41:41 下午 org.apache.catalina.core.StandardEngine start

信息: Starting Servlet Engine: Apache Tomcat/6.0.32

2014-09-11 17:41:43,504 main INFO      [jira.config.database.SystemTenantDatabaseConfigurationLoader] Reading database configuration from/usr/lib/jvm/jdk1.7.0_60/dbconfig.xml

2014-09-11 17:41:44,076 main INFO      [atlassian.jira.startup.JiraStartupLogger]

 

删除这个dbconfig.xml,关闭jira,然后再重新启动,这回启动正常了,如下所示:

 

看见这个页面就表示JIRA服务正常启动了,接下来是根据安装向导配置安装的过程。

 

3.5,重新配置DB过程

看Database Configuration,有Internal和External二个选择项,我们要使用External,选择外部数据库。

 

先建立jira数据库以及账号密码:

mysql>

mysql> create database jira445;

Query OK, 1 row affected (0.00 sec)

 

mysql>

mysql> GRANT ALL ON jira445.* TO jira_user@'%' IDENTIFIED BY 'jira_user1809';

Query OK, 0 rows affected (0.16 sec)

 

mysql>

 

在界面配置好数据库连接信息,如下图所示:

 

随手点击一下“Test Connection”测试下数据库连接,连接正常,如下所示:

 

点击下一按钮,报错如下:

javax.servlet.ServletException: com.atlassian.util.concurrent.LazyReference$InitializationException: com.opensymphony.module.propertyset.PropertyImplementationException: SQL Exception while executing the following:SELECT ID, ENTITY_NAME, ENTITY_ID, PROPERTY_KEY, propertytype FROM propertyentry WHERE ENTITY_NAME=? AND ENTITY_ID=? (Table 'jira445.propertyentry' doesn't exist)

 

去下载:

# wget -c href="http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.29.tar.gz

# tar zxvf mysql-connector-java-5.1.29.tar.gz

将解压后目录中的mysql-connector-java-5.1.29-bin.jar拷贝到JIRA的lib目录/opt/atlassian-jira-4.4.5-standalone/lib/中

 

重启jira,还是报一样的错误。

 

去查看jira的error log信息,看到如下信息:

[root@name01 logs]# more /root/atlassian-jira-4.4.5-standalone/logs/catalina.out

……

CREATE TABLE portletconfiguration (ID DECIMAL(18,0) NOT NULL, PORTALPAGE DECIMAL(18,0), PORTLET_ID VARCHAR(255), COLUMN_NUMBER DECIMAL(9,0), positionseq DECIMAL(9,0), GADGET_XML TEXT, COLOR V

ARCHAR(255), CONSTRAINT PK_portletconfiguration PRIMARY KEY (ID))

Error was: java.sql.SQLException: The MySQL server is running with the --read-only option so it cannot execute this statement

 

【】将数据库设置成不是read-only的方式。

mysql> set global read_only =0;

Query OK, 0 rows affected (0.01 sec)

 

mysql>

 

之后重建jira445库,重启jira,再重新初始化数据库:

 

在下一页么,输入授权码:

授权码为:

AAABMQ0ODAoPeJxtUMlOwzAQvfsrLHF2laSlVStZwiQ+hGZTFlS4mTAFo8SJbKeif0/StAcQ0lxm3

rxl5q4cABfQY3c91m652a022C9K7DnuCgVgai17KztFn8KcoS+pxSIZ2jfQ6bEyoA0lLvI1iGknE

BboRCTOlrhr5HfKitomogXaNxN3Fhhn8gTU6gFuOzwWsqFWthPd2breg+3aRd21iJ9EM1zk6VE0B

maJSNagDJTnHi7yfhrHPPdDFv3C+bu8MHlS8jzLw4KjZkaex+wT4qHRWVlQQtXAv3upz/MZy+WGu

B7x7lHBE/qSVjhme45jjhkuWIAzlgRsgVL9IZQ0c8C+wRaMRQXoE+gwoI9pdSD8wPYkfQ0zcogyj

q7RRjQKg1v3v3M26PpTGPjz2B8tAYyAMCwCFGiKwG9qA+2ksL7mkMIrV80z+un8AhRu0CryeqTv8

LIZstOPg/B3240BnQ==X02fb

 

点击“下一”按钮,进行下一步操作,设置管理员账户,用户名admin密码admin

 

下一步,暂时不设置邮件通知:

点击下一步,报错如下3.6小节所示:

3.6JIRA Access Constraints 错误处理

You cannot access JIRA at present.

描述

Time

Level

Exception

The current license is too old to install this version of JIRA (4.4.5)

Edit License or proceed under Evaluation Terms

 

点击 Edit License or proceed under Evaluation Terms 进去,需要填入授权码,重新Proceed才行,


进入 https://my.atlassian.com/license/evaluation页面,登录进去,选择Licen 进去,

选择Jira(Server)

然后下一步,再输入Server ID和Organization Name的值,点击“Generate License”按钮,创建授权码,如下所示:

 


之后然后生成授权码,Evaluations New Evaluation License点击后面的New Evaluation License,进去看到右边的授权码:

AAABBw0ODAoPeNptkFtLxDAQhd/zKwI+R9Kwy66FPKxthGhvtF0p4kuso0a6sUwvuP/edissyj4MD

HPOfHOYqzu0tICWeoJy4a+FzzkNwpIK7q1ICF2Ntu3tl5P3Ot89+1SNphnMPCEBwqkJTQ9y9jN+w

zxBPi2a68jW4DpQr/a0rZJS5VmuC0XOBNnjAH/s5bGFxBxABmkcqzzQu2jRTd3bEZaFZvE+AnYzR

JDYWNeDM64G9d1aPJ4TeXxOlOK7cbZbjrbNgkyGwwtg+rbvJpBkHikAR0Adytt0XzFV7R5Y+qQzV

kWZIoVK5FQsWq03YrvdkN/Ekz3S4SXlcpRswPrDdPD/aT+P1nzDMC0CFQCM9+0LlHVNnZQnSTwuR

O3eK+2gVgIUCteTs4Q3khIgrnsY64hxYB/d8bM=X02dh

 

然后把激活授权码copy出来,录入到授权码输入框,点击Proceed按钮,出现如下提示,表示成功:

Update License

Your license has been successfully updated. Please restart your server so that all necessary changes can take effect.

Changes will not take place until server is restarted.

Click here when the server is restarted.

3.7,访问报错

重启jira,然后输入http://192.168.171.xxx:8080/登录报错如下:

JIRA Startup Failed

You cannot access JIRA at present. Look at the table below to identify the reasons

 

Description

The following plugins are required by JIRA, but have not been started:

  • Gadget Directory Plugin (com.atlassian.gadgets.directory)
  • Atlassian JIRA - Plugins - Project Config Plugin (com.atlassian.jira.jira-project-config-plugin)
  • Atlassian OAuth Admin Plugin (com.atlassian.oauth.admin)
  • Embedded Gadgets Plugin (com.atlassian.gadgets.embedded)
  • Atlassian JIRA - Plugins - Shared Application Access Layer (SAL) Plugin (com.atlassian.sal.jira)
  • Gadget Dashboard Plugin (com.atlassian.gadgets.dashboard)
  • Atlassian JIRA - Plugins - Look And Feel Logo Upload Plugin (com.atlassian.jira.lookandfeel)
  • Atlassian JIRA - Plugins - Gadgets Plugin (com.atlassian.jira.gadgets)
  • Atlassian REST - Module Types (com.atlassian.plugins.rest.atlassian-rest-module)
  • Gadget Spec Publisher Plugin (com.atlassian.gadgets.publisher)
  • Atlassian JIRA - Plugins - REST Plugin (com.atlassian.jira.rest)
  • Atlassian OAuth Service Provider Plugin (com.atlassian.oauth.serviceprovider)
  • Opensocial Plugin (com.atlassian.gadgets.opensocial)

去查看后台tomcat日志

2014-09-12 16:48:46,012 main ERROR      [atlassian.plugin.manager.PluginEnabler] Unable to enable plugin com.atlassian.sal.jira

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.Comparable

         at org.apache.felix.framework.resolver.CandidateComparator.compare(CandidateComparator.java:46)

         at org.apache.felix.framework.resolver.CandidateComparator.compare(CandidateComparator.java:26)

         at java.util.TreeMap.compare(TreeMap.java:1188)

         at java.util.TreeMap.put(TreeMap.java:531)

         at java.util.TreeSet.add(TreeSet.java:255)

         at java.util.AbstractCollection.addAll(AbstractCollection.java:342)

         at java.util.TreeSet.addAll(TreeSet.java:312)

         at org.apache.felix.framework.FelixResolverState.getCandidates(FelixResolverState.java:759)

 

google找到原因是:

This appears to have been caused by running on Java 1.7.0_3.

Running on Java 1.6.0_25 works fine.

下载jdk6版本,下载地址1http://download.csdn.net/download/wangcong02345/6707321

下载地址2:http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html

分割命令:

tar czvf jdk-6u35-linux-x64.bin.tar.gz jdk-6u35-linux-x64.bin

split -b 40M ./jdk-6u35-linux-x64.bin.tar.gz ./jdk-6u35-linux-x64.bin.tar.gz.

合并命令:

cat jdk-6u35-linux-x64.bin.tar.gz.a* > jdk-6u35-linux-x64.bin.tar.gz

tar xf jdk-6u35-linux-x64.bin.tar.gz

增加可执行权限

chmod +x jdk-6u35-linux-x64.bin

解压

./jdk-6u35-linux-x64.bin

将解压好的jdk1.6.0_35文件夹用最高权限复制到/usr/lib/jvm目录中:

$ sudo cp -R jdk1.6.0_35 /usr/lib/jvm

(注意:

    如果:不存在jvm目录,请以最高权限创建jvm目录:

        $ sudo mkdir /usr/lib/jvm

)

 

在$HOME的.profile文件中设置环境变量JAVA_HOME:

$ cd ~

$ vi /etc/profile

(

添加:

export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_35

export JRE_HOME=${JAVA_HOME}/jre

export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

export PATH=${JAVA_HOME}/bin:$PATH)

参数立即生效

 source /etc/profile


验证java版本号码

[root@name01 java]# java -version

java version "1.6.0_35"

Java(TM) SE Runtime Environment (build 1.6.0_35-b10)

Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)

[root@name01 java]# javac -version

javac 1.6.0_35

[root@name01 java]#

 

然后修改jira的jdk版本为jdk6:

[root@name01 java]# vim /root/atlassian-jira-4.4.5-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties

# Do not modify this file unless instructed. It is here to store the location of the JIRA home directory only and is typically written to by the installer.

jira.home =  /usr/lib/jvm/jdk1.6.0_35

~                                        

解决好JDK,重复3.1到3.7的步骤,最后几个步骤如下:

3.8,登录报错

The Gadget Dashboard bundled plugin is not available. To ensure the Gadget Dashboard plugin is enabled, please contact your <a href="/secure/ContactAdministrators!default.jspa">JIRA administrators.

如果你认为这个信息是错误的, 请联系你的 please contact your JIRA administrators管理员{1} 以得到需要的权限.

Jira需要重新编译安装,以为之前是在jdk7下安装的,现在jdk版本换到了jdk6,所以jira也需要重新编译安装一下,重复之前的所有步骤1—>3,最后登录界面如下:

 

3.9JIRA重启报错

JIRA Startup Failed

You cannot access JIRA at present. Look at the table below to identify the reasons

 

Description

com.atlassian.jira.rpc.soap.JiraSoapServiceImpl doesn't have any satisfiable constructors. Unsatisfiable dependencies: [[interface com.atlassian.jira.rpc.auth.TokenManager, interface com.atlassian.jira.rpc.soap.service.ProjectService, interface com.atlassian.jira.rpc.soap.service.IssueService, interface com.atlassian.jira.rpc.soap.service.UserService, interface com.atlassian.jira.rpc.soap.service.SchemeService, interface com.atlassian.jira.rpc.soap.service.AdminService, interface com.atlassian.jira.rpc.soap.service.SearchService, interface com.atlassian.jira.rpc.soap.service.ProjectRoleService, interface com.atlassian.jira.rpc.soap.service.IssueConstantsService]]

原因就是没有使用shutdown.sh来关闭jira,所以最好是使用start-jira.sh启动,使用shutdown.sh关闭,那么下次启动就不会有问题了。若安装目录找不到 .jira-home.lock文件(所在目录不一定是你的安装路径),可以使用搜索功能搜索,如下所示:

[root@name01 logs]# find / -name .jira-home.lock

/usr/lib/jvm/jdk1.6.0_35/.jira-home.lock

[root@name01 logs]#

[root@name01 logs]# rm -rf /usr/lib/jvm/jdk1.6.0_35/.jira-home.lock

[root@name01 logs]#

 

4,备份JIRA3.6.2

4.1,选择备份路径

找到数据备份目录,每个登录用户的菜单栏是不一样的,我这里是“首页”-> “管理”-> “备份”,就进入备份页面,输入备份文件(带上全路径),这个路径是在jira安装服务器上面,linux服务器就用linux路径/tmp/jira_pl_3.6.2.xml,windows服务器就采用windows的路径:D:\ jira_pl_3.6.2.xml。

 

4.2,开始备份

点击Backup按钮,开始备份,jira数据多的话,时间有些长,备份完,页面显示如下表示备份成功:

Backup JIRA data

Data exported to: D:\jira_pl_3.6.2.xml.

 

5,在4.4.5上恢复jira3.6.2版本数据

把Step#4备份的文件copy到/usr/lib/jvm/jdk1.6.0_35/import目录下,然后登录进入4.4.5的jira面板,找到“System”-> “Restore System”,录入恢复文件路径以及3.5小节中的License,点击“Restore”按钮开始恢复。

恢复报错如下:

<span color:#333333;"="" style="word-wrap: break-word; font-size: 10pt;">Either create the paths shown below and reimport, or reimport using default paths.

错误

·         The index path /usr/lib/jvm/jdk1.6.0_35/D:\JIRA_file\index specified in the backup file is not valid.

·         The attachment path /usr/lib/jvm/jdk1.6.0_35/D:\JIRA_file\attach specified in the backup file is not valid.

VIM打开备份文件,找到vim jira_pl_3.6.2.xml,找到D:\JIRA_file\字符串,换成/usr/lib/jvm/jdk1.6.0_35/import/,如下所示:

    <OSPropertyString id="10006" value="/usr/lib/jvm/jdk1.6.0_35/import/index"/>

    <OSPropertyString id="10007" value="/usr/lib/jvm/jdk1.6.0_35/import/attach"/>

<OSPropertyString id="10009" value="/usr/lib/jvm/jdk1.6.0_35/import/backUp"/>

然后,建3个目录

[root@name01 import]# mkdir /usr/lib/jvm/jdk1.6.0_35/import/index

[root@name01 import]# mkdir /usr/lib/jvm/jdk1.6.0_35/import/attach

[root@name01 import]# mkdir /usr/lib/jvm/jdk1.6.0_35/import/backUp

[root@name01 import]#

 

然后重新导入,OK,没有报错信息,开始慢慢导入数据,如下显示:

 

最后,经过50分钟,终于恢复完毕,如下所示:

 

6,在4.4.5上备份数据导入的旧版本3.6.2的数据

在上一步导入完毕之后,重新在4.4.5版本上面把新的数据进行备份,进入


 

备份完成,如下所示:


7,在6.0.8上做jira恢复

包括数据恢复和附件恢复

7.1恢复数据

把上一步骤备份的jira_4.4.5.zip解压缩

[root@name01 export]# unzip jira_4.4.5.zip

Archive:  jira_4.4.5.zip

  inflating: entities.xml           

  inflating: activeobjects.xml      

[root@name01 export]#

 

将解压缩出来的xml备份文件copy到Jira6.0.8的服务器上,开始恢复,如下所示:

 

大概耗时40分钟,恢复完后,如下所示:

 

7.2,恢复附件

去“管理员界面”->“系统”,打开如下所示:

点开后,再拉到左边最下面,点击“附件”选项,就会看到附件路径,把Jira3.6.2版本下的附件文件直接copy过来到这个目录下,如下所示:

 

 

OK,最后,JIRA从旧版本3.6.2到新版本6.0.8升级完毕。

 

参考文章地址:

http://www.trongeek.com/archives/jira-di-an-zhuang-yu-sheng-ji.html

http://blog.csdn.net/mchdba/article/details/38768513

 

阅读更多

扫码向博主提问

黄杉

博客专家

非学,无以致疑;非问,无以广识
  • 擅长领域:
  • MySQL Hbas
  • Hbase
  • Tidb
  • cdb
  • 数据拆分
去开通我的Chat快问

没有更多推荐了,返回首页