Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-3260

"Unknown value type 10" when reading values of a weakreference property via RMI

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.0.5, 2.1.6, 2.2.11, 2.3.7, 2.4
    • Fix Version/s: None
    • Component/s: jackrabbit-jcr-rmi
    • Labels:
      None

      Description

      When calling

      javax.jcr.Property jcrProperty = ...
      Value[] values = jcrProperty.getValues();

      on a weakreference property the following error occurs:

      javax.jcr.ValueFormatException: Unknown value type 10
      at org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:139)
      at org.apache.jackrabbit.rmi.server.ServerProperty.getValues(ServerProperty.java:71)
      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:597)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
      at sun.rmi.transport.Transport$1.run(Transport.java:159)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:680)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
      at org.apache.jackrabbit.rmi.server.ServerProperty_Stub.getValues(Unknown Source)
      at org.apache.jackrabbit.rmi.client.ClientProperty.getValues(ClientProperty.java:173)

      I think the reason is that org.apache.jackrabbit.rmi.value.SerialValueFactory.createValue(Value value, int type) does not support the property type "weakreference".
      See http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/value/SerialValueFactory.java?view=markup in line 159.
      Just adding the case for PropertyType.WEAKREFERENCE should fix the problem.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Torsten Witte
          • Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development