Bart Simpson 9 Years Ago Thanks for the interesting pointers.Liferay 6.2 (at least SP8) doesn't seem to contain the ServiceTrackerUtil, wondering if it would be wise to use the one in contained in the example and plug it in . Please sign in to reply. Reply as... Cancel Eduardo P. Garcia Bart Simpson 9 Years Ago The ServiceTrackerUtil is not a part of our example, but it's contained in the com.liferay.osgi.util module. As you mentioned, this module is not in Liferay 6.2, but that doesn't mean that you cannot use it in that version.This generic module is provided through Liferay's repository at http://repository.liferay.com/nexus/index.html#nexus-search;quick~liferay.osgi.util. You can obtain it from there and deploy it in Liferay 6.2, so that other OSGi plugins can use its utility classes. In our example, we do this automatically with the shipping-runtime-dependencies plugin.By the way, the ServiceTrackerUtil has been replaced in the latest version of com.liferay.osgi.util by the ReflectionServiceTracker. We'll try to update our example to use it, but in the meantime take it into account.Thanks! Please sign in to reply. Reply as... Cancel
Eduardo P. Garcia Bart Simpson 9 Years Ago The ServiceTrackerUtil is not a part of our example, but it's contained in the com.liferay.osgi.util module. As you mentioned, this module is not in Liferay 6.2, but that doesn't mean that you cannot use it in that version.This generic module is provided through Liferay's repository at http://repository.liferay.com/nexus/index.html#nexus-search;quick~liferay.osgi.util. You can obtain it from there and deploy it in Liferay 6.2, so that other OSGi plugins can use its utility classes. In our example, we do this automatically with the shipping-runtime-dependencies plugin.By the way, the ServiceTrackerUtil has been replaced in the latest version of com.liferay.osgi.util by the ReflectionServiceTracker. We'll try to update our example to use it, but in the meantime take it into account.Thanks! Please sign in to reply. Reply as... Cancel
Bart Simpson 9 Years Ago With 6.2 deployment I see Preventing the replacement of the plugin class loaderPreventing the removal of the plugin class loader,haven't dwelt in much, but if someone already has an answer Please sign in to reply. Reply as... Cancel Bart Simpson Bart Simpson 9 Years Ago Moving ahead :java.lang.NullPointerException: A null service reference is not allowed. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:586) at com.liferay.osgi.util.service.ServiceTrackerUtil$1.invoke(ServiceTrackerUtil.java:47) Please sign in to reply. Reply as... Cancel
Bart Simpson Bart Simpson 9 Years Ago Moving ahead :java.lang.NullPointerException: A null service reference is not allowed. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:586) at com.liferay.osgi.util.service.ServiceTrackerUtil$1.invoke(ServiceTrackerUtil.java:47) Please sign in to reply. Reply as... Cancel