Message Boards

Liferay DXP 7.2 - Service Builder Module not registering

Bernd S, modified 3 Years ago.

Liferay DXP 7.2 - Service Builder Module not registering

Junior Member Posts: 59 Join Date: 3/31/15 Recent Posts

I recently upgraded a "Service Builder"project from Liferay 7.0 to 7.2 and eventually got it running. Problems started to arise after I executed the following DB-script:

DELETE FROM RELEASE_WHERE SERVLETCONTEXTNAME = 'com.my.service';
DELETE FROM SERVICECOMPONENT WHERE BUILDNAMESPACE = 'myService';

I use this script because my project uses an external database and therefore I don't care about update steps. This allowed me to deploy my service with a different version, if needed. Up to now this worked and I could just do:

  1. deploy version 1.0.0 --> affected tables reference version 1.0.0
  2. run the script
  3. deploy version 2.0.0 --> affected tables reference version 2.0.0

This worked for months with Liferay 7.0 without a problem. Yesterday I tried it on 7.2 but suddenly no new entries were written into the mentioned tables when deploying my project.

Log shows no warnings/errors and I even get the usual success message:

[BundleStartStopLogger:46] STARTED com.my.service_2.0.0

Unfortunately the service still doesn't show up at /api/jsonws and I get NullPointerExceptions in when calling its methods.

 

Eventually I got some kind of hint with Gogo-Shell's "dm wtf" ("diag" etc. showed no problems) command:

The following service(s) are missing: 
 * com.liferay.portal.kernel.model.Release (&(release.bundle.symbolic.name=com.my.service)(&(release.schema.version>=2.0.0)(!(release.schema.version>=1.0.0)))(|(!(release.state=*))(release.state=0))) for bundle com.my.service

 * com.liferay.portal.kernel.configuration.Configuration (&(origin.bundle.symbolic.name=com.my.service)(name=portlet)) for bundle com.my.service

 * com.liferay.portal.kernel.model.Release (&(release.bundle.symbolic.name=com.my.service)(&(release.schema.version>=2.0.0)(!(release.schema.version>=1.0.0)))(|(!(release.state=*))(release.state=0))) for bundle com.my.service

 * com.liferay.portal.kernel.configuration.Configuration (&(origin.bundle.symbolic.name=com.my.service)(name=service)) for bundle com.my.service

I even tried to create the entries manually but no success.

Any help would be greatly appreciated!

thumbnail
Christoph Rabel, modified 3 Years ago.

RE: Liferay DXP 7.2 - Service Builder Module not registering

Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts

My best guess is something in the bnd file.

I had troubles a while ago because we had export directives in the bnd file for some manually created extra classes in our SB module. The module simply did not work in 7.3 (it started but seemingly did nothing at all) till I removed these extra directives. I moved that extra code then to a new module.

I once also had a problem with an osgi rest service a while ago where something with the references and the annotations caused me troubles. I don't remember the details, I only found the issue by creating the project from scratch and adding stuff till it stopped working.