6 Replies Latest reply on May 12, 2016 11:33 AM by Abhijit Humbe

    Confusion around workbench and git remote repository integration

    Praveen Gajjala Newbie

      I am confused with my understanding to kie workbench and the way workbench is working. Can somebody validate my below comments and throw some light on my understanding to the framework?.Thanks in Advance. (I am a newbie to drools but I have expert knowledge on maven, git and eclipse tools. I am running the latest version of kie-wb.war in tomcat environment)

       

      My Assumptions:

      1. Project (rules) development can happen from workbench and eclipse simultaneously.( Developers use eclipse and git to develop and modify the code; Non-developers/analysts use workbench to modify the rules). Correct me if my assumption is wrong.
      2. The same remote git repository can be cloned by a developer on his local machine to work on eclipse and as well be cloned from workbench (to allow parallel development from eclipse and workbench). Is this right?

       

       

      Issues i am seeing:

      1. I am unable to clone a remote git repo(where code is already residing) from workbench, throws Auth fail error. Not sure, why there was an exception even though i provided valid credentials.  Does workbench support cloning from remote repository?
      2. While running workbench on my local and when I try to clone a repo providing my local file address (example c:/code/drools-project/gitrepo), it worked fine for the first time. It pulled all the code and history but when I try to do an update, workbench doesn't pull any of my changes that are committed to local repo from eclipse/git-bash. Any idea what I am doing wrong over here?
      3. After cloning with local file address as stated in above statement, When i try to access the data objects in the editor, nothing shows up. I see" Loading..." message forever. So, Workbench doesn't understand/parse the similar data objects created from a non workbench tool?

       

      I am stuck with these questions and I really really need your inputs and guidance to make some progress. Your responses are much appreciated.


      Thanks

      Praveen

        • 2. Re: Confusion around workbench and git remote repository integration
          Abhijit Humbe Master

          Hi,

          1. I am unable to clone a remote git repo(where code is already residing) from workbench, throws Auth fail error. Not sure, why there was an exception even though i provided valid credentials.  Does workbench support cloning from remote repository?

          >> What exception you are facing while cloning repo ? share exception you got in log file.

           

          2. While running workbench on my local and when I try to clone a repo providing my local file address (example c:/code/drools-project/gitrepo), it worked fine for the first time. It pulled all the code and history but when I try to do an update, workbench doesn't pull any of my changes that are committed to local repo from eclipse/git-bash. Any idea what I am doing wrong over here?

          >> how you are trying to update repository ? If you are thinking if repository in filesystem is updated and server repository will be updated automatically then its expected to work

           

          3. After cloning with local file address as stated in above statement, When i try to access the data objects in the editor, nothing shows up. I see" Loading..." message forever. So, Workbench doesn't understand/parse the similar data objects created from a non workbench tool?

          >> To open project in workbench, project should contains few files like package-names-white-list, project.imports. Are these files exist in your project ?

          • 3. Re: Confusion around workbench and git remote repository integration
            Praveen Gajjala Newbie

            Thanks for responding to thread abhijithumbe

            Below are the generated error logs when I try to clone a remote repository. I changed the name of git url for confidentiality sake.

             

             

            SEVERE [http-apr-8080-exec-7] org.guvnor.structure.backend.repositories.RepositoryServiceImpl.createRepository Error during create repository

            java.lang.RuntimeException: java.lang.RuntimeException: my-git-server/my-project.git: Auth fail

              at org.guvnor.structure.backend.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:214)

              at org.guvnor.structure.backend.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:168)

              at org.guvnor.structure.backend.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.createRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java)

              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:497)

              at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48)

              at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22)

              at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)

              at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:396)

              at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47)

              at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:296)

              at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)

              at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97)

              at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114)

              at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

              at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:53)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

              at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:45)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

              at org.kie.integration.tomcat.JACCValve.invoke(JACCValve.java:101)

              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)

              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)

              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)

              at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500)

              at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

              at java.lang.Thread.run(Thread.java:745)

            Caused by: java.lang.RuntimeException: my-git-server/my-project.git: Auth fail

              at org.guvnor.structure.backend.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:110)

              at org.guvnor.structure.backend.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:77)

              at org.guvnor.structure.backend.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)

              at org.guvnor.structure.backend.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:60)

              at org.guvnor.structure.backend.repositories.RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.newRepository(RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.java)

              at org.guvnor.structure.backend.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:225)

              at org.guvnor.structure.backend.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:210)

              ... 46 more

            Caused by: java.lang.RuntimeException: org.eclipse.jgit.api.errors.TransportException: my-git-server/my-project.git: Auth fail

              at org.uberfire.java.nio.fs.jgit.util.JGitUtil.cloneRepository(JGitUtil.java:250)

              at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.newFileSystem(JGitFileSystemProvider.java:609)

              at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:117)

              at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:83)

              at org.uberfire.io.impl.AbstractIOService.newFileSystem(AbstractIOService.java:241)

              at org.uberfire.ext.metadata.io.IOServiceIndexedImpl.newFileSystem(IOServiceIndexedImpl.java:197)

              at org.guvnor.structure.backend.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:102)

              ... 52 more

            Caused by: org.eclipse.jgit.api.errors.TransportException: my-git-server/my-project.git: Auth fail

              at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)

              at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:193)

              at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:133)

              at org.uberfire.java.nio.fs.jgit.util.JGitUtil.cloneRepository(JGitUtil.java:229)

              ... 58 more

            Caused by: org.eclipse.jgit.errors.TransportException: my-git-server/my-project.git: Auth fail

              at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159)

              at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)

              at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)

              at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)

              at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)

              at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)

              at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)

              at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)

              ... 61 more

            Caused by: com.jcraft.jsch.JSchException: Auth fail

              at com.jcraft.jsch.Session.connect(Session.java:512)

              at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)

              ... 68 more

            • 4. Re: Confusion around workbench and git remote repository integration
              Praveen Gajjala Newbie

              3. After cloning with local file address as stated in above statement, When i try to access the data objects in the editor, nothing shows up. I see" Loading..." message forever. So, Workbench doesn't understand/parse the similar data objects created from a non workbench tool?

              >> To open project in workbench, project should contains few files like package-names-white-list, project.imports. Are these files exist in your project ?

               

              abhijithumbe, As per your suggestion, I added package-names-white-list and a empty project.imports files in the project home directory (where pom.xml resides). But, I still see the same spinning "Loading.." message when i try to access from the file explorer and below are the generated logs (and the project doesn't even show up in the Project Explorer ).

               

               

              04-May-2016 11:39:00.117 INFO [http-apr-8080-exec-1] org.kie.workbench.common.services.backend.service.KieService.loadOverview File: TestQuestion.java, full path [default://master@verify-git-drools/src/main/java/com/tr/kang/TestQuestion.java] was not within a Project. Project Name cannot be set.

              04-May-2016 11:39:00.119 WARNING [http-apr-8080-exec-1] org.kie.workbench.common.screens.datamodeller.backend.server.DataModelerServiceImpl.constructContent File : default://master@verify-git-drools/src/main/java/com/tr/kangaroo/TestQuestion.java do not belong to a valid project

              • 5. Re: Confusion around workbench and git remote repository integration
                Praveen Gajjala Newbie

                Hey abhijithumbe, Could you please spare a moment and share your thoughts? Thanks in advance

                • 6. Re: Confusion around workbench and git remote repository integration
                  Abhijit Humbe Master

                  Can you try adding below content to package-names-white-list and project.imports file:

                   

                  package-names-white-list

                     complete.package.of.project.**

                   

                  project.imports

                  <configuration>

                    <imports>

                      <imports>

                        <import>

                          <type>java.lang.Number</type>

                        </import>

                      </imports>

                    </imports>

                    <version>1.0</version>

                  </configuration>

                   

                  Normally we suggest to create project through jbpm-console, clone it into IDE, modify and push it back to jbpm server git repository