-
1. Re: Git Connector on ModeShape 4.0
hchiorean Oct 28, 2014 2:24 PM (in response to mashama)You cannot reference the target projection in the Git repository as /git/test. If you don't want to reference the root of the Git repository (i.e. "default:/projection1 => /") you need to reference one of the connector-aware paths (for example "default:/projection1 => /commit/8dcf7dfc91a8d532749a391d14e9cc8bd78868fa")
See Git connector - ModeShape 4 - Project Documentation Editor for the structure exposed/supported by the connector.
-
2. Re: Re: Git Connector on ModeShape 4.0
mashama Oct 29, 2014 10:12 AM (in response to hchiorean)Thanks for your help Horia. The documentation is a little confusing here. The projections specification in the JSON lead me down this course.
{
...
"externalSources"
: {
"local-git-repo"
: {
"classname"
:
"org.modeshape.connector.git.GitConnector"
,
"directoryPath"
:
"/home/jsmit/git/MyRepo/"
,
"remoteName"
:
"upstream,origin"
,
"includeMimeType"
:
true
,
"projections"
: \[
"/git/MyRepo"
\]
}
}
...
}
So I can now access the GIT repository through ModeShape's REST Service. However when accessing a git:tree node I get the following stacktrace:
{
"exception": "No valid property definition on node '/projection1/tree/44a4967538e2e95c62a469e40cac2da06bf549e8' with primary type 'git:folder' and mixin types [] for the property: git:detail="46f1a0beaa9871/commit/44a4967538e2e95c62a469e40cac2da06bf549e8"",
"stacktrace": "javax.jcr.RepositoryException: No valid property definition on node '/projection1/tree/44a4967538e2e95c62a469e40cac2da06bf549e8' with primary type 'git:folder' and mixin types [] for the property: git:detail="46f1a0beaa9871/commit/44a4967538e2e95c62a469e40cac2da06bf549e8"
at org.modeshape.jcr.AbstractJcrNode.findJcrProperties(AbstractJcrNode.java:2035)
at org.modeshape.jcr.AbstractJcrNode.getProperties(AbstractJcrNode.java:2043)
at org.modeshape.web.jcr.rest.handler.AbstractHandler.createRestNode(AbstractHandler.java:304)
at org.modeshape.web.jcr.rest.handler.AbstractHandler.createRestItem(AbstractHandler.java:243)
at org.modeshape.web.jcr.rest.handler.RestItemHandler.item(RestItemHandler.java:67)
at org.modeshape.web.jcr.rest.ModeShapeRestService.getItem(ModeShapeRestService.java:303)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)
at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:27)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)rnCaused by: javax.jcr.nodetype.ConstraintViolationException: No valid property definition on node '/projection1/tree/44a4967538e2e95c62a469e40cac2da06bf549e8' with primary type 'git:folder' and mixin types [] for the property: git:detail="46f1a0beaa9871/commit/44a4967538e2e95c62a469e40cac2da06bf549e8"
at org.modeshape.jcr.AbstractJcrNode.propertyDefinitionFor(AbstractJcrNode.java:473)
at org.modeshape.jcr.AbstractJcrNode.createJcrProperty(AbstractJcrNode.java:394)
at org.modeshape.jcr.AbstractJcrNode.getProperty(AbstractJcrNode.java:358)
at org.modeshape.jcr.AbstractJcrNode.findJcrProperties(AbstractJcrNode.java:2028)
... 47 morern"
}
I have seen exceptions before when exploring JCR repositories via the REST Service. Should I be concerned about this one? -
3. Re: Re: Git Connector on ModeShape 4.0
hchiorean Oct 29, 2014 10:32 AM (in response to mashama)It seems there are several issues with the GitConnector atm. I've opened [MODE-2352] Git Connector exceptions when navigating via the REST service - JBoss Issue Tracker which we'll hopefully handle for 4.1.
Have you seen the above exception for other connectors as well ? If yes, which ones ? Thanks.
-
4. Re: Re: Git Connector on ModeShape 4.0
mashama Oct 29, 2014 12:15 PM (in response to hchiorean)This is the only connector we have delved into at the moment.