Commonjava / atlas

Project-Graphing API
Other
7 stars 14 forks source link

InvalidRefException when processing paths result in cartographer #57

Closed pkocandr closed 8 years ago

pkocandr commented 8 years ago

The stacktrace is not exactly the same as in #50 so filing another issue.

08:02:02.357 [XNIO-1 task-82] ERROR io.undertow.request - UT005023: Exception handling request to /api/depgraph/graph/paths
org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception
        at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:148) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:432) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:376) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
        at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at org.commonjava.aprox.bind.jaxrs.ResourceManagementFilter.doFilter(ResourceManagementFilter.java:60) ~[aprox-embedder-savant-0.25.2-SNAPSHOT.jar:na]
        at org.commonjava.aprox.bind.jaxrs.ResourceManagementFilter$Proxy$_$$_WeldClientProxy.doFilter(Unknown Source) ~[aprox-embedder-savant-0.25.2-SNAPSHOT.jar:na]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) ~[undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) ~[undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) ~[undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at org.commonjava.aprox.bind.jaxrs.HeaderDebugger.handleRequest(HeaderDebugger.java:93) ~[aprox-embedder-savant-0.25.2-SNAPSHOT.jar:na]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) ~[undertow-servlet-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) ~[undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:764) [undertow-core-1.1.2.Final.jar:1.1.2.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
Caused by: com.fasterxml.jackson.databind.JsonMappingException: ProjectId must contain non-empty groupId AND artifactId. (Given: 'null':'null', db-node=2699) (through reference chain: org.commonjava.cartographer.result.ProjectPathsResult["projects"]->java.util.HashMap["null:null:16"]->org.commonjava.cartographer.result.ProjectPaths["paths"]->java.util.ArrayList[121]->org.commonjava.cartographer.result.ProjectPath["pathParts"]->java.util.ArrayList[4])
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:232) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:211) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:213) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:105) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:21) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:183) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:100) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:21) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:183) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:491) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:412) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:27) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:114) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:602) ~[jackson-databind-2.4.1.jar:2.4.1]
        at com.fasterxml.jackson.jaxrs.base.ProviderBase.writeTo(ProviderBase.java:647) ~[jackson-jaxrs-base-2.4.1.jar:2.4.1]
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.writeTo(AbstractWriterInterceptorContext.java:129) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.interception.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:62) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:118) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.aroundWriteTo(GZIPEncodingInterceptor.java:100) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:122) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:99) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:427) ~[resteasy-jaxrs-3.0.9.Final.jar:na]
        ... 35 common frames omitted
Caused by: org.commonjava.maven.atlas.ident.ref.InvalidRefException: ProjectId must contain non-empty groupId AND artifactId. (Given: 'null':'null', db-node=2699)
        at org.commonjava.maven.atlas.graph.spi.neo4j.model.NeoProjectRef.<init>(NeoProjectRef.java:91) ~[atlas-driver-neo4j-embedded-0.15.3-SNAPSHOT.jar:na]
        at org.commonjava.maven.atlas.graph.spi.neo4j.model.NeoProjectVersionRef.<init>(NeoProjectVersionRef.java:51) ~[atlas-driver-neo4j-embedded-0.15.3-SNAPSHOT.jar:na]
        at org.commonjava.maven.atlas.graph.spi.neo4j.model.AbstractNeoProjectRelationship.getDeclaring(AbstractNeoProjectRelationship.java:114) ~[atlas-driver-neo4j-embedded-0.15.3-SNAPSHOT.jar:na]
        at org.commonjava.maven.atlas.graph.jackson.ProjectRelationshipSerializer.serialize(ProjectRelationshipSerializer.java:80) ~[atlas-bindings-jackson-relationships-0.15.3-SNAPSHOT.jar:na]
        at org.commonjava.maven.atlas.graph.jackson.ProjectRelationshipSerializer.serialize(ProjectRelationshipSerializer.java:37) ~[atlas-bindings-jackson-relationships-0.15.3-SNAPSHOT.jar:na]
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:100) ~[jackson-databind-2.4.1.jar:2.4.1]
        ... 62 common frames omitted
pkocandr commented 8 years ago

The node ID is different with each run, so it is probably not a problem in stored data but in their processing. In the stacktrace above it was node 2699, next time it was 2248, then 2229 while using the same workspace with no changes (resolve was set to false) all the time, only trying to read paths.

pkocandr commented 8 years ago

The issue seems to be fixed now by https://github.com/Commonjava/cartographer/issues/94