<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>NullPointer obtainIncrement on User deletion</title>
  <link rel="self" href="https://liferay.dev/zh/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=85831950" />
  <subtitle>NullPointer obtainIncrement on User deletion</subtitle>
  <id>https://liferay.dev/zh/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=85831950</id>
  <updated>2026-06-02T22:23:03Z</updated>
  <dc:date>2026-06-02T22:23:03Z</dc:date>
  <entry>
    <title>RE: NullPointer obtainIncrement on User deletion</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118419448" />
    <author>
      <name>Gopal Prasad Satapathy</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118419448</id>
    <updated>2020-02-04T07:05:55Z</updated>
    <published>2020-02-04T07:05:55Z</published>
    <summary type="html">Hello,&lt;br /&gt;Getting similar exception during User deletion in DXP 7.1 and this is random. &lt;br /&gt; Any solution to this?&lt;br /&gt;Here is the full stack trace.2020-01-29 20:04:43 ERROR RemoveUserService:53 - Could not remove user&lt;br /&gt;com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException&lt;br /&gt;    at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:269)&lt;br /&gt;    at com.liferay.counter.service.persistence.impl.CounterFinderImpl._obtainIncrement(CounterFinderImpl.java:390)&lt;br /&gt;    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.createCounterRegister(CounterFinderImpl.java:234)&lt;br /&gt;    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.createCounterRegister(CounterFinderImpl.java:197)&lt;br /&gt;    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.getCounterRegister(CounterFinderImpl.java:257)&lt;br /&gt;    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.reset(CounterFinderImpl.java:162)&lt;br /&gt;    at com.liferay.counter.service.impl.CounterLocalServiceImpl.reset(CounterLocalServiceImpl.java:74)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1959.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)&lt;br /&gt;    at com.liferay.portal.spring.transaction.CounterTransactionExecutor._execute(CounterTransactionExecutor.java:168)&lt;br /&gt;    at com.liferay.portal.spring.transaction.CounterTransactionExecutor.execute(CounterTransactionExecutor.java:87)&lt;br /&gt;    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)&lt;br /&gt;    at com.sun.proxy.$Proxy30.reset(Unknown Source)&lt;br /&gt;    at com.liferay.portal.service.impl.LayoutLocalServiceImpl.deleteLayouts(LayoutLocalServiceImpl.java:687)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1940.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice$LayoutLocalServiceStagingInvocationHandler._invoke(LayoutLocalServiceStagingAdvice.java:751)&lt;br /&gt;    at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice$LayoutLocalServiceStagingInvocationHandler.invoke(LayoutLocalServiceStagingAdvice.java:638)&lt;br /&gt;    at com.sun.proxy.$Proxy218.deleteLayouts(Unknown Source)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1940.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)&lt;br /&gt;    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)&lt;br /&gt;    at com.sun.proxy.$Proxy92.deleteLayouts(Unknown Source)&lt;br /&gt;    at com.liferay.portal.service.impl.LayoutSetLocalServiceImpl.deleteLayoutSet(LayoutSetLocalServiceImpl.java:103)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1943.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.service.impl.LayoutSetLocalServiceStagingAdvice$LayoutSetLocalServiceStagingInvocationHandler.invoke(LayoutSetLocalServiceStagingAdvice.java:118)&lt;br /&gt;    at com.sun.proxy.$Proxy219.deleteLayoutSet(Unknown Source)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1943.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)&lt;br /&gt;    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)&lt;br /&gt;    at com.sun.proxy.$Proxy105.deleteLayoutSet(Unknown Source)&lt;br /&gt;    at com.liferay.portal.service.impl.GroupLocalServiceImpl.deleteGroup(GroupLocalServiceImpl.java:911)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor2023.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)&lt;br /&gt;    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)&lt;br /&gt;    at com.sun.proxy.$Proxy44.deleteGroup(Unknown Source)&lt;br /&gt;    at com.liferay.portal.service.impl.UserLocalServiceImpl.deleteUser(UserLocalServiceImpl.java:1896)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1953.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)&lt;br /&gt;    at com.sun.proxy.$Proxy566.deleteUser(Unknown Source)&lt;br /&gt;    at com.liferay.portal.kernel.service.UserLocalServiceWrapper.deleteUser(UserLocalServiceWrapper.java:924)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1953.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)&lt;br /&gt;    at com.sun.proxy.$Proxy567.deleteUser(Unknown Source)&lt;br /&gt;    at sun.reflect.GeneratedMethodAccessor1953.invoke(Unknown Source)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)&lt;br /&gt;    at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)&lt;br /&gt;    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)&lt;br /&gt;    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)&lt;br /&gt;    at com.sun.proxy.$Proxy42.deleteUser(Unknown Source)&lt;br /&gt;    at be.bpost.home.portlets.usersync.service.liferay.RemoveUserService.removeUser(RemoveUserService.java:50)&lt;br /&gt;    at be.bpost.home.portlets.usersync.service.liferay.RemoveUserService.lambda$removeUsers$0(RemoveUserService.java:42)&lt;br /&gt;    at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1556)&lt;br /&gt;    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)&lt;br /&gt;    at be.bpost.home.portlets.usersync.service.liferay.RemoveUserService.removeUsers(RemoveUserService.java:39)&lt;br /&gt;    at be.bpost.home.portlets.usersync.job.BpostLiferayUserImportJob.importUsers(BpostLiferayUserImportJob.java:67)&lt;br /&gt;    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br /&gt;    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;br /&gt;    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;    at java.lang.reflect.Method.invoke(Method.java:498)&lt;br /&gt;    at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269)&lt;br /&gt;    at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:257)&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Gopal</summary>
    <dc:creator>Gopal Prasad Satapathy</dc:creator>
    <dc:date>2020-02-04T07:05:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: NullPointer obtainIncrement on User deletion</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=89772200" />
    <author>
      <name>Constantine Pinakoulakis</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=89772200</id>
    <updated>2017-05-23T10:11:39Z</updated>
    <published>2017-05-23T10:11:39Z</published>
    <summary type="html">Any solutions yet ? this exception has been bugging us for years</summary>
    <dc:creator>Constantine Pinakoulakis</dc:creator>
    <dc:date>2017-05-23T10:11:39Z</dc:date>
  </entry>
  <entry>
    <title>NullPointer obtainIncrement on User deletion</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=85831949" />
    <author>
      <name>Robert Meissner</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=85831949</id>
    <updated>2017-02-09T13:43:38Z</updated>
    <published>2017-02-09T13:43:38Z</published>
    <summary type="html">When trying to delete a user manually (in the backend), i get the following exception and the user still exists:&lt;br /&gt;&lt;br /&gt;14:35:03,575 ERROR [ajp-bio-8009-exec-581][BasePersistenceImpl:244] Caught unexpected exception java.lang.NullPointerException&lt;br /&gt;14:35:03,585 ERROR [ajp-bio-8009-exec-581][render_portlet_jsp:132] null&lt;br /&gt;java.lang.NullPointerException&lt;br /&gt;        at com.liferay.counter.service.persistence.CounterFinderImpl._obtainIncrement(CounterFinderImpl.java:393)&lt;br /&gt;        at com.liferay.counter.service.persistence.CounterFinderImpl.createCounterRegister(CounterFinderImpl.java:250)&lt;br /&gt;        at com.liferay.counter.service.persistence.CounterFinderImpl.createCounterRegister(CounterFinderImpl.java:202)&lt;br /&gt;        at com.liferay.counter.service.persistence.CounterFinderImpl.getCounterRegister(CounterFinderImpl.java:277)&lt;br /&gt;        at com.liferay.counter.service.persistence.CounterFinderImpl.reset(CounterFinderImpl.java:165)&lt;br /&gt;        at com.liferay.counter.service.impl.CounterLocalServiceImpl.reset(CounterLocalServiceImpl.java:70)&lt;br /&gt;        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)&lt;br /&gt;        at com.liferay.portal.spring.transaction.CounterTransactionExecutor.execute(CounterTransactionExecutor.java:45)&lt;br /&gt;        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)&lt;br /&gt;        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)&lt;br /&gt;        at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)&lt;br /&gt;        at com.liferay.portal.service.impl.LayoutLocalServiceImpl.deleteLayouts(LayoutLocalServiceImpl.java:783)&lt;br /&gt;        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)&lt;br /&gt;        at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:183)&lt;br /&gt;        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)&lt;br /&gt;        at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:141)&lt;br /&gt;        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)&lt;br /&gt;        at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)&lt;br /&gt;        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)&lt;br /&gt;        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)</summary>
    <dc:creator>Robert Meissner</dc:creator>
    <dc:date>2017-02-09T13:43:38Z</dc:date>
  </entry>
</feed>
