BeanWriter 不工作 - java.lang.NullPointerException

BeanWriter not working - java.lang.NullPointerException

我正在向现有文档类型添加一个字段。 CMS 网络用户界面没有错误。

完整的堆栈跟踪如下:

[INFO] [talledLocalContainer] SEVERE: Servlet.service() for servlet [REST] in context with path [/essentials] threw exception
[INFO] [talledLocalContainer] java.lang.RuntimeException: org.apache.cxf.interceptor.Fault
[INFO] [talledLocalContainer]   at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
[INFO] [talledLocalContainer]   at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:324)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.invoke(RestServlet.java)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.handleRequest(RestServlet.java)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.doGet(RestServlet.java)
[INFO] [talledLocalContainer]   at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.service(RestServlet.java)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[INFO] [talledLocalContainer]   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
[INFO] [talledLocalContainer]   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[INFO] [talledLocalContainer]   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
[INFO] [talledLocalContainer]   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
[INFO] [talledLocalContainer]   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
[INFO] [talledLocalContainer]   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
[INFO] [talledLocalContainer]   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
[INFO] [talledLocalContainer]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer]   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[INFO] [talledLocalContainer]   at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] Caused by: org.apache.cxf.interceptor.Fault
[INFO] [talledLocalContainer]   at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
[INFO] [talledLocalContainer]   at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
[INFO] [talledLocalContainer]   at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
[INFO] [talledLocalContainer]   at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
[INFO] [talledLocalContainer]   at org.apache.cxf.interceptor.ServiceInvokerInterceptor.run(ServiceInvokerInterceptor.java:57)
[INFO] [talledLocalContainer]   at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
[INFO] [talledLocalContainer]   at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
[INFO] [talledLocalContainer]   ... 32 more
[INFO] [talledLocalContainer] Caused by: java.lang.NullPointerException
[INFO] [talledLocalContainer]   at org.onehippo.cms7.services.contenttype.HippoContentTypeService.<init>(HippoContentTypeService.java:61)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.dashboard.services.ContentBeansService.getProjectContentTypes(ContentBeansService.java:242)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.dashboard.services.ContentBeansService.getContentBeans(ContentBeansService.java:218)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.dashboard.services.ContentBeansService.<init>(ContentBeansService.java:102)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.beanwriter.rest.BeanWriterResource.getImageSets(BeanWriterResource.java:119)
[INFO] [talledLocalContainer]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer]   at java.lang.reflect.Method.invoke(Method.java:483)
[INFO] [talledLocalContainer]   at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
[INFO] [talledLocalContainer]   at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
[INFO] [talledLocalContainer]   at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
[INFO] [talledLocalContainer]   ... 37 more

在同一个日志中,还有一个错误:

[INFO] [talledLocalContainer] 04.06.2015 09:26:09 ERROR http-bio-8080-exec-9 [GlobalUtils.createSession:234] Error creating repository connection
[INFO] [talledLocalContainer] javax.jcr.LoginException: Wrong username or password.
[INFO] [talledLocalContainer]   at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1493)
[INFO] [talledLocalContainer]   at org.hippoecm.repository.impl.RepositoryDecorator.login(RepositoryDecorator.java:59)
[INFO] [talledLocalContainer]   at org.hippoecm.repository.HippoRepositoryImpl.login(HippoRepositoryImpl.java:109)
[INFO] [talledLocalContainer]   at org.hippoecm.repository.HippoRepositoryImpl.login(HippoRepositoryImpl.java:98)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.dashboard.utils.GlobalUtils.createSession(GlobalUtils.java:232)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.dashboard.ctx.DefaultPluginContext.createSession(DefaultPluginContext.java:114)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.dashboard.utils.CndUtils.getNodeTypesOfType(CndUtils.java:315)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.plugins.gallery.GalleryPluginResource.fetchExisting(GalleryPluginResource.java:352)
[INFO] [talledLocalContainer]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [talledLocalContainer]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [talledLocalContainer]   at java.lang.reflect.Method.invoke(Method.java:483)
[INFO] [talledLocalContainer]   at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
[INFO] [talledLocalContainer]   at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
[INFO] [talledLocalContainer]   at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
[INFO] [talledLocalContainer]   at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
[INFO] [talledLocalContainer]   at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
[INFO] [talledLocalContainer]   at org.apache.cxf.interceptor.ServiceInvokerInterceptor.run(ServiceInvokerInterceptor.java:57)
[INFO] [talledLocalContainer]   at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
[INFO] [talledLocalContainer]   at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:237)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:239)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:213)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:131)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.invoke(RestServlet.java)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:266)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.handleRequest(RestServlet.java)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:191)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.doGet(RestServlet.java)
[INFO] [talledLocalContainer]   at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
[INFO] [talledLocalContainer]   at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:242)
[INFO] [talledLocalContainer]   at org.onehippo.cms7.essentials.servlet.RestServlet.service(RestServlet.java)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[INFO] [talledLocalContainer]   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
[INFO] [talledLocalContainer]   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[INFO] [talledLocalContainer]   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
[INFO] [talledLocalContainer]   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
[INFO] [talledLocalContainer]   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
[INFO] [talledLocalContainer]   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
[INFO] [talledLocalContainer]   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
[INFO] [talledLocalContainer]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer]   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[INFO] [talledLocalContainer]   at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] Caused by: javax.security.auth.login.FailedLoginException: Wrong username or password.
[INFO] [talledLocalContainer]   at org.hippoecm.repository.security.UnsuccessfulAuthenticationHandler.handle(UnsuccessfulAuthenticationHandler.java:27)
[INFO] [talledLocalContainer]   at org.hippoecm.repository.security.HippoLoginModule.login(HippoLoginModule.java:149)
[INFO] [talledLocalContainer]   at org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
[INFO] [talledLocalContainer]   at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1465)

我该怎么办?

目前的设置应用程序仅支持使用admin/admin作为用户名和密码组合的本地开发。安装应用程序通过使用 admin/admin 组合登录与存储库通信,因此如果您更改了用户名密码组合,安装应用程序中的大多数操作都将失败。

这里出错的地方是设置应用程序正在与 ContentService API 对话,但失败了,因为对存储库的登录不正确。