ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bram Pouwelse (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACE-501) NPE when enabling authentication for AgentDeploymentServlet
Date Fri, 05 Dec 2014 09:32:12 GMT
Bram Pouwelse created ACE-501:
---------------------------------

             Summary: NPE when enabling authentication for AgentDeploymentServlet
                 Key: ACE-501
                 URL: https://issues.apache.org/jira/browse/ACE-501
             Project: ACE
          Issue Type: Bug
    Affects Versions: 2.0.1
            Reporter: Bram Pouwelse


If authentication is enabled for the {{AgentDeploymentServlet}} the servlet throws a {{NullPointerException}}.
I guess this has something to do with the {{AuthenticationService}} never being injected by
the DependencyManager



{code:title=AgentDeploymentServlet.java}
    // injected by Dependency Manager
    private volatile LogService m_log;
    private volatile AuthenticationService m_authService;
    private volatile ConnectionFactory m_connectionFactory;
{code}

{code:title=Activator.java}
manager.add(createComponent()
            .setInterface(Servlet.class.getName(), null)
            .setImplementation(AgentDeploymentServlet.class)
            .add(createConfigurationDependency().setPropagate(true).setPid(AGENT_PID))
            .add(createServiceDependency().setService(ConnectionFactory.class).setRequired(true))
            .add(createServiceDependency().setService(LogService.class).setRequired(false))
        );
{code}

{code}
2014-12-05 09:25:33.639:WARN:oejs.ServletHandler:/agent/blub/org.apache.ace.agent/versions/
java.lang.NullPointerException
        at org.apache.ace.deployment.servlet.AgentDeploymentServlet.authenticate(AgentDeploymentServlet.java:177)
        at org.apache.ace.deployment.servlet.AgentDeploymentServlet.service(AgentDeploymentServlet.java:158)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
        at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
        at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
        at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
        at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
        at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
        at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
        at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:369)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:933)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:995)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:745)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message