HI Team,
I could like to know the solution for the below problem, Thanks In Advance
. What should I have to do for this problem , is it was the problem with "mysql-connector-java-5.1.17.jar" version or some other problem with MYSQL version installed.
I am migrating the JIRA 7.0 from one lunix Server to another lunix server with JIRA 7.3 version.
In Jira 7.0 :
I am using the inbuild DB (H2 Db)
But in the new lunix server : I have installed the JIRA 7.3 versio.
Problem : When I am migrating the data from the backup (backup taken as per the atlassian instruction) to the new JIRA 7.3 version , The heath check for the DB fails.
reason was its supports only MYSQL or some other DB only.
So I have installed the MYSQL in my lunix server and connected the mysql from my workbench. Created the DB as mentioned in the migrating the DB instruction in atlassian.
Instruction flowed : https://confluence.atlassian.com/adminjiraserver073/connecting-jira-applications-to-mysql-861253043.html
Note : I have added the details in the my.cnf file and also moved the "mysql-connector-java-5.1.17.jar" file to "/atlassian/jira/lib".
I have deleted the DB config file from atlassian as said in the instruction.
After doing all this and when try to connect the DB to JIRA In the configuration page ,I am getting flowing error.
Error in UI:
Error connecting to database
Unexpected exception encountered during query.
null
Error of catalina.out:
2018-01-09 17:54:46,544 http-nio-8080-exec-14 ERROR anonymous 1074x6x1 56ier5 <IP Address> /secure/SetupDatabase!connectionCheck.jspa [c.a.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database:
java.sql.SQLException: Unexpected exception encountered during query.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2665)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1709)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1628)
at com.mysql.jdbc.ConnectionImpl.setSessionVariables(ConnectionImpl.java:5210)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3375)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2385)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
... 3 filtered
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.getTestDatabaseConnection(DefaultAtlassianBootstrapManager.java:347)
at com.atlassian.jira.config.database.JdbcDatasource.getConnection(JdbcDatasource.java:211)
at com.atlassian.jira.config.database.DatabaseConfig.testConnection(DatabaseConfig.java:87)
at com.atlassian.jira.web.action.setup.SetupDatabase.testConnection(SetupDatabase.java:225)
at com.atlassian.jira.web.action.setup.SetupDatabase.doValidation(SetupDatabase.java:189)
at com.atlassian.jira.web.action.setup.SetupDatabase.doConnectionCheck(SetupDatabase.java:121)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
... 2 filtered
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
... 7 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 49 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:80)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:78)
... 28 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 27 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 28 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.mysql.jdbc.ConnectionImpl.getServerCharacterEncoding(ConnectionImpl.java:3100)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2096)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619)
... 181 more
This the Mysql Version I am Using :
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| innodb_version | 5.6.38 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.38 |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+------------------------------+
This is my my.cnf deatils :
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
bind-address = 127.0.0.1
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
innodb_data_file_path = ibdata1:10M:autoextend
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=256M