CMDBuild Forum

Getting NullPointerException when trying edit menus in Admin module

I have defined some menus. When I login in the Data Mgmt module, the menus display correctly. But when I try to edit the menus in Admin module I get the error below and the menu options are empty, so I can't edit them. Any ideas?

 

Call: services/json/schema/modmenu/getmenuconfiguration

--------------------------------------------------------

Error: java.lang.NullPointerException

at org.cmdbuild.services.store.menu.MenuElementConverter.convert(MenuElementConverter.java:51)

at org.cmdbuild.services.store.menu.MenuElementConverter.convert(MenuElementConverter.java:23)

at org.cmdbuild.data.store.dao.ForwardingStorableConverter.convert(ForwardingStorableConverter.java:40)

at org.cmdbuild.services.localization.LocalizedStorableConverter.convert(LocalizedStorableConverter.java:59)

at org.cmdbuild.data.store.dao.ForwardingStorableConverter.convert(ForwardingStorableConverter.java:40)

at org.cmdbuild.data.store.dao.DataViewStore$2.apply(DataViewStore.java:202)

at org.cmdbuild.data.store.dao.DataViewStore$2.apply(DataViewStore.java:199)

at com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:640)

at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)

at org.cmdbuild.services.store.menu.MenuItemConverter.fromMenuElement(MenuItemConverter.java:79)

at org.cmdbuild.services.store.menu.DataViewMenuStore.read(DataViewMenuStore.java:96)

at org.cmdbuild.logic.menu.DefaultMenuLogic.read(DefaultMenuLogic.java:16)

at org.cmdbuild.servlets.json.schema.ModMenu.getMenuConfiguration(ModMenu.java:36)

at sun.reflect.GeneratedMethodAccessor309.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:106)

at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:64)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:183)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)

Previously Marco wrote:

I have defined some menus. When I login in the Data Mgmt module, the menus display correctly. But when I try to edit the menus in Admin module I get the error below and the menu options are empty, so I can't edit them. Any ideas?

 

When I upgraded, logging in resulted in errors relating to a missing _default Menu. I resolved this by manually creating a menu of this name. If you can see the Add Menu button, try adding _default (case sensitive)

It worked. Thanks.

Hi, my custom menus were disappeared when I tried to edit custom menus and add new submenu. This is the second time. What might be the reason, what should I avoid? Is it related to class deletion? Thank you

For me this problem stopped when I upgraded from v2.5 to v3.1 (and we also upgraded Postgres at the time). Which cmdBuild version do you have?

We use openMAINT 1.1 - 2.4.2 (based on cmdbuild < 3)

I never found out exactly what caused the problem, so it was a relief when they corrected the problem in version 3. So I would suggest to upgrade if you can.

Is there perhaps is a maximum number of submenus that can be created?

No, there are no restrictions.