jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Cannot save Item
Date Tue, 18 Mar 2008 15:29:27 GMT
Hi Charles,

when you add a node and want to save the changes you have to call save on the 
parent node or on the session.

see: 
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Node.html#addNode(java.lang.String)

regards
  marcel

Charles Johnson wrote:
> I have logged into the repository via RMI using credentials 
> superuser/superuser and have a session, but I can't save an Item (see 
> stack trace below). Can someone tell me why? There must be a simple 
> explanation ...
> 
> Charles
> 
> 
> Exception in thread "main" javax.jcr.RepositoryException: /deleteme[8]: 
> cannot save a new item.
>         at 
> org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:136)

> 
>         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:466)
>         at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) 
> 
>         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 RC2.main(RC2.java:39)


Mime
View raw message