jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bilobag <bilo...@hotmail.com>
Subject Re: Node remove. Removing reference property problem.
Date Fri, 13 Jul 2007 14:37:31 GMT

Thanks a lot of the help....i've been working on this for days now.  That
seemed to be the issue.  however it looks like my repository is corrupted
now because of my original configuration.  Is there a good way to clean out
my repository?  Or do I just delete all of my db tables?



bilobag wrote:
> 
> Hi have defined the following custom node:
> 
> [ng:file] > ng:content,  mix:versionable
> 	orderable
>  -	ng:filename	(string)		mandatory
>  - 	ng:filesize	(long)
>  + 	jcr:content		(nt:resource)	primary mandatory
>  + * (ng:comment) = ng:comment multiple version 
> 
> 
> I have successfully added a ng:file node with a jcr:content file as a
> reference property.  However, when call the following code:
> 
> 
> Node jcrNode = getJcrDAO().getNodeByUUID(uuid);
> jcrNode.remove();
> getJcrDAO().save();
> 
> 
> I get the following exception on the save:
> 
> 
> org.apache.jackrabbit.core.state.NoSuchItemStateException:
> 09d25013-044a-47bd-95bf-98b722a33dc6
> 	at
> org.apache.jackrabbit.core.state.SharedItemStateManager.getNodeReferences(SharedItemStateManager.java:332)
> 	at
> org.apache.jackrabbit.core.state.SharedItemStateManager.updateReferences(SharedItemStateManager.java:1317)
> 	at
> org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:550)
> 	at
> org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:825)
> 	at
> org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:855)
> 	at
> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
> 	at
> org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
> 	at
> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:302)
> 	at
> org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:306)
> 	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1214)
> 	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:849)
> 	at org.springmodules.jcr.JcrTemplate$23.doInJcr(JcrTemplate.java:461)
> 	at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:76)
> 	at org.springmodules.jcr.JcrTemplate.save(JcrTemplate.java:456)
> 	at org.bmpcoe.cwe5.dao.impl.JcrBaseDAO.save(JcrBaseDAO.java:138)
> 	at
> org.bmpcoe.cwe5.service.impl.NodeServiceImpl.removeNode(NodeServiceImpl.java:87)
> 	at
> org.bmpcoe.cwe5.webapp.action.TestPageBean.getTestGetFile(TestPageBean.java:243)
> 	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 com.sun.el.parser.AstValue.invoke(AstValue.java:157)
> 	at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
> 	at
> com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
> 	at
> com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
> 	at
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:109)
> 	at
> org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
> 	at
> org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
> 	at
> org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
> 	at
> org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
> 	at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
> 	at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:61)
> 	at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
> 	at
> org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
> 	at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.springmodules.jcr.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:93)
> 	at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
> 	at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
> 	at java.lang.Thread.run(Unknown Source)
> 
> 
> Now, i assumed that when i remove the ng:file node, that the jcr:content
> reference property would also be removed.  Is this correct?  Do I need to
> remove the reference property first?  If so, what is the reasoning behind
> this?  The exception i get points to a process that checks the state of
> the repository, but for some reason it can't find the jcr:content
> reference node property.  Is this because I just removed it?  If so, why
> is it trying to get a reference to it.  Any help is appreciated.  Thanks.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Node-remove.--Removing-reference-property-problem.-tf4062111.html#a11580846
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Mime
View raw message