Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to connect to Jira H2 Database, Internal Server Error

Ismailcan Sezer January 20, 2021

Hi all,

When i tried to start jira getting below error in log file; Could you please help us with that issue? I can not access to site, getting  JIRA — Internal Server Error on page.

I already check dbconfig.xml file, and H2 database connection is successfully.

021-01-20 15:02:18,266 http-bio-443-exec-31 ERROR [NoModule] Could not determine database type.
org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-185]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.engine.Database.openDatabase(Database.java:297)
at org.h2.engine.Database.<init>(Database.java:260)
at org.h2.engine.Engine.openSession(Engine.java:60)
at org.h2.engine.Engine.openSession(Engine.java:167)
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145)
at org.h2.engine.Engine.createSession(Engine.java:128)
at org.h2.engine.Engine.createSession(Engine.java:26)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:87)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:164)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:402)
at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:831)
at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:730)
at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:150)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:903)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:881)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:850)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.findPropertyEntry(OFBizPropertySet.java:298)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.exists(OFBizPropertySet.java:170)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.exists(JiraCachingPropertySet.java:566)
at com.atlassian.jira.propertyset.BootstrapOfBizPropertyEntryStore.getType(BootstrapOfBizPropertyEntryStore.java:67)
at com.atlassian.jira.propertyset.CachingOfBizPropertySet.exists(CachingOfBizPropertySet.java:139)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getOption(ApplicationPropertiesStore.java:157)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getOption(ApplicationPropertiesImpl.java:85)
... 20 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
2021-01-20 15:02:18,936 http-bio-443-exec-7 WARN [o.a.commons.dbcp2.BasicDataSource] Failed to complete JMX registration
javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
at org.apache.commons.dbcp2.BasicDataSource.jmxRegister(BasicDataSource.java:2346)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2029)
at org.apache.commons.dbcp2.BasicDataSource.setLogWriter(BasicDataSource.java:1625)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:103)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:164)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:402)
at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:831)
at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:730)
at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:150)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:903)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:881)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:850)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.findPropertyEntry(OFBizPropertySet.java:298)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.exists(OFBizPropertySet.java:170)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.exists(JiraCachingPropertySet.java:566)
at com.atlassian.jira.propertyset.BootstrapOfBizPropertyEntryStore.getType(BootstrapOfBizPropertyEntryStore.java:67)
at com.atlassian.jira.propertyset.CachingOfBizPropertySet.exists(CachingOfBizPropertySet.java:139)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getOption(ApplicationPropertiesStore.java:157)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getOption(ApplicationPropertiesImpl.java:85)
... 20 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)
2021-01-20 15:02:19,046 http-bio-443-exec-7 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:h2:file:C:\Program Files\Atlassian\Application Data\JIRA/database/h2db', driverClassName='org.h2.Driver', username='sa', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=20, minSize=20, initialSize=null, maxIdle=20, maxWait=30000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery=null, minEvictableTimeMillis=4000, timeBetweenEvictionRunsMillis=5000, poolPreparedStatements=null, testOnBorrow=false, testOnReturn=null, testWhileIdle=true, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedOnBorrow=true, removeAbandonedOnMaintanance=null, removeAbandonedTimeout=300, validationQueryTimeout=null, defaultCatalog=null}}
java.sql.SQLException: Cannot create PoolableConnectionFactory (General error: "java.lang.NullPointerException" [50000-185])
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2291)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038)
at org.apache.commons.dbcp2.BasicDataSource.setLogWriter(BasicDataSource.java:1625)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:103)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:164)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:402)
at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:831)
at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:730)
at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:150)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:903)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:881)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:850)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.findPropertyEntry(OFBizPropertySet.java:298)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.exists(OFBizPropertySet.java:170)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.exists(JiraCachingPropertySet.java:566)
at com.atlassian.jira.propertyset.BootstrapOfBizPropertyEntryStore.getType(BootstrapOfBizPropertyEntryStore.java:67)
at com.atlassian.jira.propertyset.CachingOfBizPropertySet.exists(CachingOfBizPropertySet.java:139)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getOption(ApplicationPropertiesStore.java:157)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getOption(ApplicationPropertiesImpl.java:85)
... 20 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: org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-185]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.engine.Database.openDatabase(Database.java:297)
at org.h2.engine.Database.<init>(Database.java:260)
at org.h2.engine.Engine.openSession(Engine.java:167)
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145)
at org.h2.engine.Engine.createSession(Engine.java:128)
at org.h2.engine.Engine.createSession(Engine.java:26)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
at org.h2.Driver.connect(Driver.java:72)
at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39)
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256)
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2301)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2287)
... 45 more
Caused by: java.lang.NullPointerException
2021-01-20 15:02:19,155 http-bio-443-exec-7 ERROR [NoModule] Could not determine database type.
org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-185]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.engine.Database.openDatabase(Database.java:297)
at org.h2.engine.Database.<init>(Database.java:260)
at org.h2.engine.Engine.openSession(Engine.java:60)
at org.h2.engine.Engine.openSession(Engine.java:167)
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145)
at org.h2.engine.Engine.createSession(Engine.java:128)
at org.h2.engine.Engine.createSession(Engine.java:26)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:87)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:164)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:402)
at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:831)
at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:730)
at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:150)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:903)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:881)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:850)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.findPropertyEntry(OFBizPropertySet.java:298)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.exists(OFBizPropertySet.java:170)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.exists(JiraCachingPropertySet.java:566)
at com.atlassian.jira.propertyset.BootstrapOfBizPropertyEntryStore.getType(BootstrapOfBizPropertyEntryStore.java:67)
at com.atlassian.jira.propertyset.CachingOfBizPropertySet.exists(CachingOfBizPropertySet.java:139)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getOption(ApplicationPropertiesStore.java:157)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getOption(ApplicationPropertiesImpl.java:85)
... 20 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
2021-01-20 15:02:19,917 http-bio-443-exec-34 WARN [o.a.commons.dbcp2.BasicDataSource] Failed to complete JMX registration
javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
at org.apache.commons.dbcp2.BasicDataSource.jmxRegister(BasicDataSource.java:2346)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2029)
at org.apache.commons.dbcp2.BasicDataSource.setLogWriter(BasicDataSource.java:1625)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:103)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:164)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:402)
at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:831)
at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:730)
at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:150)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:903)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:881)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:850)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.findPropertyEntry(OFBizPropertySet.java:298)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.exists(OFBizPropertySet.java:170)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.exists(JiraCachingPropertySet.java:566)
at com.atlassian.jira.propertyset.BootstrapOfBizPropertyEntryStore.getType(BootstrapOfBizPropertyEntryStore.java:67)
at com.atlassian.jira.propertyset.CachingOfBizPropertySet.exists(CachingOfBizPropertySet.java:139)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getOption(ApplicationPropertiesStore.java:157)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getOption(ApplicationPropertiesImpl.java:85)
... 20 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)

2 answers

1 accepted

0 votes
Answer accepted
Pramodh M
Community Champion
January 20, 2021

Hi @Ismailcan Sezer 

Please use the zip export in the exports folder and then do the fresh installation then import the zip file.

Thanks,
Pramodh

Ismailcan Sezer January 20, 2021

Hi Pramodh,

What do you mean about fresh installation? i need to reinstall jira?

Pramodh M
Community Champion
January 20, 2021

Hi @Iresh Rupasinghe 

In the data directory you have an export folder, copy the latest zip file to another location.

Now uninstall and install Jira 

Then import the zip file via system import

Pramodh M
Community Champion
January 20, 2021

This works, better than troubleshooting!

Ismailcan Sezer January 20, 2021

so data will be lose with this process right?

Pramodh M
Community Champion
January 20, 2021

Once you import the data everything will be in place. It will same as old one @Ismailcan Sezer 

Ismailcan Sezer January 20, 2021

thank you for help pramodh, i reinstall jira and restore from backup. Last question, how can i import old addon from backup file? This is possible?

Ismailcan Sezer January 20, 2021

i founded old plugins in temp folder and saved :) thank you for help

0 votes
Iresh Rupasinghe
Contributor
January 20, 2021
Ismailcan Sezer January 20, 2021

Hi Iresh,

I checked connection test own h2 database, getting below java error;

Capture.JPG

Suggest an answer

Log in or Sign up to answer