You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Kalka, Edyta" <Ed...@pl.compuware.com> on 2006/12/15 13:27:55 UTC

exception after calling webdav search command

Hi,

 

After calling webdav search command where search query is: "//element(*,
corona:directory)", I received the following exception:

15.12.2006 13:01:35 *ERROR* SearchResourceImpl: exception while
retrieving values from client row (SearchResourceImpl.java, line 171)

java.lang.NullPointerException

      at
org.apache.jackrabbit.rmi.value.StatefulValueAdapter.getType(StatefulVal
ueAdapter.java:98)

      at
org.apache.jackrabbit.rmi.value.SerialValue.<init>(SerialValue.java:65)

      at
org.apache.jackrabbit.rmi.value.SerialValueFactory.makeSerialValue(Seria
lValueFactory.java:100)

      at
org.apache.jackrabbit.rmi.value.SerialValueFactory.makeSerialValueArray(
SerialValueFactory.java:77)

      at
org.apache.jackrabbit.rmi.server.ServerRow.getValues(ServerRow.java:58)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)

      at sun.rmi.transport.Transport$1.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Unknown Source)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
Source)

      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

      at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
Source)

      at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)

      at sun.rmi.server.UnicastRef.invoke(Unknown Source)

      at
org.apache.jackrabbit.rmi.server.ServerRow_Stub.getValues(Unknown
Source)

      at
org.apache.jackrabbit.rmi.client.ClientRow.getValues(ClientRow.java:53)

      at
org.apache.jackrabbit.webdav.jcr.search.SearchResourceImpl.queryResultTo
MultiStatus(SearchResourceImpl.java:169)

      at
org.apache.jackrabbit.webdav.jcr.search.SearchResourceImpl.search(Search
ResourceImpl.java:86)

      at
org.apache.jackrabbit.webdav.jcr.AbstractResource.search(AbstractResourc
e.java:622)

      at
org.apache.jackrabbit.server.AbstractWebdavServlet.doSearch(AbstractWebd
avServlet.java:1017)

      at
org.apache.jackrabbit.server.AbstractWebdavServlet.execute(AbstractWebda
vServlet.java:271)

      at
org.apache.jackrabbit.server.AbstractWebdavServlet.service(AbstractWebda
vServlet.java:187)

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

      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)

      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

      at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)

      at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)

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

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

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

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

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

      at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:664)

      at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)

      at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)

      at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)

      at java.lang.Thread.run(Unknown Source)

 

What is the reason of such exception?

 

I tested this query with the JCR Browser and it returned valid results.

 

To get any response I surrounded row.getValues with try-catch inside
org.apache.jackrabbit.webdav.jcr.search.SearchResourceImpl.queryResultTo
MultiStatus (plus do not instantiate SearchResultProperty if there are
no values) - after this I received such response:

207 Multi-Status

content-type: text/xml;charset=UTF-8

date: Fri, 15 Dec 2006 12:01:35 GMT

content-length: 1331

server: Apache-Coyote/1.1

 

<?xml version="1.0" encoding="UTF-8"?>

<D:multistatus xmlns:D="DAV:">

    <D:response>

 
<D:href>http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/J
ackrabbitDemoWorkspace/corona%3aroot/DemoDirectory/</D:href>

    </D:response>

    <D:response>

 
<D:href>http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/J
ackrabbitDemoWorkspace/corona%3aroot/DemoDirectory/edka4/</D:href>

    </D:response>

    <D:response>

 
<D:href>http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/J
ackrabbitDemoWorkspace/corona%3aroot/DemoDirectory_copy/edka4/</D:href>

    </D:response>

    <D:response>

 
<D:href>http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/J
ackrabbitDemoWorkspace/test2/</D:href>

    </D:response>

    <D:response>

 
<D:href>http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/J
ackrabbitDemoWorkspace/corona%3aroot/test/</D:href>

    </D:response>

    <D:response>

 
<D:href>http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/J
ackrabbitDemoWorkspace/corona%3aroot/</D:href>

    </D:response>

    <D:response>

 
<D:href>http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/J
ackrabbitDemoWorkspace/corona%3aroot/DemoDirectory_copy/</D:href>

    </D:response>

</D:multistatus>

 

 

Best regards

Edyta

The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. 

Re: exception after calling webdav search command

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 12/18/06, Jukka Zitting <ju...@gmail.com> wrote:
> Oh, that explains... So it's a problem in JCR-RMI, I'll file a bug
> report for that.

Filed as JCR-681 and fixed in revision 488157. I'll merge the fix also
to the 1.2 branch for inclusion in the Apache Jackrabbit 1.2 release.

BR,

Jukka Zitting

Re: exception after calling webdav search command

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 12/18/06, Marcel Reutegger <ma...@gmx.net> wrote:
> Jukka Zitting wrote:
> > The problem is that for some reason the getValues() method of the
> > underlying Row returns an array with one or more null values.
>
> Please note that this may happen anytime. If the select list contains a property
> which is not set on a result node the corresponding row value is null.

Oh, that explains... So it's a problem in JCR-RMI, I'll file a bug
report for that.

BR,

Jukka Zitting

Re: exception after calling webdav search command

Posted by Marcel Reutegger <ma...@gmx.net>.
Jukka Zitting wrote:
> On 12/15/06, Kalka, Edyta <Ed...@pl.compuware.com> wrote:
>> After calling webdav search command where search query is: "//element(*,
>> corona:directory)", I received the following exception:
>> [...]
>> java.lang.NullPointerException
>> [...]
>> org.apache.jackrabbit.rmi.server.ServerRow.getValues(ServerRow.java:58)
>> [...]
>> What is the reason of such exception?
> 
> The problem is that for some reason the getValues() method of the
> underlying Row returns an array with one or more null values.

Please note that this may happen anytime. If the select list contains a property 
which is not set on a result node the corresponding row value is null.

regards
  marcel

Re: exception after calling webdav search command

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 12/15/06, Kalka, Edyta <Ed...@pl.compuware.com> wrote:
> After calling webdav search command where search query is: "//element(*,
> corona:directory)", I received the following exception:
> [...]
> java.lang.NullPointerException
> [...]
> org.apache.jackrabbit.rmi.server.ServerRow.getValues(ServerRow.java:58)
> [...]
> What is the reason of such exception?

The problem is that for some reason the getValues() method of the
underlying Row returns an array with one or more null values. Can you
try the query without using the RMI layer and check the results?

> The contents of this e-mail are intended for the named addressee only.
> It contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or disclose
> it to anyone else. If you received it in error please notify us immediately and
> then destroy it.

Note that you are posting to a public mailing list, thus also the
contents of your message is public and the above disclaimer doesn't
make much sense.

BR,

Jukka Zitting