Forums

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

Migrate Cofluence from Local Server to Cloud Error

John McAlpin August 18, 2021

I am looking to migrate by small local Confluence Server installation to an Atlassian Cloud implementation.  Clicking the Migration Assistance immediately displays an error message.  I have no idea how to move forward with debugging this error.  Error below and thanks!

org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInitialState' in class com.atlassian.migration.agent.web.AppAction threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.lang.String (java.time.LocalDateTime and java.lang.String are in module java.base of loader 'bootstrap') at /templates/app.vm[line 21, column 44]
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:228)

caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.lang.String (java.time.LocalDateTime and java.lang.String are in module java.base of loader 'bootstrap')
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.lang.String (java.time.LocalDateTime and java.lang.String are in module java.base of loader 'bootstrap')
at liquibase.changelog.StandardChangeLogHistoryService.getRanChangeSets(StandardChangeLogHistoryService.java:324)

 

3 answers

0 votes
milopriv
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!
September 27, 2021

I have the exact same problem. Were you able to resolve this?

0 votes
John McAlpin August 24, 2021

Not running (and I tried it again).

  1. While it was running, "Administration > Cache Statistics > Flush All"

  2. sudo systemctl stop confluence.service

  3. sudo dpkg -i mysql-connector-java_8.0.22-1ubuntu20.10_all.deb

  4. sudo mv /usr/share/java/mysql-connector-java-8.0.22.jar /opt/atlassian/confluence/confluence/WEB-INF/lib

  5. sudo rm /opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-8.0.26.jar

  6. sudo systemctl start confluence.service

I can tell when I watch HTOP if it's going to fail.  The CPUs run about twice a long when Confluence is coming up properly.  After doing the above I just get the web page error noted above.

I then perform the above to re-install mysql-connector-java-8.0.26.jar, and Confluence loads fine.  Naturally, still no Migration Assistant then.  Thoughts?

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2021

Hi John,

Good morning, and thank you for raising this with us!

The error you receive looks like it may be related to the following bug:

Can you let me know if you are using MySQL, and if so, what are your MySQL and JDBC driver versions?

If you're using the 8.0.23 driver, please downgrade to 8.0.22 or earlier and try the migration assistant again.

If that works, it confirms you are affected by the bug. We have a local bug ticket below for issues related to this with our migration assistant:

  • MIG-603 MySQL 8 driver causes class java.time.LocalDateTime cannot be cast to class java.lang.String error

I hope this helps, but let me know if you have any trouble!

Take care,

Shannon

John McAlpin August 23, 2021

Thanks for the response.  I was in fact on 8.0.23.  If I downgrade to 8.0.22, the web interface will not load at all.  I can upgrade to 8.0.26 (which is also my current MySQL version) and the web page loads.  But, not the migration assistant (still).  Downgrade to 8.0.23 and the web page loads but no migration assistant.  Downgrade again to 8.0.22 and the whole site is down again. 

The below is the current file.
/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-8.0.22.jar

Below is the whole site error message when I attempt to load the site when 8.0.22 is installed.

HTTP Status 500 – Internal Server Error

Type Exception Report

Message An exception occurred processing [errors.jsp] at line [13]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing [errors.jsp] at line [13]

10: <link rel="shortcut icon" href="johnson/fav-confluence.ico">
11: <%
12: JohnsonPageI18NProvider johnsonPageI18NProvider = (JohnsonPageI18NProvider) BootstrapUtils.getBootstrapContext().getBean("johnsonPageI18NProvider");
13: String translations = johnsonPageI18NProvider.getTranslations().serialize();
14: %>
15: <script>
16: window.i18n = <%=translations%>;


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:626)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:515)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter$SwapOnBootstrapFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:55)
com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:35)

etc, etc....

Thoughts or suggestions?

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 24, 2021

Hi John,

Thank you for your reply. By chance, was Confluence running when you made the change? You may need to stop Confluence completely, clear the cache, and start it again.

Let me know how that goes!

Take care,

Shannon

J_ Fischer
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 11, 2022

hi shannon, we have same problem. i'm looking to migrate to cloud also, our version of mysql is 8.0.28. is there a resolution for this yet?

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 12, 2022

Hi @J_ Fischer,

I recommend raising a ticket with our Cloud Migration team, who can further advise you. You can contact them directly below:

Feel free to include this Community post in your message to the team.

Take care,

Shannon | Atlassian Cloud Support 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.10.2
TAGS
AUG Leaders

Atlassian Community Events