Installation error

I uninstalled JM 1.0 and tried to install the new version. The uninstallation went ok. While I was following the steps during the new installation I got an error.

After I have completed the DB driver to user and submitted the form I got this error. I’‘m using MySQL and I’'ve completed all the fields of the form.

Stack trace:`

2003.05.03 20:26 [com.jivesoftware.messenger.admin.setup_0002ddatasource_0002dstandard_jsp._jspService(setup_0002ddatasource_0002dstandard_jsp.java:281)
] java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at com.jivesoftware.messenger.admin.setup_0002ddatasource_0002dstandard_jsp._jspService(setup_0002ddatasource_0002dstandard_jsp.java:250)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
     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:280)
     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
     at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
     at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
     at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
     at org.mortbay.http.HttpServer.service(HttpServer.java:862)
     at org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
     at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
     at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
     at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
     at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
     at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
Caused by: java.lang.IllegalArgumentException: Adding text to an XML document must not be null
     at org.dom4j.DocumentFactory.createText(DocumentFactory.java:136)
     at org.dom4j.tree.AbstractElement.addText(AbstractElement.java:740)
     at org.dom4j.tree.AbstractElement.setText(AbstractElement.java:909)
     at com.jivesoftware.util.XMLProperties.setProperty(XMLProperties.java:188)
     at com.jivesoftware.xmpp.JiveGlobals.setJiveProperty(JiveGlobals.java:301)
     at com.jivesoftware.cache.DefaultConnectionProvider.saveProperties(DefaultConnectionProvider.java:312)
     at com.jivesoftware.cache.DefaultConnectionProvider.setMinConnections(DefaultConnectionProvider.java:220)
     ... 20 more
2003.05.03 20:26 [com.jivesoftware.cache.ConnectionPool.<init>(ConnectionPool.java:64)
] JDBC driver value is null.

View in the browser after the error:

HTTP ERROR: 500 Internal Server Error

RequestURI=/setup-datasource-standard.jsp

This is the jive-messenger.xml generated so far:

<!--
    This file stores all properties needed by Jive Messenger.
    Property names must be in the format: "prop.name.is.blah=value"
    That will be stored as:
        <prop>
            <name>
                <is>
                    <blah>value</blah>
                </is>
            </name>
        </prop>      All properties must be under the "jive" element.      This file should live in your jiveHome directory.    Stand-alone deployments:
       jiveHome is the installation directory.
   App-server deployments:
       jiveHome should be specified in your jive_init.property file.
       The jive_init.xml file must be in your appserver''s classpath.
-->
<!-- root element, all properties must be under this element -->
<jive>
    <xmpp>
        <domain>gato.org</domain>
        <chat>
            <domain>chat.gato.org</domain>
        </chat>
        <stream-logging>false</stream-logging>
        <audit>
            <active>false</active>
        </audit>
        <socket>
            <plain>
                <active>true</active>
                <port>5222</port>
            </plain>
            <ssl>
                <active>true</active>
                <port>5223</port>
                <storeType>JKS</storeType>
                <keystore>security/keystore</keystore>
                <keypass>changeit</keypass>
                <truststore/>
                <trustpass/>
            </ssl>
        </socket>
    </xmpp>
    <auth>
        <anonymous>false</anonymous>
    </auth>
    <embedded-web>
        <port>9090</port>
    </embedded-web>
<connectionProvider>
        <className>com.jivesoftware.cache.DefaultConnectionProvider</className>
    </connectionProvider>
    <database>
        <defaultProvider>
            <driver/>
        </defaultProvider>
    </database>
</jive>

Error in the embedded-web.log file:

20:26:03.531 WARN!! [PoolThread-0]org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:579)11> Exception for /setup-datasource-standard.jsp
java.lang.NullPointerException
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:140)
     at com.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:50)
     at com.jivesoftware.util.ClassUtils.forName(ClassUtils.java:40)
     at com.jivesoftware.cache.ConnectionPool.<init>(ConnectionPool.java:67)
     at com.jivesoftware.cache.DefaultConnectionProvider.start(DefaultConnectionProvider.java:88)
     at com.jivesoftware.cache.DbConnectionManager.setConnectionProvider(DbConnectionManager.java:245)
     at com.jivesoftware.messenger.admin.setup_0002ddatasource_0002dstandard_jsp._jspService(setup_0002ddatasource_0002dstandard_jsp.java:284)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
     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:280)
     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
     at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
     at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
     at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
     at org.mortbay.http.HttpServer.service(HttpServer.java:862)
     at org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
     at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
     at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
     at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
     at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
     at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)

I’'ll see if I can get more information or find out the reason of this problem.

Note: The mysql driver is in the lib directory (as in the previous version).

TIA,

– Gato

Gato,

Thanks for the bug report. We’'ll look into it and get back to you. Can you provide a few more details about your environment? Are you still using JDK 1.3, for example?

Regards,

Matt

Matt,

I’‘m using JDK 1.4 (I’‘m at home). I’'ve been doing some more research on this and found this info and explanation.

These are the Jive properties that are sent to JiveGlobals. As you can see the last property (database.defaultProvider.driver) is null. That’'s the reason of the exception.

2003.05.04 10:56 name = xmpp.domain

2003.05.04 10:56 value = gato.org

2003.05.04 10:56 name = xmpp.chat.domain

2003.05.04 10:56 value = chat.gato.org

2003.05.04 10:56 name = xmpp.socket.plain.port

2003.05.04 10:56 value = 5222

2003.05.04 10:56 name = embedded-web.port

2003.05.04 10:56 value = 9090

2003.05.04 10:56 name = xmpp.socket.ssl.active

2003.05.04 10:56 value = true

2003.05.04 10:56 name = xmpp.socket.ssl.port

2003.05.04 10:56 value = 5223

2003.05.04 10:56 name = connectionProvider.className

2003.05.04 10:56 value = com.jivesoftware.cache.DefaultConnectionProvider

2003.05.04 10:56 name = database.defaultProvider.driver

2003.05.04 10:56 value = null

If I’'m not wrong the problem is that DefaultConnectionProvider tries to save the properties whenever each property is being set.

Since setup-datasource-standard.jsp first assigns the property “minConnections”, DefaultConnectionProvider tries to save its properties but the problem is that the other DefaultConnectionProvider’'s properties are still null generating the exception.

Caused by: java.lang.IllegalArgumentException: Adding text to an XML document must not be null
     at org.dom4j.DocumentFactory.createText(DocumentFactory.java:136)
     at org.dom4j.tree.AbstractElement.addText(AbstractElement.java:740)
     at org.dom4j.tree.AbstractElement.setText(AbstractElement.java:909)
     at com.jivesoftware.util.XMLProperties.setProperty(XMLProperties.java:188)
     at com.jivesoftware.xmpp.JiveGlobals.setJiveProperty(JiveGlobals.java:102)
     at com.jivesoftware.cache.DefaultConnectionProvider.saveProperties(DefaultConnectionProvider.java:312)
     at com.jivesoftware.cache.DefaultConnectionProvider.setMinConnections(DefaultConnectionProvider.java:220)

Regards,

– Gato

Matt,

I would like to know if is it possible to get the source code? BTW, for some reason I didn’'t receive the notification email when you replied to this thread.

TIA,

– Gato

Gato,

We’‘ve verified the problem and have no idea how it got past testing of the release. Unfortunately, we don’'t have any source release package at the moment or currently in the works. Also, not sure why the nofication email might not have come. Do you have this watch configured as an email watch?

We should have a fixed release up by the end of the day.

Thanks,

Matt

Matt,

Also, not sure why the notification email might not have come. Do you have this watch configured as an email watch?

I checked my watches and found out that I don’'t have a watch for this thread. The strange thing is that I have the option “Always watch topics I create” setted to yes in my preferences.

Regards,

– Gato

We updated the current download with a version that fixes this error. Please give it a test drive.

-iain

Iain,

The installation worked fine.

Thanks,

– Gato