RE: LR 7.4 unsatisfied references: ServletContext

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

My portlet (actually configuration action) have difficulty to resolve ServletContext reference:

Bundle {id: 1498, name: my.knowledge.base.web, version: 1.0.0}
	Declarative Service {id: 9862, name: my.knowledge.base.action.UniKBAdminConfigurationAction, unsatisfied references: 
		{name: ServletContext, target: (osgi.web.symbolicname=my.knowledge.base.web)}
	}
}

The source is just clone of this action: https://github.com/liferay/liferay-portal/blob/master/modules/apps/blogs/blogs-web/src/main/java/com/liferay/blogs/web/internal/portlet/action/BlogsConfigurationAction.java

In my web module POM file I have servlet-api dependency and the module is compiled without any errors. 

Any idea why such core class is not resolved properly?

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

I switched to Gradle (because of other Maven problems, e.g. https://issues.liferay.com/browse/LPS-146977) and this issue has gone as well.