Forums

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

Automation of MySQL DB

Gautam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2017

We are trying to automate the mysql db connection and have a confluence.cfg.xml file generated by doing setup initially with mysql. When I try to use the same confluence.cfg.xml file for another setup it gives error.

rk feature for hibernate bridge mode; org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ConfluenceDB.BANDANA' doesn't exist
java.util.concurrent.CompletionException: org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ConfluenceDB.BANDANA' doesn't exist
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:824)
at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:834)
at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2155)
at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:110)
at com.atlassian.confluence.impl.concurrency.CompletionStageUtils.foldResult(CompletionStageUtils.java:19)
at com.atlassian.confluence.impl.vcache.SynchronousExternalCache.get(SynchronousExternalCache.java:236)
at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java:78)
at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java:71)
at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:32)
at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:24)
at com.atlassian.confluence.setup.settings.DefaultDarkFeaturesManager.getSiteEnabledFeatures(DefaultDarkFeaturesManager.java:60)
at com.atlassian.confluence.setup.settings.DefaultDarkFeaturesManager.getDarkFeatures(DefaultDarkFeaturesManager.java:98)
at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)

1 answer

0 votes
Panos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2017

You don't describe the state of confluence you want to automate, thus I assume a running server.

The message indicates that the connection is fine, though you haven't created/migrated/imported sql tables. Your automation should take care of exporting sql data and reimporting

Gautam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2017

The running server is a new installation which I have configured with MySQL. I have taken the confluence.cfg.xml from this installation and putting it in a new installation. My assumption is confluence will create the tables required and start the server. There are no user specific data as it is a new installation.

Panos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2017

Your assumption is wrong as per exception, the tables and required data are not re-generated. You need to somehow import the default data there.

 

I'd say create a brand new installatio, export the sql and import the dump during the automation process.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events