<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Upload processes to Guvnor using ant
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/calca">Demian Calcaprina</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/633181#633181">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi guys,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I am trying to upload processes to guvnor using webdav with an ant script. I am using this script:</p><p> <target name="upload" depends="declare-tasks"></p><p><span>             <dav:put url="</span><a class="jive-link-external-small" href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/defaultPackage" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/defaultPackage</a><span>"</span></p><p>                       userid="" password=""</p><p>                             lock="false" overwrite="true"></p><p>                              <dav:fileset dir="."></p><p>                                        <dav:include name="Process.bpmn"/></p><p>                              </dav:fileset></p><p>                    </dav:put> </p><p>          </target></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>But when I execute it, I see in guvnor logs:</p><table><tbody><tr><td style=";">ERROR 20-10 21:53:37,701 (WebDavServletBean.java:service:154)</td><td style=";"> Exception: org.drools.repository.RulesRepositoryException: javax.jcr.AccessDeniedException: Access denied</td></tr><tr><td style=";"><br/></td><td style=";">at org.drools.repository.PackageItem.addAsset(PackageItem.java:290)</td></tr><tr><td style=";"><br/></td><td style=";">at org.drools.repository.PackageItem.addAsset(PackageItem.java:228)</td></tr><tr><td style=";"><br/></td><td style=";">at org.drools.guvnor.server.files.WebDAVImpl.createResource(WebDAVImpl.java:140)</td></tr><tr><td style=";"><br/></td><td style=";">at net.sf.webdav.methods.DoPut.execute(DoPut.java:104)</td></tr><tr><td style=";"><br/></td><td style=";">at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128)</td></tr><tr><td style=";"><br/></td><td style=";">at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:76)</td></tr><tr><td style=";"><br/></td><td style=";">at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</td></tr><tr><td style=";"><br/></td><td style=";">at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)</td></tr><tr><td style=";"><br/></td><td style=";">at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)</td></tr><tr><td style=";"><br/></td><td style=";">at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)</td></tr><tr><td style=";"><br/></td><td style=";">at java.lang.Thread.run(Thread.java:662)</td></tr></tbody></table><p>Caused by: javax.jcr.AccessDeniedException: Access denied</p><table><tbody><tr><td style=";"><br/></td><td style=";">at org.apache.jackrabbit.core.security.simple.SimpleAccessManager.checkPermission(SimpleAccessManager.java:138)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1476)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:2082)</td></tr><tr><td style=";"><br/></td><td style=";">at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1987)</td></tr><tr><td style=";"><br/></td><td style=";">at org.drools.repository.PackageItem.addAsset(PackageItem.java:248)</td></tr><tr><td style=";"><br/></td><td style=";">... 23 more</td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Any help?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Demian</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/633181#633181">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>