Deployment help

I have a set of questions I’‘m hoping you can help me with. I’'m new to the Jive system software, so please be patient.

  1. I am running a jboss app server (jboss 3.2.1) on Windows 2003 Server and am having difficulty getting Jive Messenger to work. I build the war file (c:<jive-messenger installation directory> \web-app\jar -cvf jive-messenger.war .) and then drop that into the deploy directory of jboss. The deployment is fine, but when I navigate to http://localhost:8080/jive-messenger it redirects to http://localhost:8080/index.jsp instead of http://localhost:8080/jive-messenger/index.jsp.

  2. I have tried manually navigating to http://localhost:8080/jive-messenger/index.jsp which gives me an “Internal Error” in the browser and the following error in the jboss window:

10:25:23,828 INFO Jive Messenger 1.0.5 Professional Started

10:25:23,843 INFO Error starting the server. Please check the log files for more information.

10:25:23,843 WARN WARNING: Exception for /jive-messenger/index.jsp

java.lang.NullPointerException

at org.apache.jsp.index_jsp._jspService(index_jsp.java:57)

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

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

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

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

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

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

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

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

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

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

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

at org.jboss.jetty.Jetty.service(Jetty.java:460)

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

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

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

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

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

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

I’‘m sure most of the problems are because I’'m new to jboss and deploying a war. Any suggestions where I can start?

Thanks!

Hey Larry,

I was able to reproduce your problem - we’'ll look into it further and see what the problem might be.

We’'ll post here when we have an update.

Cheers,

–Bill

Larry,

The problem was twofold:

  1. The web.xml file we distribute was blank - this caused the redirect to not work correctly. Attached is a new web.xml (one we’'ll be distributing with 1.0.6). Give this a shot and let us know if it works.

  2. Your jiveHome dir isn’'t being properly set. You can do this a couple of ways, but the easiest is to set it in the WEB-INF/classes/jive_init.xml file. Open that file and make an entry like so:

<?xml version="1.0"?>
<!-- * For unix this might be: * <jiveHome>/var/web/jiveHome</jiveHome> * * For Windows this might be: * <jiveHome>c:\web\jiveHome</jiveHome>
-->
<jiveHome>C:\Program Files\Jive Messenger</jiveHome>

After those changes, reload JBoss and see if it works.

Cheers,

–Bill

Bill,

Thanks for the reply. The additions to the web.xml worked well and the redirection is working properly. However, I’‘m still getting the same NullPointerException in the jboss terminal. My installation directory for Messenger is c:\JiveMessenger and I have another c:\jiveHome directory configured for the Forums (both Messenger and Forums running on the same machine). I’'ve tried everything - putting c:\JiveMessenger, c:\JiveMessenger\web-app, c:\jiveHome, etc in the jive-init.xml file, but I keep getting the same Exception.

Thanks for the help.

Larry

Larry,

Could you try to not use the same jiveHome for Forums and Messenger? For now (to see if it works), try pointing the jiveHome var of your Messenger installation to the messenger installation directory. Let us know if that works.

Cheers,

–Bill

Hi Bill -

I’'ve tried putting my Messenger installation directory as the property (c:\JiveMessenger is my installation directory) as well as many others, some of which I listed earlier. JBoss still complains. I noticed in the jive_init.xml file, “This file must be in the classpath of your application server.” Does that mean c:\JiveMessenger needs to be in my jboss classpath?

Thanks -

Larry

Larry,

No, as long as the jive_init.xml file is in your classpath, it won’'t matter where the jiveHome dir is. Does your appserver have permission to read and write the jiveHome dir?

Cheers,

–Bill

Hi Bill-

Yes, jboss has read/write permission to the jiveHome directory.

Larry

Is this a pain or what?!?!?

Larry

Hi,

I think maybe we should take a step back. Please run Messenger standalone to ensure your messenger home directory is correctly configured. To do this, re-install Jive Messenger (if you used the installer on Windows, it’'s good to uninstall first, delete all files that remain, then re-install).

Go to your messenger home directory (your setup looks like c:\jiveMessenger).

Change into the ‘‘bin’’ directory and run ‘‘java -jar messengerd.jar’’.

Now use your webbrowser, hit http://127.0.0.1:9090 and see if you can setup messenger.

If this works, then your c:\jiveMessenger home directory is setup properly.

Now, it is important that you delete the c:\jiveMessenger\plug-ins\web-admin directory is per documentation/app-server-install-guide.html instructions.

Create your WAR, making sure jive_init.xml points to c:\jiveMessenger (the root of the installation).

Let me know what breaks when.

-iain

Hi Iain-

I ran the server as stand alone and I could configure Messenger in IE. I deleted the /plugins/web-admin as per instructions, created the war:

c:\JiveMessenger\web-app\jar -cvf jive-messenger.war .

I still get the same NullPointerException in the jboss appserver terminal.

Thanks-

Larry

Hi,

Can you delete the files in your messengerHome\logs directory, redeploy into jboss, then copy your log files here? Our embedded webserver used in standalone mode is Jetty (which you’'re using in Jboss) so there has to be some config problem lingering in your setup.

-iain

Hi Iain:

I deleted the logs from the c:\JiveMessenger\logs directory, however I’‘m not entirely sure which logs you want. In jboss, I have the request log, the boot log, and the server log. I would post all three, but I’'m not sure how to attach a file to this message, nor do I see something on this reply page that would allow me to attach files.

Let me know which log you want, and I’'ll copy/paste it here.

I have one question - am I building the war file correctly??? I just use the jar utility in my c:\JiveMessenger\web-app directory as follows:

c:\JiveMessenger\web-app>jar -cvf jive-messenger.war .

which of course then creates a war file with everything from the web-app directory and subdirectories. When I deploy the war file into jboss, it deploys okay, but nothing is ever written to the c:\JiveMessenger directory, which I set as my JiveHome. Hopefully all this is clear.

Thanks -

Larry

Hi,

I need the Messenger logs not the Jboss’’. So go into your messengerHome/logs directory and copy the three files named jive.*.log. You can past them into your post or attach it to your message (click on the ‘‘attach files’’ button when replying).

-iain

Hi Iain -

There are no logs in the c:\JiveMessenger\logs directory.

-Larry

Interesting. So you deploy the Messenger WAR, hit the page, get the error messages in jboss, but there are no *.log files produced in the jiveMessenger\logs dir? Could you run a search for a file called jive.error.log on your hard drive (excluding the one produced by forums). The lack of log files means either Messenger isn’‘t being started at all, or your jiveHome is not being set so it doesn’‘t know where to store the logs (and if jiveHome isn’'t being set, it can cause messenger to crash).

-iain

It gets even more interesting. . .

I searched the HD for the error log file and only found the one mapped from the forums (c:\jiveHome on my HD) - so I decided to check the last time it was modified to see if maybe Messenger is writing to that file - sure enough, there was this error in the jive.error.log file mapped to by Forums:

2003.07.18 09:49 [com.jivesoftware.container.spi.BootstrapContainer.start(BootstrapContainer.jav a:136)

]

java.lang.NullPointerException

at com.jivesoftware.container.spi.BootstrapContainer.loadPlugins(BootstrapContaine r.java:231)

at com.jivesoftware.container.spi.BootstrapContainer.start(BootstrapContainer.java :134)

at com.jivesoftware.container.spi.BootstrapContainer.(BootstrapContainer.jav a:110)

at com.jivesoftware.container.spi.ServiceLookupFactoryImpl.getLookup(ServiceLookup FactoryImpl.java:42)

at com.jivesoftware.container.ServiceLookupFactory.getLookup(ServiceLookupFactory. java:62)

at org.apache.jsp.index_jsp._jspService(index_jsp.java:55)

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

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

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

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

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

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

at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:192)

at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:129)

at org.mortbay.jetty.servlet.Default.handleGet(Default.java:274)

at org.mortbay.jetty.servlet.Default.service(Default.java:191)

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

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

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

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

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

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

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

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

at org.jboss.jetty.Jetty.service(Jetty.java:460)

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

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

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

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

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

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

Here’'s the last entry in the jive.info.log:

2003.07.17 17:04 Starting Jive Forums Enterprise 3.1.1

2003.07.18 09:49 Jive Messenger 1.0.5 Professional Started

2003.07.18 09:49 Messenger domain: 127.0.0.1

2003.07.18 09:49 Server successfully started

The other two logs are empty. I find this interesting. . . If I specify a jiveHome directory as c:\jiveHome in Forums then specify a jiveHome directory as c:\JiveMessenger in Messenger, why is the Messenger service writing it’'s info to the c:\jiveHome directory? Odd indeed.

  • Larry

Aha, now we’‘re getting somewhere. Jive Forums and Messenger can’‘t share the same jiveHome directory yet (a future integrated product is on our roadmap). It appears that your forums configuration is overriding your Messenger configuration so Messenger is trying to start in Forum’‘s jiveHome directory and that is causing the crash. Messenger’'s search for jiveHome follows these steps:

  1. Look for a system property named “jiveHome”. I suspect this is where forums is overriding Messenger. Did you set this property for forums in jboss? If so, you either need to unset it and use an alternative method for both forums and messenger, or make sure you override the system property for messenger’'s webapp.

  2. Look for the configuration file under the currentWorkingDirectory/…/config/jive_messenger.xml. This detects a standalone server and sets jiveHome for messenger to the “…” directory (Messenger standalone starts in the jiveHome/bin directory).

  3. Load the resource stream /jive_init.xml (in Java, resource streams are any files on the classpath). This is another likely scenario for your config trouble. If you have jive_init.xml configured for Forums and on the classpath for both Forums and Messenger (with the forum file first) then the Forums config file will override Messenger’‘s. You need to make sure your classpaths for forums and messenger are separate, and that they’‘re not being loaded by the appserver where the two application’'s classpaths can collide.

Hopefully you can troubleshoot your setup to separate Forums and Messenger jiveHome. I think once you do, Messenger should start normally especially since Messenger seems to work fine standalone on your system.

Isn’'t troubleshooting fun.

-iain

Hi Iain -

Two words:

WOO HOOOOO!!!

I found an entry in the jboss batch file that set the jiveHome directory. I summarily removed it and all is well. Now I get to play.

I should run out and buy your book to pay you back for all the help. Thanks!!!

  • Larry

Hi Larry,

My pleasure. (Although I definitely won’‘t discourage you from buying my book!) It’‘s a good learning experience for me too - now I’‘ll know to verify there isn’'t a conflict with jiveHome earlier in the troubleshooting process.

Thanks for your persistence.

-iain