Failed to transfer jcr database from local (derby) to remote (db2)

[java] Restoring database autocommit to original setting:true
[echo] Transfer Data :: MaxMemory is 512M
[java] Executing java with empty input string
[java] [2020-08-05 16:39:46.035] Attempting to make connection using: jdbc:db2://HOSTNAME:53685/AWUT12JC:returnAlias=0; :: awut12ad :: PASSWORD_REMOVED
[java] [2020-08-05 16:39:47.337] Connection successfully made
[java] [2020-08-05 16:39:47.338] Attempting to make connection using: jdbc:derby:wpsdb;create=true :: db2admin :: PASSWORD_REMOVED
[java] [2020-08-05 16:39:47.553] ERROR: Error obtaining connecting for jdbc:derby:wpsdb;create=true
[java] java.sql.SQLException: Failed to start database 'wpsdb' with class loader sun.misc.Launcher$AppClassLoader@197b5707, see the next exception for details.
[java] at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
[java] at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
[java] at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
[java] at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
[java] at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
[java] at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
[java] at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
[java] at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
[java] at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:675)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:219)
[java] at com.ibm.wps.config.db.Database.init(Database.java:152)
[java] at com.ibm.wps.config.db.transfer.CmdLineTransfer.execute(CmdLineTransfer.java:93)
[java] at com.ibm.wps.config.db.transfer.CmdLineTransfer.main(CmdLineTransfer.java:43)
[java] Caused by: ERROR XJ040: Failed to start database 'wpsdb' with class loader sun.misc.Launcher$AppClassLoader@197b5707, see the next exception for details.
[java] at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)

Hey Hanumantharao,

reading the stack there is a hint to check the next exception for details:

--- snip ---
[java] [2020-08-05 16:39:47.553] ERROR: Error obtaining connecting for jdbc:derby:wpsdb;create=true
[java] java.sql.SQLException: Failed to start database 'wpsdb' with class loader sun.misc.Launcher$AppClassLoader@197b5707, see the next exception for details.
--- snip ---

Can you shar e that info with us as well please?

As the derby database can't provide connections to multiple processes I suspect that perhaps the the Portal Server JVM is up at the time you get this error? If yes, please stop the portal server and retry.

Please grep for another running process. The other process may have 'locked' access to Derby because as stated, Derby can only accept one connection. If you find another process accessing Derby, then kill that process and try again.

Thank you Jerry and Hermann.

I managed to resolve this issue by copying the derby/wpsdb from another profile.