1 Reply Latest reply on Nov 26, 2014 5:55 AM by hchiorean

    Modeshape unexpected error while saving node

    caliskan

      Hi , for a while  we are using modeshape 3.8.0 with jboss eap 6.3 , we have encountered an error while saving node to the modeshape, server returns an error message as below, it was working normally bu we started to encounter error do you have any suggestions

       

       

      11:51:35,029 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ds].[mvc-dispatcher]] (http-/0.0.0.0:8080-4) JBWEB000236: Servlet.service() for servlet mvc-dispatcher threw exception: java.lang.NullPointerException

           at org.modeshape.jcr.cache.document.DocumentTranslator.changeChildren(DocumentTranslator.java:776) [modeshape-jcr-3.8.0.Final.jar:3.8.0.Final]

           at org.modeshape.jcr.cache.document.WritableSessionCache.persistChanges(WritableSessionCache.java:1101) [modeshape-jcr-3.8.0.Final.jar:3.8.0.Final]

           at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:621) [modeshape-jcr-3.8.0.Final.jar:3.8.0.Final]

           at org.modeshape.jcr.JcrSession.save(JcrSession.java:1150) [modeshape-jcr-3.8.0.Final.jar:3.8.0.Final]

           ModeShapeDao.addNode(ModeShapeDao.java:182) [classes:]

           ModeShapeDao$$FastClassBySpringCGLIB$$3584fcc7.invoke(<generated>) [spring-core-4.0.5.RELEASE.jar:]

           at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) [spring-tx-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) [spring-tx-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

          ModeShapeDao$$EnhancerBySpringCGLIB$$bbc3f371.addNode(<generated>) [spring-core-4.0.5.RELEASE.jar:]

           service.FileService.addFile(FileService.java:49) [classes:]

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_05]

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_05]

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_05]

           at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_05]

           at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) [spring-tx-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) [spring-tx-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at com.sun.proxy.$Proxy161.addFile(Unknown Source)

           ServiceOperationsController.addFile(ServiceOperationsController.java:285) [classes:]

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_05]

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_05]

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_05]

           at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_05]

           at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

           at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152) [spring-orm-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.4.0.Final-redhat-11.jar:7.4.0.Final-redhat-11]

           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.4.2.Final-redhat-1.jar:7.4.2.Final-redhat-1]

           at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_05]

        • 1. Re: Modeshape unexpected error while saving node
          hchiorean

          First, try running your code using 3.8.1.Final or 4.0.0.Final (if you can run in Wildfly)

          Second, this seems to be coming from an invalid document of a parent node, either in the case when you're using federation with paged connectors (FS or Git connector) or you're using the document optimization background thread. If you're using connectors, you should try running with the latest 4.x since it contains numerous bug fixes.

           

          In either case, since the document seems to be corrupted, there's not much you can do about it. If you can reproduce this in an isolated test case against the latest master code (i.e. 4.x), feel free to open a JIRA. Thanks.

          1 of 1 people found this helpful