Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

database migration failure

Remon Dijkstra (SystemAdmin) May 22, 2018

Hi,

 

I am trying to migrate my Crucible hsql database to PostgreSQL.

I tried in the admin section, which resulted in a "dead crucible"

I tried with commandline, which fails.

Can anyone help please?

(P.S. the migration of BitBucket succeeded withpout problems)

Here is the log:

D:\Data\Jira\Crucible\FeCru\bin>fisheyectl.bat restore --sql --file "D:\Data\Jir
a\fecrudata\backup\backup_2018-22-05_1333.zip" --dbtype postgresql --jdbcurl jdb
c:postgresql://localhost/CrucibleDatabase --username CrucibleUser --password mOr
4nVZA6xrv82AdNr9y --driver UTF-8
WARN: your default encoding (windows-1252) does not support unicode.
This is likely to cause problems if any of the filenames, branch names or tag na
mes in one of your repositories contain unicode characters.
Update your locale settings or start with the -Dfile.encoding=UTF-8 option to av
oid these problems.
INFO - Using log4j configuration file: D:\Data\Jira\Crucible\FeCru\log4j-client
.xml
INFO - FishEye arguments: [--sql, --file, D:\Data\Jira\fecrudata\backup\backup_
2018-22-05_1333.zip, --dbtype, postgresql, --jdbcurl, jdbc:postgresql://localhos
t/CrucibleDatabase, --username, CrucibleUser, --password, mOr4nVZA6xrv82AdNr9y,
--driver, UTF-8]
Starting Spring Context...
ERROR - Unable to connect to PostgreSQL database jdbc:postgresql://localhost/Cru
cibleDatabase: java.lang.ClassNotFoundException: UTF-8: is the database driver j
ar file properly installed in the FISHEYE_INST/lib directory?
java.lang.ClassNotFoundException: UTF-8
at java.net.URLClassLoader.findClass(Unknown Source) [?:1.8.0_171]
at java.lang.ClassLoader.loadClass(Unknown Source) [?:1.8.0_171]
at java.lang.ClassLoader.loadClass(Unknown Source) [?:1.8.0_171]
at java.lang.Class.forName0(Native Method) [?:1.8.0_171]
at java.lang.Class.forName(Unknown Source) [?:1.8.0_171]
at com.cenqua.crucible.hibernate.DatabaseConfigDBControlConnectionProvid
er.connect(DatabaseConfigDBControlConnectionProvider.java:67) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DatabaseConfigDBControlConnectionProvid
er.getConnection(DatabaseConfigDBControlConnectionProvider.java:51) [fisheye.jar
:?]
at com.cenqua.crucible.hibernate.DefaultDBControl.<init>(DefaultDBContro
l.java:94) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DefaultDBControl.newInstance(DefaultDBC
ontrol.java:80) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DefaultDBControl.newInstance(DefaultDBC
ontrol.java:72) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DBControlFactoryImpl.makeControl(DBCont
rolFactoryImpl.java:122) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DBControlFactoryImpl.makeControlFromDoc
(DBControlFactoryImpl.java:132) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DBControlFactoryImpl.getCurrentControl(
DBControlFactoryImpl.java:108) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DBControlFactoryImpl.<init>(DBControlFa
ctoryImpl.java:67) [fisheye.jar:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[?:1.8.0_171]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[?:1.8.0_171]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce) [?:1.8.0_171]
at java.lang.reflect.Constructor.newInstance(Unknown Source) [?:1.8.0_17
1]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:1
48) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy
.instantiate(SimpleInstantiationStrategy.java:125) [spring-beans-4.0.9.RELEASE.j
ar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:270) [spring-beans-4.0.9.RELEASE.jar:4.0.9
.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115) [sprin
g-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) [spring
-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) [spring-beans-
4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:475) [spring-beans-4.
0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:302) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE
]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:229) [spring-beans-4.0.9.RELEAS
E.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:298) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:193) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:706) [spring-beans-4.0.
9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:762) [spring-context-4
.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:482) [spring-context-4.0.9.RELEASE.jar:4.0.9.R
ELEASE]
at org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:140) [spring-context-4.0.9.RELEASE.ja
r:4.0.9.RELEASE]
at org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:84) [spring-context-4.0.9.RELEASE.jar
:4.0.9.RELEASE]
at com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext.<init>(Resto
re.java:363) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext.<init>(Resto
re.java:360) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore.createApplicationContext(Restore.java:
351) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore.run(Restore.java:158) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore.main(Restore.java:261) [fisheye.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_
171]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.8.0_
171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.
8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) [?:1.8.0_171]
at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) [fisheyeb
oot.jar:?]
at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) [fisheyeboot.j
ar:?]
INFO - Starting database...
WARN - Exception encountered during context initialization - cancelling refresh
attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'dbControlFactory' defined in URL [file:/D:/Data/Jira/Crucible/FeCru/cont
ent/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested except
ion is org.springframework.beans.BeanInstantiationException: Could not instantia
te bean class [com.cenqua.crucible.hibernate.DBControlFactoryImpl]: Constructor
threw exception; nested exception is java.lang.IllegalStateException: Database n
ot available (Unable to connect to PostgreSQL database jdbc:postgresql://localho
st/CrucibleDatabase: java.lang.ClassNotFoundException: UTF-8: is the database dr
iver jar file properly installed in the FISHEYE_INST/lib directory?). Current st
ate: NO_DB
at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:278) [spring-beans-4.0.9.RELEASE.jar:4.0.9
.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115) [sprin
g-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) [spring
-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) [spring-beans-
4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:475) [spring-beans-4.
0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:302) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE
]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:229) [spring-beans-4.0.9.RELEAS
E.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:298) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:193) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:706) [spring-beans-4.0.
9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:762) [spring-context-4
.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:482) [spring-context-4.0.9.RELEASE.jar:4.0.9.R
ELEASE]
at org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:140) [spring-context-4.0.9.RELEASE.ja
r:4.0.9.RELEASE]
at org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:84) [spring-context-4.0.9.RELEASE.jar
:4.0.9.RELEASE]
at com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext.<init>(Resto
re.java:363) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext.<init>(Resto
re.java:360) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore.createApplicationContext(Restore.java:
351) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore.run(Restore.java:158) [fisheye.jar:?]
at com.cenqua.fisheye.ctl.Restore.main(Restore.java:261) [fisheye.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_
171]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.8.0_
171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.
8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) [?:1.8.0_171]
at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) [fisheyeb
oot.jar:?]
at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) [fisheyeboot.j
ar:?]
Caused by: org.springframework.beans.BeanInstantiationException: Could not insta
ntiate bean class [com.cenqua.crucible.hibernate.DBControlFactoryImpl]: Construc
tor threw exception; nested exception is java.lang.IllegalStateException: Databa
se not available (Unable to connect to PostgreSQL database jdbc:postgresql://loc
alhost/CrucibleDatabase: java.lang.ClassNotFoundException: UTF-8: is the databas
e driver jar file properly installed in the FISHEYE_INST/lib directory?). Curren
t state: NO_DB
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:1
64) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy
.instantiate(SimpleInstantiationStrategy.java:125) [spring-beans-4.0.9.RELEASE.j
ar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:270) [spring-beans-4.0.9.RELEASE.jar:4.0.9
.RELEASE]
... 24 more
Caused by: java.lang.IllegalStateException: Database not available (Unable to co
nnect to PostgreSQL database jdbc:postgresql://localhost/CrucibleDatabase: java.
lang.ClassNotFoundException: UTF-8: is the database driver jar file properly ins
talled in the FISHEYE_INST/lib directory?). Current state: NO_DB
at com.cenqua.crucible.hibernate.DefaultDBControl.getConnection(DefaultD
BControl.java:623) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DefaultDBControl.validateConnectionAndE
xitOnFailure(DefaultDBControl.java:495) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DefaultDBControl.start(DefaultDBControl
.java:256) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DefaultDBControl.start(DefaultDBControl
.java:250) [fisheye.jar:?]
at com.cenqua.crucible.hibernate.DBControlFactoryImpl.<init>(DBControlFa
ctoryImpl.java:67) [fisheye.jar:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[?:1.8.0_171]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[?:1.8.0_171]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce) [?:1.8.0_171]
at java.lang.reflect.Constructor.newInstance(Unknown Source) [?:1.8.0_17
1]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:1
48) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 26 more
ERROR: problem running command
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101)
at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44)
Caused by: org.springframework.context.ApplicationContextException: Application
Context not initialised.
at com.cenqua.fisheye.config.SpringContext.getApplicationContext(SpringC
ontext.java:51)
at com.cenqua.fisheye.config.SpringContext.getComponentByClass(SpringCon
text.java:90)
at com.cenqua.fisheye.config.RootConfig.getRepositoryManager(RootConfig.
java:600)
at com.cenqua.fisheye.config.RootConfig.fullShutdown(RootConfig.java:128
3)
at com.cenqua.fisheye.ctl.Restore.destroyApplicationContext(Restore.java
:356)
at com.cenqua.fisheye.ctl.Restore.run(Restore.java:198)
at com.cenqua.fisheye.ctl.Restore.main(Restore.java:261)
... 6 more
Press any key to continue . . .
D:\Data\Jira\Crucible\FeCru\bin>

 

2 answers

1 accepted

0 votes
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2018

Hi @Remon Dijkstra (SystemAdmin),

Based on the error, it looks like the jdbc driver is not available in the FISHEYE_INST/lib folder.

Can you check the content of that folder?

Are you sure that Fisheye was running on the internal (hsql) database? Such message usually indicates a missing MySQL driver.

 

A faster option now could be to start up Fisheye using the existing configuration (connected to the previous database) and then migrate to PostgreSQL via the user interface (see Migrating to PostgreSQL for details).

Since the restore failed, a standard startup (e.g. by using the start.sh/bat) script will still be working and allowing us to access the user interface to migrate to an external database.

 

Cheers,

Caterina - Atlassian

0 votes
Remon Dijkstra (SystemAdmin) May 28, 2018

Thanks, succeeded with the internal way.,

Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2018

Thanks @Remon Dijkstra (SystemAdmin) for confirming.

Caterina

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events