OSGi fragment module disappears when one of dependent modules is deployed

Jan Tošovský, modified 6 Years ago. Liferay Master Posts: 576 Join Date: 7/22/10 Recent Posts

I try customizing User Admin JSP pages. I just want to heavily reduce navigation screens. My idea is to create new navigation screens and then force JSP pages to use them. The navigation screen framework is described here: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/screen-navigation-framework

 

My navigations screens are in module A. My customized JSP pages are in OSGi fragment module B.

 

When A is deployed, it is activated.

When B is deployed, both A and user-admin-web module are stopped, but only user-admin-web is started again.

In this stage gogo shell diag complains there is missing dependency (A module)

When A is redeployed, it is activated, but B disappears without any log message.

 

Tested several times.

 

So there is no way now to have both modules running at once.

 

LR GA1 on tomcat 9 (standard bundle).

 

Any idea?

thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

A fragment bundle will stop the host bundle it is bound to, but any bundles that are dependent upon it will also get stopped while it restarts.

Since B is a fragment bundle, I don't understand what "B disappears without any log message" means.  B will not be any kind of active bundle, so it won't show as active in the gogo shell...

Jan Tošovský, modified 6 Years ago. Liferay Master Posts: 576 Join Date: 7/22/10 Recent Posts

Thanks David.

> When A is redeployed, it is activated, but B disappears without any log message.

I meant it disappear from the list of bundles in gogo shell, suddenly, and I have no idea why as there isn't any related message in the LR log.

 

However, today, after restarting the server, everything works as expected. So I can see both A and B modules running at once. It works even after redeploying any of these modules.

 

It is crazy.

thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
When I've seen weird stuff like this, sometimes a purge of osgi/state during a restart will resolve it, but there's no guarantee.