jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Watts <rob...@whatsonwhen.com>
Subject Importing content via SimpleWebdavServlet throws ItemNotFoundException
Date Wed, 10 May 2006 12:36:25 GMT
Hi guys,

I'm using my dav client over SimpleWebdavServlet to save content to a 
repository over RMI on another JVM.  I am calling the Servlet from 
inside an existing web application.

I can create directories but am having problems importing files.  My dav 
client (kde explorer) reports I don't have the priviledge but my log 
throws a ItemNotFoundExeption, eg:

javax.jcr.ItemNotFoundException: 
75367525-5c8d-4c04-884a-1c614eb03d1d/{http://www.jcp.org/jcr/1.0}primaryType
         at 
org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:111)
         at 
org.apache.jackrabbit.rmi.server.ServerItem.save(ServerItem.java:80)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
         at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         at 
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
         at 
org.apache.jackrabbit.rmi.server.ServerNode_Stub.save(Unknown Source)
         at 
org.apache.jackrabbit.rmi.client.ClientItem.save(ClientItem.java:185)
         at 
org.apache.jackrabbit.webdav.simple.DavResourceImpl.addMember(DavResourceImpl.java:537)
         at 
org.apache.jackrabbit.server.AbstractWebdavServlet.doPut(AbstractWebdavServlet.java:500)

I repeatedly get this error but there's not always a primaryType in the 
msg, sometimes it's lastModifed, others it's mimeType.

My JCR-RMI server reports nothing abnormal in its log, as far as I can tell.

Here's a snippet of my web.xml:
<web-app>
   ...
    <!-- Repository Servlet -->
     <servlet>
         <servlet-name>Repository</servlet-name>
         <description>
             This servlet provides other servlets and jsps a common way 
to access the repository. The repository can be accessed via JNDI, RMI 
or Webdav.
         </description>

 
<servlet-class>com.wow.services.filesystem.jcr.jackrabbit.webapp.RepositoryAccessServlet</servlet-class>

         <init-param>
             <param-name>repository-name</param-name>
             <param-value>wow-jcr-repository</param-value>
             <description>Repository Name that is used to retrieve it 
via JNDI</description>
         </init-param>

         <!--
             RMI url, if RMI remoting is needed
         -->
         <init-param>
             <param-name>rmi-uri</param-name>
 
<param-value>rmi://localhost:1099/wow-jcr-repository</param-value>
             <description>The URI for the RMI connection.</description>
         </init-param>

         <load-on-startup>3</load-on-startup>

     </servlet>

     <!-- Jackrabbit Webdav Servlet -->
     <servlet>
         <servlet-name>Webdav</servlet-name>
         <description>The webdav servlet that connects HTTP request to 
the repository.</description>
 
<servlet-class>com.wow.services.filesystem.jcr.jackrabbit.webapp.SimpleWebdavServlet</servlet-class>

         <init-param>
             <param-name>resource-path-prefix</param-name>
             <param-value>/repository</param-value>
             <description>defines the prefix for spooling resources out 
of the repository.</description>
         </init-param>

         <init-param>
             <param-name>resource-config</param-name>
             <param-value>/WEB-INF/jcr_config.xml</param-value>
             <description>Defines various dav-resource configuration 
parameters.</description>
         </init-param>
         <load-on-startup>4</load-on-startup>
     </servlet>

     <!-- Jackrabbit Webdav Server Servlet -->
     <servlet>
         <servlet-name>JCRWebdavServer</servlet-name>
         <description>The webdav servlet that connects HTTP request to 
the repository.</description>
 
<servlet-class>com.wow.services.filesystem.jcr.jackrabbit.webapp.JCRWebdavServerServlet</servlet-class>

         <init-param>
             <param-name>resource-path-prefix</param-name>
             <param-value>/server</param-value>
             <description>defines the prefix for spooling resources out 
of the repository.</description>
         </init-param>
         <load-on-startup>5</load-on-startup>

     </servlet>

     <servlet-mapping>
         <servlet-name>Webdav</servlet-name>
         <url-pattern>/repository/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>JCRWebdavServer</servlet-name>
         <url-pattern>/server/*</url-pattern>
     </servlet-mapping>
...
</web-app>

I've had to import the source of the Servlet classes as I can't find 
them in any of the maven 2 binaries.

The stack suggests to me that IOManager is not doing its job or more 
likely, badly configured.  I am using the default, 
o.a.j.server.io.DefaultIOManager

We're stumped here and if anyone could shed some light we'd very much 
appreciate it!

Thanks in advance, Rob.



Mime
View raw message