8 Replies Latest reply on Oct 31, 2011 12:07 PM by Demian Calcaprina

    Upload processes to Guvnor using ant

    Demian Calcaprina Master

      Hi guys,

       

      I am trying to upload processes to guvnor using webdav with an ant script. I am using this script:

      <target name="upload" depends="declare-tasks">

                   <dav:put url="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/defaultPackage"

                             userid="" password=""

                                   lock="false" overwrite="true">

                                    <dav:fileset dir=".">

                                              <dav:include name="Process.bpmn"/>

                                    </dav:fileset>

                          </dav:put>

                </target>

       

       

       

      But when I execute it, I see in guvnor logs:

      ERROR 20-10 21:53:37,701 (WebDavServletBean.java:service:154) Exception: org.drools.repository.RulesRepositoryException: javax.jcr.AccessDeniedException: Access denied

      at org.drools.repository.PackageItem.addAsset(PackageItem.java:290)

      at org.drools.repository.PackageItem.addAsset(PackageItem.java:228)

      at org.drools.guvnor.server.files.WebDAVImpl.createResource(WebDAVImpl.java:140)

      at net.sf.webdav.methods.DoPut.execute(DoPut.java:104)

      at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128)

      at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:76)

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

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

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

      at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)

      at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)

      at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)

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

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

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

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

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

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

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

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

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

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

      Caused by: javax.jcr.AccessDeniedException: Access denied


      at org.apache.jackrabbit.core.security.simple.SimpleAccessManager.checkPermission(SimpleAccessManager.java:138)

      at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1476)

      at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:2082)

      at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1987)

      at org.drools.repository.PackageItem.addAsset(PackageItem.java:248)

      ... 23 more

       

       

      Any help?

       

      Thanks,

       

      Demian

        • 1. Re: Upload processes to Guvnor using ant
          Jervis Liu Apprentice

          Hi, Could you please try to access Guvnor through WebDav using the methods described by the doc: http://docs.jboss.org/drools/release/5.3.0.Final/drools-guvnor-docs/html/ch09.html#d0e2774?

           

          If this works, then its probably a bug or a configuration problem in your ant webdav plugin.

           

          Cheers,

          Jervis

          • 2. Re: Upload processes to Guvnor using ant
            Demian Calcaprina Master

            Hi Jervis, thanks for the response. I connected in Ubuntu..

            Screenshot-13.png

            I'm using version 5.2.0.Final

             

            I can surf over the folders, but not add or delete files, with the same error:

            ERROR 24-10 09:05:30,332 (WebDavServletBean.java:service:154) Exception: org.drools.repository.RulesRepositoryException: javax.jcr.AccessDeniedException: Access denied

            at org.drools.repository.VersionableItem.checkout(VersionableItem.java:561)

            at org.drools.repository.VersionableItem.checkout(VersionableItem.java:531)

            at org.drools.repository.VersionableItem.archiveItem(VersionableItem.java:893)

            at org.drools.guvnor.server.files.WebDAVImpl.removeObject(WebDAVImpl.java:649)

            at net.sf.webdav.methods.DoDelete.deleteResource(DoDelete.java:134)

            at net.sf.webdav.methods.DoDelete.execute(DoDelete.java:79)

            at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128)

            at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:76)

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

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

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

            at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)

            at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)

            at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)

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

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

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

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

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

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

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

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

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

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

            Caused by: javax.jcr.AccessDeniedException: Access denied


            at org.apache.jackrabbit.core.security.simple.SimpleAccessManager.checkPermission(SimpleAccessManager.java:138)

            at org.apache.jackrabbit.core.ItemValidator.checkCondition(ItemValidator.java:320)

            at org.apache.jackrabbit.core.ItemValidator.checkModify(ItemValidator.java:277)

            at org.apache.jackrabbit.core.VersionManagerImpl.getNodeState(VersionManagerImpl.java:520)

            at org.apache.jackrabbit.core.VersionManagerImpl.getNodeState(VersionManagerImpl.java:505)

            at org.apache.jackrabbit.core.VersionManagerImpl.checkout(VersionManagerImpl.java:114)

            at org.drools.repository.VersionableItem.checkout(VersionableItem.java:540)

            ... 25 more

             

            Thanks,

             

            Demian

            • 3. Re: Upload processes to Guvnor using ant
              Jervis Liu Apprentice

              If you have configured Guvnor to use authentication other than the default nilAuthenticator.authenticate (in components.xml), you need to configure your webdav client with a valid user name and password.

               

              Cheers,

              Jervis

              • 4. Re: Upload processes to Guvnor using ant
                Demian Calcaprina Master

                Hey Jervis, thanks again for your time. I am using nilAutenticator :S

                 

                        <security:identity

                        authenticate-method="#{nilAuthenticator.authenticate}"/>

                • 5. Re: Upload processes to Guvnor using ant
                  Jordan Reynolds Newbie

                  I am having this exact same problem, trying to upload a spreadsheet decision table into Guvnor using WebDAV API in a Java program. I am also using the nilAuthenticator

                  • 6. Re: Upload processes to Guvnor using ant
                    Demian Calcaprina Master

                    Now I deployed guvnor into weblogic 10, using this guide: http://community.jboss.org/wiki/DroolsGuvnor50Installation and I am getting the same error:

                    ERROR 31-10 07:58:35,951 (WebDavServletBean.java:service:154) Exception: org.drools.repository.RulesRepositoryException: javax.jcr.AccessDeniedException: Access denied

                    at org.drools.repository.PackageItem.addAsset(PackageItem.java:290)

                    at org.drools.repository.PackageItem.addAsset(PackageItem.java:228)

                    at org.drools.guvnor.server.files.WebDAVImpl.createResource(WebDAVImpl.java:140)

                    at net.sf.webdav.methods.DoPut.execute(DoPut.java:104)

                    at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128)

                    at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:76)

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

                    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

                    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

                    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)

                    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)

                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

                    at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)

                    at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)

                    at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)

                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

                    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)

                    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

                    at weblogic.security.service.SecurityManager.runAs(Unknown Source)

                    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)

                    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)

                    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)

                    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

                    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

                    Caused by: javax.jcr.AccessDeniedException: Access denied


                    at org.apache.jackrabbit.core.security.simple.SimpleAccessManager.checkPermission(SimpleAccessManager.java:138)

                    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1476)

                    at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:2082)

                    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1987)

                    at org.drools.repository.PackageItem.addAsset(PackageItem.java:248)

                    ... 23 more

                     

                     

                    INFO  31-10 07:58:36,151 (NilAuthenticator.java:authenticate:35) All users are guests.
                    INFO  31-10 07:58:36,152 (RepositoryServlet.java:allowUser:114) null authenticated for rest api
                    ERROR 31-10 07:58:36,155 (WebDavServletBean.java:service:154) Exception: org.drools.repository.RulesRepositoryException: javax.jcr.AccessDeniedException: Access denied

                    at org.drools.repository.PackageItem.addAsset(PackageItem.java:290)

                    at org.drools.repository.PackageItem.addAsset(PackageItem.java:228)

                    at org.drools.guvnor.server.files.WebDAVImpl.createResource(WebDAVImpl.java:140)

                    at net.sf.webdav.methods.DoPut.execute(DoPut.java:104)

                    at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128)

                    at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:76)

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

                    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

                    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

                    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)

                    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)

                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

                    at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)

                    at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)

                    at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)

                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

                    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)

                    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

                    at weblogic.security.service.SecurityManager.runAs(Unknown Source)

                    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)

                    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)

                    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)

                    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

                    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

                    Caused by: javax.jcr.AccessDeniedException: Access denied


                    at org.apache.jackrabbit.core.security.simple.SimpleAccessManager.checkPermission(SimpleAccessManager.java:138)

                    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1476)

                    at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:2082)

                    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1987)

                    at org.drools.repository.PackageItem.addAsset(PackageItem.java:248)

                    ... 23 more

                     

                     

                    INFO  31-10 07:58:36,998 (NilAuthenticator.java:authenticate:35) All users are guests.
                    INFO  31-10 07:58:36,999 (RepositoryServlet.java:allowUser:114) null authenticated for rest api

                    ls

                    • 7. Re: Upload processes to Guvnor using ant
                      Jordan Reynolds Newbie

                      Demian,

                       

                      I think this is a common issue with JBOSS BRMS installations before 5.3. I actually ditched webdav, and got it working by using REST, which is much easier and more stable. Do you want to see some examples?

                      1 of 1 people found this helpful
                      • 8. Re: Upload processes to Guvnor using ant
                        Demian Calcaprina Master

                        Yes, I asked in Jbpm forum and recommended it. But last issue I am having it from eclipse plugin, and specifically when I deployed (or tried) guvnor in weblogic..