Forums

RSS RSS
RE: OldServiceComponentException when deploying built service Flat View
Threads
Hello,
i have browsed the several thread about building and deploying services, but did not find anything about OldServiceComponentException. Here is how i proceeded to build/deploy my service:
- i use the service.xml from the sample-build-service-portlet, in which i rename <namespace> to "partner", because I want my table to be named this way
-i successfully build the service through ant
-i deploy it
-i add a portlet in a page

Whenever I call my service in a JSP, I get NullPointerException. So i guess the deployment does not work properly. When looking into log file, i get a HotDeploymentException
Caused by: com.liferay.portal.OldServiceComponentException: Build namespace SSB has build number 5 which is newer than 1

I do not understand the message for the error. Does anyone know how to handle this, or could advise me on how to debug this?
Thanks,
Camille
Flag Flag
RE: OldServiceComponentException when deploying built service
1/13/09 10:13 AM as a reply to camille vienot.
Hello Camille,

I have the same problem, Had you resolved it? Could you explain me how?

Thank you very much in advance,

Greetings,

Juanjo
Flag Flag
RE: OldServiceComponentException when deploying built service
1/14/09 11:10 AM as a reply to Juanjo Hernández Cánovas.
hello juanjo,
no i did not resolve the problem. Instead, i use the service builder provided by the ext environment. I added my service.xml file in the ext-impl directory, execute the ant build service task. It created all the source needed to run my services. I added some java code on top of this service layer, using the *LocalServiceImpl.java files.
Then to call my services, i use journal templates (velocity) and add the content through the Journal Content portlet (the wiki is well documented). I could not find the JSP code to call built services from custom portlet. But you should be able to do everything through velocity.
Good luck,
Camille
Flag Flag
RE: OldServiceComponentException when deploying built service
4/11/09 12:20 AM as a reply to Juanjo Hernández Cánovas.
Juanjo Hernández Cánovas:
Hello Camille,

I have the same problem, Had you resolved it? Could you explain me how?

Thank you very much in advance,

Greetings,

Juanjo


For anyone getting the "Build namespace .... has build number ... which is newer than ..." exceptions.. read below.

Whenever you do a "build-service", there is a "service.properties" file which has a "build.number" that is incremented.

mail-portlet/docroot/WEB-INF/src/service.properties

1
2##
3## Build
4##
5
6    build.namespace=Mail
7    build.number=1
8    build.date=1239433666359


If you deploy your portlet to a portal that already has the portlet (with a higher build number than your freshly deployed portlet), you will get the "Build namespace .... has build number ... which is newer than ..." exception. The reason is that the portal only wants to do "upgrades" to newer versions of the portlet.. and if it sees an older build number.. it will ignore it thinking that you are "downgrading".. and as a result, your db tables wont get built/updated.

To get the portal to realize that your portlet is actually a newer version / upgrade, all you have to do is.. increment your build.number in the service.properties file to be a number that is greater than existing portlets build.number.

Im not sure if we are running into the same problem for the same reasons, but if we are.. this does the trick for me..

Scott
Flag Flag
RE: OldServiceComponentException when deploying built service
11/25/09 2:49 AM as a reply to Scott Lee.
Thanks for the info!

but is there not a way to remove the service as you remove the portlet?
Flag Flag
RE: OldServiceComponentException when deploying built service
oldservicecomponentexception
7/21/10 11:28 PM as a reply to Scott Lee.
Scott Lee:
Juanjo Hernández Cánovas:
Hello Camille,

I have the same problem, Had you resolved it? Could you explain me how?

Thank you very much in advance,

Greetings,

Juanjo


For anyone getting the "Build namespace .... has build number ... which is newer than ..." exceptions.. read below.

Whenever you do a "build-service", there is a "service.properties" file which has a "build.number" that is incremented.

mail-portlet/docroot/WEB-INF/src/service.properties

1
2##
3## Build
4##
5
6    build.namespace=Mail
7    build.number=1
8    build.date=1239433666359


If you deploy your portlet to a portal that already has the portlet (with a higher build number than your freshly deployed portlet), you will get the "Build namespace .... has build number ... which is newer than ..." exception. The reason is that the portal only wants to do "upgrades" to newer versions of the portlet.. and if it sees an older build number.. it will ignore it thinking that you are "downgrading".. and as a result, your db tables wont get built/updated.

To get the portal to realize that your portlet is actually a newer version / upgrade, all you have to do is.. increment your build.number in the service.properties file to be a number that is greater than existing portlets build.number.

Im not sure if we are running into the same problem for the same reasons, but if we are.. this does the trick for me..

Scott


Hi Scott,

Is there any other way to do it in LR 5.2.3, like specifying some thing in service.xml

Any inputs are much welcome

Thanks & Regards,
- Nagendra Kumar
Flag Flag