jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: "Bad Request" exception using DavEx
Date Thu, 18 Mar 2010 10:33:28 GMT
hi xuetao

and what exactly does getRtdeRootNode(s) and getRootNode(s)
and addNode(root, RTDE_ROOT_NAME)?

please try to narrow down the problem so we can see what
you are doing... otherwise it's not possible to help you.
at least not for me.

thanks
angela

> To explain what I did, I just called one method below and the 2nd
> "save()" gives the exception I pasted beneath:
> 
>  
> 
>       public static synchronized void createRepositoryStructure(Session
> s, boolean removeExisting) {
> 
>  
> 
>             try {
> 
>                   getRootNode(s).addMixin(MIXIN_LOCKABLE);
> 
>                   s.save();
> 
>             } catch (RepositoryException e) {
> 
>                   throw e;
> 
>             }
> 
>  
> 
>             try {
> 
>                   Node node = getRtdeRootNode(s);
> 
>                   if (node != null) {
> 
>                         if (removeExisting) {
> 
>                               node.remove();
> 
>                               s.save();
> 
>                         } else {
> 
>                               return;
> 
>                         }
> 
>                   }
> 
>                   Node root = getRootNode(s);
> 
>                   Node rtdeRoot = addNode(root, RTDE_ROOT_NAME);
> 
>                   addNode(rtdeRoot, TENANTS_ROOT_NAME);
> 
>  
> 
>                   // the following save action produced the exception
> 
>  
> 
>                   s.save();
> 
>  
> 
>             } catch (RepositoryException e) {
> 
>                   throw new e;
> 
>             }
> 
>  
> 
>       }
> 
>  
> 
>  
> 
> I am using DavEx to remotely connecting to a repository at
> http://localhost:8080/jackrabbit-webapp-2.0.0/server which works in web
> browser but not with JCR API
> 
>  
> 
> When I call Session.save(), I got the "Bad Request" exception, but if I
> use a local repository impl, like TransientRepository, everything works
> fine. Could you guys help me out?
> 
>  
> 
> Caused by: javax.jcr.RepositoryException: Bad Request
> 
>                 at
> org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConve
> rter.java:113)
> 
>                 at
> org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConve
> rter.java:49)
> 
>                 at
> org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.start(Re
> positoryServiceImpl.java:457)
> 
>                 at
> org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.access$2
> 00(RepositoryServiceImpl.java:399)
> 
>                 at
> org.apache.jackrabbit.spi2davex.RepositoryServiceImpl.submit(RepositoryS
> erviceImpl.java:304)
> 
>                 at
> org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.exec
> ute(WorkspaceManager.java:830)
> 
>                 at
> org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.acce
> ss$500(WorkspaceManager.java:797)
> 
>                 at
> org.apache.jackrabbit.jcr2spi.WorkspaceManager.execute(WorkspaceManager.
> java:594)
> 
>                 at
> org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.save(Session
> ItemStateManager.java:139)
> 
>                 at
> org.apache.jackrabbit.jcr2spi.ItemImpl.save(ItemImpl.java:246)
> 
>                 at
> org.apache.jackrabbit.jcr2spi.SessionImpl.save(SessionImpl.java:328)
> 
>                 at
> com.fiserv.repository.jcr.JCRUtils.createRepositoryStructure(JCRUtils.ja
> va:196)
> 
>                 ... 51 more
> 
> Caused by: org.apache.jackrabbit.webdav.DavException: Bad Request
> 
>                 at
> org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseExc
> eption(DavMethodBase.java:172)
> 
>                 at
> org.apache.jackrabbit.webdav.client.methods.DavMethodBase.checkSuccess(D
> avMethodBase.java:181)
> 
>                 at
> org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.start(Re
> positoryServiceImpl.java:453)
> 
>                 ... 60 more
> 
>  
> 
> Thanks in advance!
> 
> Xuetao
> 
>  
> 
> 


Mime
View raw message