Migrate Cofluence from Local Server to Cloud Error
Asked by John McAlpin:

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)
> ```


Answers:
author: milopriv
body: I have the exact same problem. Were you able to resolve this?


author: John McAlpin
body: 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?


author: Shannon S
body: 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:

* [MySQL Bugs: #102435: java.time.LocalDateTime cannot be cast to class java.lang.String](https://bugs.mysql.com/bug.php?id=102435)

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](https://jira.atlassian.com/browse/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

comments: author: John McAlpin
body: 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%\>;

<br />

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?


author: Shannon S
body: 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](https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html), and start it again.

Let me know how that goes!

Take care,

Shannon


author: J_ Fischer
body: 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?


author: Shannon S
body: Hi [@J_ Fischer](/t5/user/viewprofilepage/user-id/4871617),

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

* [Contact Cloud Migration Team](https://support.atlassian.com/contact/#/?inquiry_category=migration_support&migration_direction=Server%20-%3E%20Cloud&support_type=customer)

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

Take care,

Shannon \| Atlassian Cloud Support


Tags: confluence-server

migration-customer-care

server