Import-Export plugin not working (linux)

so it’'s hopeless:)

today i’'ve stoped jive-messenger, copied newer 1.0.1b3 version of plugin, chowned whole JM dir to jive user recursively, rebooted machine. Still, no output.

info.log:

2005.06.15 15:56:13 exportUserData() - file = users

2005.06.15 15:56:14 exportUserData() - prep XMLWriter

2005.06.15 15:56:14 exportUserDate() - exportFilePath = /opt/jive_messenger/export/users.xml

2005.06.15 15:56:14 exportUserData() - close XMLWriter

Well, i want to test if it’'s connected with baltic characters somehow. So can you modify beta version of plugin in such way, so it could export only one user? The first user in my list is admin (Name: Administrator).

And second, can you add some cmd commands or maybe some binary to try to export userlist directly from cmd and not with Admin Console?

so it’'s hopeless:)

today i’'ve stoped jive-messenger, copied newer

1.0.1b3 version of plugin, chowned whole JM dir to

jive user recursively, rebooted machine. Still, no

output.

info.log:

2005.06.15 15:56:13 exportUserData() - file = users

2005.06.15 15:56:14 exportUserData() - prep

XMLWriter

2005.06.15 15:56:14 exportUserDate() - exportFilePath

= /opt/jive_messenger/export/users.xml

2005.06.15 15:56:14 exportUserData() - close

XMLWriter

Well, i want to test if it’'s connected with baltic

characters somehow. So can you modify beta version of

plugin in such way, so it could export only one user?

The first user in my list is admin (Name:

Administrator).

I’‘m almost positive that it’‘s not an issue with the baltic characters since an export file is not even being created. If it were having trouble with the characters, you’'d see an entry in the log file that said, “exportUserDate() - start writing users”.

And second, can you add some cmd commands or maybe

some binary to try to export userlist directly from

cmd and not with Admin Console?

That’‘s a possibility, the other option is to add the ability to send the output directly to the screen thereby eliminating any sort of file creation permission problems. Unfortunately, I’‘m going to be out of town for about a week and I won’‘t be able to work on this issue until I return. Ben, aka “DarKlajid”, said he might have a chance to look over the latest source to see if he can find something that I’'ve been missing.

I’‘m sure we’‘ll figure out a solution, it’'s just going to take some additional work.

Thanks,

Ryan

Well, I wound up with a bit of free time before my departure so I fiddled around with the export-to-screen option for this plugin and came up with something that works. There is no error checking yet and it needs some polishing but I’‘m able to export to the screen even if there is no export directory or it is locked. I’'ve attached a screen shot of what it looks like.

Let me know what you think

Thanks,

Ryan

Looks great (well - a typo: “Display”…), really!

That’‘s a nice workaround to enable simple copy&paste for this case. But I’'d still be curious what the root cause for this problem is…

Regards,

Ben

hey! What version of JM should i use with this plugin?? Coz i have tried latest beta (with To Screen option) with 2.1.4 at Windows at home and it didnt work, and simple exporting to file was not working too. Today i have upgraded my home test server to 2.2.0 beta 1 latest build and it works. To screen option shows all baltic and russian characters as it should. Though i’'m not sure, if i save this as xml and then try to import. JM should understand such file? But in messenger script all baltic chars are substituted with codes.

Ok, so this is with Windows. At work i have upgraded server to 2.1.5 version but didnt have a chance to test plugin. On Monday i think.

so i think, maybe my JM instalaltion is somewhat broken. Because “to Screen” is not working too. And Advanced User Search has stopped to work. Same error. No page to display. Maybe i should wait for a 2.2 release.

last error.log lines:

2005.06.20 09:08:07 org.jivesoftware.messenger.container.PluginServlet.service(PluginServlet.java:96 )

java.lang.NullPointerException

at org.jivesoftware.messenger.user.DefaultUserProvider.findUsers(DefaultUserProvid er.java:398)

at org.jivesoftware.messenger.user.UserManager.findUsers(UserManager.java:235)

at org.jivesoftware.messenger.plugin.search.advance_002duser_002dsearch_jsp._jspSe rvice(advance_002duser_002dsearch_jsp.java:86)

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

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

at org.jivesoftware.messenger.container.PluginServlet.handleJSP(PluginServlet.java :215)

at org.jivesoftware.messenger.container.PluginServlet.service(PluginServlet.java:7 7)

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

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:822)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler. java:494)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)

at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.ja va:624)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1434)

at org.mortbay.http.HttpServer.service(HttpServer.java:896)

at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)

at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)

at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)

at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)

at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)

at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Advanced User Search was working before. Maybe it’‘s somehow connected with UserImportExport plugin’'s failure to uninstall. I still cant uninstall it, so i have to delete it manually.

Just tried it on my machine using the latest CVS snapshot of all plugins and the server…

It works great here… I’'m a little bit helpless now. Do you have any log-entries/pieces of information regarding the non-working export?

huh,… What information do you need exactly? I can post all error.log or any log here at any time given. My first post was with error.log taken after export failure.

I’'m gonna talk to Gato and Matt and ask about latest 2.2 build stability. These builds are quite stable always, and i was using one 2.1.4 nightly once at my deployment here. Maybe i should upgrade and see what will happen then.

Well, my questions was more: What do the logs say, when you try to export to screen… Any difference? Can you try to export to screen again and post the errorlog?

ok, posting again, though it looks the same as above. I wish i could undestand what they’'re about I dont know anything about java and java errors.

2005.06.20 15:52:16 org.jivesoftware.messenger.container.PluginServlet.service(PluginServlet.java:96 )

javax.servlet.ServletException: org/jivesoftware/util/XMLWriter

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

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

at org.jivesoftware.messenger.plugin.userImportExport.export_002duser_002ddata_jsp ._jspService(export_002duser_002ddata_jsp.java:150)

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

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

at org.jivesoftware.messenger.container.PluginServlet.handleJSP(PluginServlet.java :215)

at org.jivesoftware.messenger.container.PluginServlet.service(PluginServlet.java:7 7)

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

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:822)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

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

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler. java:494)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)

at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.ja va:624)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1434)

at org.mortbay.http.HttpServer.service(HttpServer.java:896)

at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)

at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)

at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)

at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)

at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)

at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

You got a mail from me, containing a debug version of the plugin. Please enable the debug log and try to export your users to the screen.

Since I’‘m dumping loginname and full name to the debug log: Please don’'t post it here completely, but maybe you can tell me if you see any username at all or tell me which log entries you see…

Really weird, this problem.

Ben

you mean from YOU? I’‘ve got only 1.0.1beta4 version from Ryan (which shows 1.0.1beta3 in plugin list actually). Is this the debug version you talk about? Then how can i enable debug and where to find debug log? I have tried to enable JM’'s debug log in Admin Console, but there is no output after exporting to screen failure.

Yes, from me… You gave me the …@…ru address in a private message some days ago and I just built a debug plugin version and sent it to you. Right before I submitted the last entry.

Ok. So i’'ve got it. I will try to test it tomorrow (only a half day working).

so the debug log:

2005.06.21 17:18:49 Logging off username@jiveserver/Exodus on org.jivesoftware.messenger.net.SocketConnection@12ca580 socket: Socket[addr=/192.168.12.18,port=1569,localport=5222] session: org.jivesoftware.messenger.ClientSession@257b34 status: 3 address: username@jiveserver/Exodus id: 6e7e427f presence:

Away as a result of idle.

away

0

2005.06.21 17:18:55 Creating the XMLWriter instance.

What does this mean - “logging off”??

The “logging off” is not from the plugin - and it just means that one of your users did exactly that, I guess.

The rest is interesting… So the line that crashes is

writer = new XMLWriter(stringWriter, OutputFormat.createPrettyPrint());

no idea why, though.

The only exception that can be thrown there is UnsupportedEncodingException - sounds quite reasonable for your setup. Well - the next problem is to find out why it crashes here… Because it only calls the OutputStreamWriter constructor with (outStream, encoding). I sent you you another version of the plugin, this time to output more details. Sorry - hard to come by it seems…

Ben

The problem is that i cant uninstall this plugin normally while server is running. So i have to delete it manually, but then i cant install new version. Plugin wount appear in Admin Console until i restart server. And i cant restart it whenever i “want”. Plus, i’‘m going to vacation on next week, so i wount be able to do any testing for a two weeks. So, so… We’'ll have to freeze testing for a while, well, mostly from my side of course

I’'ll try to get you a new debug log tomorrow.

P.S. have done a trick, just overwritten last version of plugin, dont know if it has updated correctly. Will try it after restart again. But currently debug shows only one line:

2005.06.22 09:32:55 Creating the XMLWriter instance.

Hi Ben,

Looks great (well - a typo: “Display”…), really!

Oops, good catch. I’'ll get that fixed.

That’'s a nice workaround to enable simple copy&paste

for this case. But I’'d still be curious what the root

cause for this problem is…

Yeah, me too. Thanks so much for jumping in and helping out.

~Ryan

Hi Wroot,

hey! What version of JM should i use with this

plugin??

The plugin should work with version 2.1.4 and above.

Thanks,

Ryan

Hello,

this is my feedback.

the Import-Export works on my FC3 server, with jive_messenger_2005-06-21 and User Import Export 1.0

with the jm 2.1.5 i’'ve the blanck screen and the XML writer exception.

thanks for your works

etzay