Can't add a new organizationCan't add a new organizationhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1115818302024-03-28T22:01:14Z2024-03-28T22:01:14ZRE: Can't add a new organizationDrew Brokkehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1115850682018-11-16T21:01:24Z2018-11-16T21:01:24Z<p>I looked at it a bit more, and I have a guess as to why this issue
manifested now. I initially couldn't reproduce the issue, but after
playing with it for a bit I found that if the <a
href="https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal.properties#L1983">value
of this portal property</a> is not the primary key of an entry in
the ListType table with the type
"com.liferay.portal.kernel.model.Organization.status",
adding an Organization will fail whether because of an NPE or because
it <a
href="https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/service/impl/ListTypeLocalServiceImpl.java#L81">fails
validation of the ListType</a>.</p>
<p>It's of course a guess because I don't know your exact situation, but
if this seems accurate you can work around this issue by updating that
portal property to match one of the entires in the ListType table
under that type. I think by default we reference the one with the
name "full-member".</p>
<p>Hopefully this helps! I will continue forward fixing the NPE in the meantime.</p>Drew Brokke2018-11-16T21:01:24ZRE: Can't add a new organizationDrew Brokkehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1115837662018-11-16T19:34:08Z2018-11-16T19:34:08ZI created a ticket to track the issue: <a href="https://issues.liferay.com/browse/LPS-87462">https://issues.liferay.com/browse/LPS-87462</a>Drew Brokke2018-11-16T19:34:08ZRE: Can't add a new organizationDrew Brokkehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1115825452018-11-16T18:54:25Z2018-11-16T18:54:25Z<p>Hey Eric, thanks for bringing this to our attention. I have found the
cause of the NPE and can fix that immediately. However, based on what
I saw in the code, even after fixing the NPE you probably won't be
able to add the Organization. Can you provide any additional details
about your installation? Are you using a fresh or sample database, or
did you connect your instance to an existing database? Did you modify
the sql.data.com.liferay.portal.kernel.model.ListType.* properties in
any way? These are two possible reasons I can think of that might be
the source of the problem.</p>
<p>Again, thanks for bring this up :)</p>Drew Brokke2018-11-16T18:54:25ZCan't add a new organizationEric COQUELINhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1115818292018-11-16T17:05:41Z2018-11-16T17:05:41Z<html><head></head><body><p>Using the latest version of Liferay CE, I cannot add any new
organization anymore. It fails, doesn't provide any UI error and
redirect to a malformed page.</p>
<p>
<img src="/documents/14/110203813/Capture+d%E2%80%99%C3%A9cran+de+2018-11-16+18-03-50.png/2537a890-1278-f0cf-0e0b-4d18c36893ef?t=1542387885255" style="float: left;"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>In the logs, I have :</p>
<p>
<code>Caused by: java.lang.NullPointerException<br> &nbsp;&nbsp; &nbsp;at
com.liferay.portal.service.impl.ListTypeLocalServiceImpl.validate(ListTypeLocalServiceImpl.java:79)<br>
&nbsp;&nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)<br> &nbsp;&nbsp; &nbsp;at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>
&nbsp;&nbsp; &nbsp;at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
&nbsp;&nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:498)<br> &nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)<br>
&nbsp;&nbsp; &nbsp;at com.sun.proxy.$Proxy41.validate(Unknown Source)<br> &nbsp;&nbsp; &nbsp;at
com.liferay.portal.service.impl.OrganizationLocalServiceImpl.validate(OrganizationLocalServiceImpl.java:2514)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.service.impl.OrganizationLocalServiceImpl.validate(OrganizationLocalServiceImpl.java:2523)<br>
&nbsp;&nbsp; &nbsp;at
com.liferay.portal.service.impl.OrganizationLocalServiceImpl.addOrganization(OrganizationLocalServiceImpl.java:253)<br>
&nbsp;&nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)<br> &nbsp;&nbsp; &nbsp;at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>
&nbsp;&nbsp; &nbsp;at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp