Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

npe thrown when getting file history from a different branch #539

Open
gashcrumb opened this issue Sep 16, 2016 · 0 comments
Open

npe thrown when getting file history from a different branch #539

gashcrumb opened this issue Sep 16, 2016 · 0 comments

Comments

@gashcrumb
Copy link
Contributor

Create a project, then clone it (I used 'integration' and named it 'camel-test1'). Create a new branch and push it, make some change to src/main/java/org/example/Application.java, commit and push it.

Go into fabric8-console's source viewer, change to the 'foobar' branch, and navigate to Application.java. Click on the History button, the page will be blank and the following error shows up in the developer console:

[Wiki] failed to load! http://localhost:9000/k8s/api/v1/proxy/namespaces/default/services/fabric8-…secretNamespace=user-secrets-source-admin&kubeUserName=admin&branch=foobar. status: 500 data: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /api/forge/repos/project/default/camel-test1/history/foobar/src/main/java/org/example/Application.java. Reason:
<pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NullPointerException
    at org.eclipse.jgit.lib.ObjectIdOwnerMap.get(ObjectIdOwnerMap.java:131)
    at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:857)
    at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:772)
    at org.gitective.core.CommitUtils.parse(CommitUtils.java:348)
    at org.gitective.core.CommitUtils.getCommit(CommitUtils.java:70)
    at org.gitective.core.CommitFinder.findBetween(CommitFinder.java:304)
    at org.gitective.core.CommitFinder.findFrom(CommitFinder.java:204)
    at io.fabric8.forge.rest.git.RepositoryResource.doHistory(RepositoryResource.java:537)
    at io.fabric8.forge.rest.git.RepositoryResource$7.call(RepositoryResource.java:508)
    at io.fabric8.forge.rest.git.RepositoryResource$7.call(RepositoryResource.java:505)
    at io.fabric8.forge.rest.git.RepositoryResource$15.call(RepositoryResource.java:800)
    at io.fabric8.forge.rest.git.GitLockManager.withLock(GitLockManager.java:45)
    at io.fabric8.forge.rest.git.RepositoryResource.gitOperation(RepositoryResource.java:753)
    at io.fabric8.forge.rest.git.RepositoryResource.gitReadOperation(RepositoryResource.java:739)
    at io.fabric8.forge.rest.git.RepositoryResource.gitReadOperation(RepositoryResource.java:733)
    at io.fabric8.forge.rest.git.RepositoryResource.history(RepositoryResource.java:505)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:260)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:222)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.server.Server.handle(Server.java:524)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
    at java.lang.Thread.run(Thread.java:745)
</pre>
<hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.3.10.v20160621</a><hr/>

</body>
</html>

Found while testing this PR: fabric8io/fabric8-console#218

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant