Liferay IDE to production server, servicebuilder problems

Sebastian Wikholm, modified 3 Years ago. Regular Member Posts: 110 Join Date: 3/10/11 Recent Posts

I´ve been developing some modules for a liferay site on Liferay IDE for months, and was now about to try to test these not only in the development enviroment but on a standalone server. Ofcourse everything works great on the Liferay IDE 3.9.3 enviroment with a Liferay 7.4 GA1 bundle. The standalone server has Liferay 7.4 GA25 installed, and seems to be working flawlessly.

I started deploying them theme and a module that was embedded in that theme which worked as it should. But next up was the database for the other modules. So i deployed my database-service and database-api jar files. which seemed to throw some errors, which appear first on server restart.

Could not get service from ref {com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands}={osgi.command.scope=upgrade, service.id=8822, service.bundleid=589, service.scope=bundle, osgi.command.function=[check,checkAll,execute,executeAll,list], component.name=com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands, component.id=2609} 

DependencyManager : invokeBindMethod : Service not available from service registry for ServiceReference {com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands}={osgi.command.scope=upgrade, service.id=8822, service.bundleid=589, service.scope=bundle, osgi.command.function=[check,checkAll,execute,executeAll,list], component.name=com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands, component.id=2609} for reference _releaseManagerOSGiCommands 

org.osgi.framework.ServiceException: org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned a null service object

service_1.0.0 [1510] has invalid content in tables.sql:_create table AxxellDB_Beskrivning (_  uuid_ VARCHAR(75) null,_  defaultLanguageId VARCHAR(75) null,.....

the services are activated when i in gogo shell do a "lb", but when i do a "ds:unsatisfied XXXX" on my service bundle, i have a lot of unsatisfied references. the first unsatisfied reference is:

PersistenceImpl, unsatisfied references: {name: Configuration, target: (&(origin.bundle.symbolic.name=xxxx.service.service)(name=service))}

More or less all persistance classes have the target null 

xxxxxServiceImpl, unsatisfied references: {name: xxxxxLocalizationPersistence, target: null}

All local services have the same error, ie

unsatisfied references: {name: xxxxLocalService, target: null}

a censored version of the build.gradle is:

dependencies {
    compile project(":modules:xxxDatabas:xxxDatabas-api")
    compileOnly group: "com.liferay.portal", name: "release.portal.api"
    compileOnly group: "com.liferay", name: "com.liferay.portal.search.spi"
    compileOnly group: "com.liferay", name: "com.liferay.portal.search.api"
    compileOnly group: "javax.portlet", name: "portlet-api"
    compileOnly group: "javax.servlet", name: "javax.servlet-api"
    compileInclude group: "org.apache.commons", name: "commons-lang3", version: "3.12.0"
}

buildService {
    apiDir = "../xxxDatabas-api/src/main/java"
    databaseNameMaxLength = 64
}

group = "xxx.service"

and the bnd.bnd

Bundle-Name: xxxDatabas-service
Bundle-SymbolicName: xxx.service.service
Bundle-Version: 1.0.0
Liferay-Require-SchemaVersion: 1.0.0
Liferay-Service: true
-dsannotations-options: inherit

Now i dont know really where to begin, i would assume, which is a bad thing to do, that it has something to do with a simple bnd.bnd or gradle.build thingy.

I dont think ive done anything overly exotic on the service, but i could be wrong.. 

Does anyone have any ideas where the problem could be, as almost everything with the service fails?

thumbnail
Olaf Kock, modified 3 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

As the release strategy has changed dramatically with the move to weekly releases, you'd ideally compile your plugins with the version that it ends up running in. With new functionalities, some times some dependencies' versions need to be updated, so that they would no longer match the expectations of previously compiled modules.

Can you try a clean rebuild on GA25 and report back?

This is what CI and Liferay Workspace are great for: In Liferay Workspace a single location for the choice of the target platform is given and used to compile all the modules as well.

Jamie Sammons, modified 3 Years ago. Regular Member Posts: 110 Join Date: 3/10/11 Recent Posts

Right now im in the process of upgrading the bundle in my workspace to version 7.4GA43. I have a litte trouble with service builder which gives errors that feel slightly random:

Execution failed for task ':modules:XXX:XXX-api:compileJava'.
> Could not resolve all files for configuration ':modules:XXX:XXX:compileClasspath'.
   > Could not find com.liferay.portal:release.portal.api:.
     Required by:
         project :modules:XXX:XXX

I will continue to work on this and hopefully have a working configuration att the end