Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gyrex-dev] NullPointer in ApplicationResourceServlet

No, did not use the latest build. Will do immediatelly.

And in that second i solved the problem with a locally patch. ;-)

class ApplicationContext {

    @Override
    public void registerResources(final String alias, final String name,
            IResourceProvider provider) throws NamespaceException {
        ....
 

            // register a resource servlet to make the resources accessible
            ServletHolder holder = ApplicationResourceServlet
                    .newHolder(applicationHandler);
            applicationHandler.getServletHandler().addServletWithMapping(
                    holder, pathSpec);
            // start if already started
            if (applicationHandler.getServletHandler().isStarted()
                    || applicationHandler.getServletHandler().isStarting()) {
                try {
                    holder.start();
                } catch (final Exception e) {
                    // attempt a clean unregister
                    try {
                        unregister(alias);
                    } catch (final Exception e2) {
                        if (JettyDebug.debug) {
                            LOG.debug(
                                    "Exception during cleanup of failed registration.",
                                    e2);
                        }

              ....
    }

Back to the top