If you are seeing the following exception when running Jetspeed on IBM
WebSphere Application Server:

[Fri Nov 17 02:34:41 EST 2000] --  ERROR  -- Could not initialize the
RegistryManager:
     Exception:  java.lang.NullPointerException
     Stack Trace follows:
     java.lang.NullPointerException
     at
org.apache.jetspeed.cache.disk.DiskCacheUtils.getLocalURL(DiskCacheUtils.java:151)
     at
org.apache.jetspeed.cache.disk.JetspeedDiskCache.getEntry(JetspeedDiskCache.java:217)
     at
org.apache.jetspeed.cache.disk.JetspeedDiskCache.getEntry(JetspeedDiskCache.java:183)
     at
org.apache.jetspeed.registry.RegistryManager.init(RegistryManager.java:200)
     at org.apache.jetspeed.JetspeedServlet.init(JetspeedServlet.java:182)
     at
com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.java:558)
     at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.
_init(StrictLifecycleServlet.java:136)
     at
com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:244)
     at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:102)
     at
com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:277)
     at javax.servlet.GenericServlet.init(GenericServlet.java:258)
     at
com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java:71)
     at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:88)
     at
com.ibm.servlet.engine.webapp.WebAppServletManager.getServletReference(WebAppServletManager.java:132)
     at
com.ibm.servlet.engine.webapp.WebApp.getServletReference(WebApp.java:281)
     at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcherInfo.calculateInfo(WebAppRequestDispatcherInfo.java:139)
     at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcherInfo.<init>(WebAppRequestDispatcherInfo.java:43)
     at
com.ibm.servlet.engine.webapp.WebApp.getRequestDispatcher(WebApp.java:932)
     at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:73)
     at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
     at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:155)
     at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300)
     at
com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerImp.java:230)
     at
com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.java:104)
     at
com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.java:212)
     at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(SQWrapperEventSource.java:347)
     at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQWrapperEventSource.java:216)
     at
com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(OutOfProcThread.java:248)
     at java.lang.Thread.run(Thread.java:481)

Here is a fix for you.  The problem is a bug in IBM WebSphere Application
Server.  To fix the problem, you will need this servlet:

----- snip ----
package com.ibm.pvc.fixes;

/**
* This class is designed to fix a bug in WebSphere Application Server
version 3.0 and 3.5.
* Without this fix, calls to ServletContext.getResource() fail with a
MalformedURLException.
* This failure is because the com.ibm.servlet.classloader.Handler is not
registered with the
* system as a handler for the classloader:// protocol.  The registration
for this class is
* contained in a static initializer in the class and therefore simply
loading the class into
* the VM will register it in the system property
java.protocol.handler.pkgs.
*
*/

public class WasClassLoaderHandlerFix extends
javax.servlet.http.HttpServlet {

    static {
        try {
            Class.forName("com.ibm.servlet.classloader.Handler");
            System.out.println("WasClassLoaderHandlerFix was successful.");
        }
        catch (Throwable throwable) {
            System.out.println("WasClassLoaderHandlerFix failed.");
            throwable.printStackTrace();
        }
    }
}

----- snip ----

Compile this code and put it in the classpath.  Then create a servlet in
the Administration GUI.  It is really important that you set "Load at
startup" to TRUE on the Advanced tab.
______________________________________________________
Michael D. Harris - IBM Pervasive Computing - RTP, NC
E-Mail: [EMAIL PROTECTED] - IBM VNet: HARRISMD@IBMUSM27
Lotus Notes: Michael D Harris/Raleigh/IBM@IBMUS



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://marc.theaimsgroup.com/?l=jetspeed>
Problems?:           [EMAIL PROTECTED]

Reply via email to