Hybris Admin - “Localize Types”失败,出现NullPointerException

时间:2012-11-23 10:23:31

标签: nullpointerexception hybris

从我的Hybris管理工具(http:// localhost:9001 / admin),当我运行命令“更新运行hybris Multichannel Suite”时只选择了“Localize types”选项,我收到以下错误:

11:19:31,146 [hybrisHTTP5] INFO  [Initialization] Localizing types ...
11:19:32,481 [hybrisHTTP5] INFO  [EJBTools] pk 8796118941778 does no longer exist.
java.lang.NullPointerException
        at de.hybris.platform.jalo.type.CollectionType.isAssignableFrom(CollectionType.java:545)
        at de.hybris.platform.util.localization.TypeLocalization.resortTypes(TypeLocalization.java:520)
        at de.hybris.platform.util.localization.TypeLocalization.localizeTypes(TypeLocalization.java:177)
        at de.hybris.platform.util.localization.TypeLocalization.localizeTypes(TypeLocalization.java:143)
        at de.hybris.platform.core.Initialization.doInitialize(Initialization.java:374)
        at org.apache.jsp.init_005finitialize_jsp._jspService(init_005finitialize_jsp.java:476)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:366)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
        at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:11
9)

有谁知道如何解决这个问题?

2 个答案:

答案 0 :(得分:3)

由于先前记录为“INFO”的内容而发生错误:

INFO  [EJBTools] pk 8796118941778 does no longer exist.

解决这个问题: 1.对hybris数据库运行以下查询。

SELECT *
  FROM collectiontypes
  WHERE elementtypepk NOT IN (SELECT pk FROM composedtypes
                              UNION ALL
                              SELECT pk FROM ATOMICTYPES);
  1. 返回的行引用类型不再存在,并且在某种程度上是以前升级的工件。
  2. 删除这些行应该可以解决问题。
  3. 更新Hybris。

答案 1 :(得分:0)

创建项类型时需要运行“ant all”,然后重新启动服务器并更新系统,勾选localize项类型。在所有这些之前,您使用Hmc来本地化您创建的类型?您需要导出类型,将内容复制粘贴到* locales-en.properties。