Liferay DXP 2026.Q4    |    Release Webinar: 18 November 2026    |    Replay coming soon! 

Blogs

Service Builder Column Naming Randomness

Alex Swain
Alex Swain
Lectura de menos de un minuto

I fell over a problem the other day that I had solved ages ago and foolishly hadn't taken the time to write down how I did it. I guess it must be fairly rare as my standard "I might have forgotten to write it down, but someone must have" approach to finding the answer on the internet also failed. So, I have committed to solving both issues with one post.

I'm running LifeRay 6.2 and SP17 of the SDK. I'd been building my service layer happily for weeks but after some additional entities went in it just stopped working, kept logging out:

 

[echo] Writing C:\liferay-dev\liferay-developer-studio\liferay-plugins-sdk-6.2-ee\portlets\RandomObject-portlet\docroot\WEB-INF\src\uk\ac\uea\portlet\randomobject\service\persistence\RandomObjectPersistenceImpl.java
     [echo] java.lang.NullPointerExceptionWriting C:\liferay-dev\liferay-developer-studio\liferay-plugins-sdk-6.2-ee\portlets\RandomObject-portlet\docroot\WEB-INF\src\uk\ac\uea\portlet\randomobject\model\impl\RandomObjectModelImpl.java
     [echo] 	at com.liferay.portal.tools.servicebuilder.ServiceBuilder.toHumanName(ServiceBuilder.java:334)
     [echo] 	at com.liferay.portal.tools.servicebuilder.EntityColumn.(EntityColumn.java:51)

So after a lot of digging (and understanding that the error doesn't bare any direct relation to the problem) it turns out that if you put the word "get", even as a substring, into the name of any SB column, so in my example:

 

 <column name="showWidget" type="boolean"></column>

SB really doesn't like it.

Hopefully this is of use to someone as confused as I was.

Comentarios de la página

Related Assets...

No se encontraron resultados

More Blog Entries...

Himanshu Chauhan
noviembre 20, 2026
Tony Lim
noviembre 19, 2026