Kraken user migration plugin for GoJara

Hey guys,

for those of you who are thinking about a migration from kraken to GoJara (and spectrum) here is a good message for you

As walter announced we successfully migrated all our kraken gateway registrations to spectrum with some lines of code and one mouse click.

That might be very useful for company environments that contains more than 10 gateway registrations. For some of us it seems to be hard to remind their own icq/yahoo/msn accounts and passwords. To make it easier we developed a very small plugin, that allows you to copy your kraken gateway registrations to your spectrum instances.

3 Steps to success

**What you need: **

  • Openfire
  • **Kraken registrations
    **
  • **Spectrum (configured)
    **
  • **GoJara
    **

1st - Download

Download the jar and upload the plugin into your OF installation.

You will find the download at the buttom of this post.

2nd - Stop Kraken & Start Spectrum

Stop Kraken! To prevent interactions between kraken and spectrum we removed kraken from the plugins section and restartet openfire. Kraken will **NOT **remove the registration info so you can safely reinstall kraken if it is neccessary. You will not lose your accounts and passwords.

3rd - Go to “Server Settings -> Kraken 2 Spectrum” in Openfire admin panel

The plugin will try to map your kraken gateway types to the according spectrum instances.

On the upper left you can see how many kraken registrations have been found by the plugin.

The mapping is always like the following:

If the kraken gateway type is “msn” the spectrum name should be msn.somehost.com.

If the spectrum mapping is null, there is no spectrum instance for this gateway.

If you sure you want to migrate, click on “Migrate from Kraken to Spectrum”. During the migration process you are not able to click the link again. It will show “xxx contacts migrated…”. If you still see the “Migrate from…” link, the process ended.

You might want to check your logs to ensure that no error occoured during the process.

Have fun and report issues in this discussion and we are trying to fix them asap.

1 Like

See the following error:

==> error.log <==

2013.05.13 17:37:00 org.jivesoftware.openfire.container.PluginServlet - com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table ‘openfire.ofgatewayregistration’ doesn’t exist

javax.servlet.ServletException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table ‘openfire.ofgatewayregistration’ doesn’t exist

at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:858)

at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:791)

at org.jivesoftware.openfire.plugin.kraken2spectrum.migratork2s_jsp._jspService(mi gratork2s_jsp.java:109)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.jivesoftware.openfire.container.PluginServlet.handleJSP(PluginServlet.java: 247)

at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:10 5)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1359)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 7)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:94 1)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186 )

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875 )

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:250)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:149)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)

at org.eclipse.jetty.server.Server.handle(Server.java:349)

at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)

at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConne ction.java:919)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)

at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51 )

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.jav a:586)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java :44)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598 )

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)

at java.lang.Thread.run(Thread.java:662)

Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table ‘openfire.ofgatewayregistration’ doesn’t exist

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)

at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)

at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)

at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)

at $java.sql.Wrapper$$EnhancerByProxool$$bcae3908.executeQuery()

at org.jivesoftware.openfire.plugin.kraken2spectrum.MigrationEngine.getNumKrakenRe gistrations(MigrationEngine.java:51)

at org.jivesoftware.openfire.plugin.kraken2spectrum.migratork2s_jsp._jspService(mi gratork2s_jsp.java:78)

… 45 more

Suspect a case sensitivity issue since ofGatewayRegistration definitely exists.

i changed the database queries according to your post. mysql is case sensitive in contrast to postgresql for example. try the new version 0.0.2
kraken2spectrum.jar (33023 Bytes)