[MAGNOLIA-6204] Exception during My first content app trail Created: 10/May/15 Updated: 20/Oct/20 Resolved: 20/Oct/20 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Gediminas Zalys | Assignee: | Unassigned |
| Resolution: | Outdated | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Description |
|
Im running through the My first app guide here It worked with few modifications needed, however after i restareted my server and came back to add the product i have been getting these following exception: 2015-05-10 21:29:38,953 WARN info.magnolia.event.SimpleEventBus : Exception caught when dispatching a class info.magnolia.ui.api.location.LocationChangedEvent event with class info.magnolia.ui.framework.app.AppControllerImpl eventHandler. java.lang.NullPointerException at info.magnolia.ui.vaadin.integration.contentconnector.JcrContentConnector.getNewItemId(JcrContentConnector.java:200) at info.magnolia.ui.contentapp.detail.DetailEditorPresenter.start(DetailEditorPresenter.java:118) at info.magnolia.ui.contentapp.detail.DetailEditorPresenter.start(DetailEditorPresenter.java:101) at info.magnolia.ui.contentapp.detail.DetailSubApp.start(DetailSubApp.java:118) at info.magnolia.ui.contentapp.detail.DetailSubApp.start(DetailSubApp.java:71) at info.magnolia.ui.framework.app.AppInstanceControllerImpl.startSubApp(AppInstanceControllerImpl.java:374) at info.magnolia.ui.framework.app.AppInstanceControllerImpl.openSubApp(AppInstanceControllerImpl.java:333) at info.magnolia.ui.framework.app.BaseApp.locationChanged(BaseApp.java:65) at info.magnolia.ui.framework.app.AppInstanceControllerImpl.onLocationUpdate(AppInstanceControllerImpl.java:242) at info.magnolia.ui.framework.app.AppControllerImpl.doStartIfNotAlreadyRunning(AppControllerImpl.java:252) at info.magnolia.ui.framework.app.AppControllerImpl.onLocationChanged(AppControllerImpl.java:337) at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:64) at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:42) at info.magnolia.event.SimpleEventBus.fireEvent(SimpleEventBus.java:78) at info.magnolia.ui.api.location.LocationController.goToWithoutChecks(LocationController.java:103) at info.magnolia.ui.api.location.LocationController.goTo(LocationController.java:97) at info.magnolia.ui.contentapp.detail.action.CreateItemAction.execute(CreateItemAction.java:88) at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62) at info.magnolia.ui.contentapp.browser.BrowserPresenter.executeAction(BrowserPresenter.java:333) at info.magnolia.ui.contentapp.browser.BrowserPresenter.onActionbarItemClicked(BrowserPresenter.java:292) at info.magnolia.ui.actionbar.ActionbarPresenter.onActionbarItemClicked(ActionbarPresenter.java:205) at info.magnolia.ui.actionbar.ActionbarViewImpl$1.actionTrigger(ActionbarViewImpl.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:167) at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:969) at info.magnolia.ui.vaadin.actionbar.Actionbar.access$000(Actionbar.java:59) at info.magnolia.ui.vaadin.actionbar.Actionbar$1.onActionTriggered(Actionbar.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118) at com.vaadin.server.communication.ServerRpcHandler.handleBurst(ServerRpcHandler.java:214) at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:111) at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:91) at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37) at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1371) at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238) at info.magnolia.ui.admincentral.AdmincentralVaadinServlet.service(AdmincentralVaadinServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at info.magnolia.cms.filters.ServletDispatchingFilter.doFilter(ServletDispatchingFilter.java:147) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82) at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.VirtualUriFilter.doFilter(VirtualUriFilter.java:68) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.module.cache.executor.Bypass.processCacheRequest(Bypass.java:58) at info.magnolia.module.cache.executor.CompositeExecutor.processCacheRequest(CompositeExecutor.java:66) at info.magnolia.module.cache.filter.CacheFilter.doFilter(CacheFilter.java:153) at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.i18n.I18nContentSupportFilter.doFilter(I18nContentSupportFilter.java:73) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.RangeSupportFilter.doFilter(RangeSupportFilter.java:84) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:57) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.security.SecurityCallbackFilter.doFilter(SecurityCallbackFilter.java:83) at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.security.LogoutFilter.doFilter(LogoutFilter.java:93) at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.MultiChannelFilter.doFilter(MultiChannelFilter.java:82) at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.module.cache.filter.GZipFilter.doFilter(GZipFilter.java:73) at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:58) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82) at info.magnolia.cms.security.auth.login.LoginFilter.doFilter(LoginFilter.java:104) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:82) at info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:103) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.ContextFilter.doFilter(ContextFilter.java:129) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80) at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65) at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90) at info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:106) at info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:66) at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:107) at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:93) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) I can not see what could be wrong with my setup, i have checked every single step in the guide a number of times and everything seems to fit, whats strange is that it worked and now it doesnt. Maybe a full configuration list could be provided ? so its not chopped into bits? so i can compare the entire module structure. Magnolia version used 5.3 |
| Comments |
| Comment by Antti Hietala [ 11/May/15 ] |
|
Hi Gediminas, download the original configuration XML files from Git. You can find links in the Module contents section in the tutorial. Export the equivalent node from your Magnolia instance and diff the XML files. There is no single config file I could provide as the configuration is in couple of places: some in the app launcher, some under the module, some in module descriptor. However, I suspect the edit that broke your app is in config.modules.app-tutorial.apps.xml. The XML diff may be hard to read because timestamps are also reported as changes. Just ignore those. Diffing project configuration will get easier in the near future as you can configure more of Magnolia using YAML files. |
| Comment by Gediminas Zalys [ 13/May/15 ] |
|
Thanks Antti, So I tried everything, i have diff everysingle file and its identical.... the only thing that changes is my module name and also is not a "product" but another type, but only the naming convention changes the entire structure is identical. What flags as strange to me is that the exception is a null pointer and breaks on the below line and fiel: at info.magnolia.ui.vaadin.integration.contentconnector.JcrContentConnector.getNewItemId(JcrContentConnector.java:200) I can only assume that something in the configurations is missing and therefore a null pointer is thrown. maybe you would be able to provide me with a massive screenshot of the entire configuration seen from the browser? what throws me off in the trail is that in the workbench there are two sets of configurations provided one for magnolia 5.3+ and the other 5.2.5 and earlier, they are very misaligned, gets quite confusing what needs to be provided for my installation which is 5.3 Another thing is that in [action bar|https://documentation.magnolia-cms.com/display/DOCS/My+first+content+app#Myfirstcontentapp-Actionbar\ in the configuration it is shown that defaultAction should hold value of editProduct, but it is also shown that defaultAction is a content node and not a property which means it cant hold values ! And the last thing is in content connector the explanation reads that: "A JCR content connector is also needed in the detail subapp. Here the definition is simpler. You just need to name the workspace. " so I am assuming that the configuration should go in detail node, however on the snippet it is actually referring to browser, should it be detail? see snipet below: +subApps Maybe you can provide me with a big screenshot with something like below ? Thanks, |
| Comment by Antti Hietala [ 13/May/15 ] |
|
You mentioned that your app doesn't manage products but another kind of item. When you change the managed item, you should also create a new workspace and node type for those items. You probably already adapted your configuration in the tree to match the new item. But check that you also changed:
I attached a long configuration screenshot. I suspect your app is trying to store content in a workspace that doesn't yet exist, using a node type that doesn't exist. |
| Comment by Antti Hietala [ 13/May/15 ] |
Fixed. Moved 5.2.5 configuration out of the way.
Fixed. defaultAction is indeed a property.
Fixed. The correct subapp name is detail. |
| Comment by Gediminas Zalys [ 14/May/15 ] |
|
Thank you so much Antti! The screenshots have saved the day, i would highly advice to attached the same screenshot on the actual tutorial as it shows the full config and could be a good reference if anybody runs into any errors. Just one last question, i understand that the connector used is JCR and that everything is stored in xml files instead of storing it in database, however, if i make any updates to the configurations from the browser the files dont change, so i am wondering where exactly is the information stored? And also would you be able to point me to any guides where i can change the connector to use a database ? Nevertheless, thank you very much for your support, I am impressed by the response speed and the help i was given! Thank you, |
| Comment by Jan Haderka [ 20/Oct/20 ] |
|
Reported against (now) unsupported version. Verified as working fine with 6.2. |