Hi,
I have created a spring MVC portlet in Liferay-6-EE-SP1.
I am connecting to an external database, and I have created services for that through liferay's service-builder.
I needed some additional properties to an entity without adding it in database table. So I have added those properties in <entity>Impl.java file. I re-build service and it is working fine in my portlet (A).
But when I placed the service.jar in tomcat/lib/ext/ and try to use those additional properties from another portlet ( B ), it fails.
I am able to access services using <entity>localsertiviceUtil.java.
But when i try to access <entity>.getAdditionalProperty(), it gives me UnsupportedOperationException. [same is working from my portlet (A)]
After the analysis I found that the problem is with <entity>Clp.java file. It is simply throwing UnsupportedOperationException() exception for setter/getter of those additional properties.
The code in <entity>Clp.java is simply like below.
1
2public <entity> get<entity>() {
3 throw new UnsupportedOperationException();
4}
Now I don't know, why service builder does that?
Can anyone return "I KNOW SOMETHING ABOUT THIS", than throwing "IDONOTKNOWEXCEPTION".
Help please ! Thanks in advance!
regards,
Abhed
Please sign in to flag this as inappropriate.