Message Boards

Can't add a new organization

thumbnail
Eric COQUELIN, modified 5 Years ago.

Can't add a new organization

Expert Posts: 254 Join Date: 11/3/13 Recent Posts

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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In the logs, I have :

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(DelegatingMethodAccessorImpl.java:43)<br> &nbsp;&nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:498)

 

thumbnail
Drew Brokke, modified 5 Years ago.

RE: Can't add a new organization

New Member Posts: 12 Join Date: 1/9/14 Recent Posts

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.

Again, thanks for bring this up :)

thumbnail
Drew Brokke, modified 5 Years ago.

RE: Can't add a new organization

New Member Posts: 12 Join Date: 1/9/14 Recent Posts
I created a ticket to track the issue: https://issues.liferay.com/browse/LPS-87462
thumbnail
Drew Brokke, modified 5 Years ago.

RE: Can't add a new organization

New Member Posts: 12 Join Date: 1/9/14 Recent Posts

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 value of this portal property 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 fails validation of the ListType.

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".

Hopefully this helps!  I will continue forward fixing the NPE in the meantime.