Menu

Service-Component entry can not be located in JAR: OSGI-INF

We might come to this issue while building the AEM code. The issue is with the @compoennt properties or the definition given for the file. In most of the cases error "Service-Component entry can not be located in JAR: OSGI-INF" says, that the @component name property which we are trying to give here is a duplicate and that name has been already given to a class, hence this name can not be accepted for a new component because it causes the unnecessary conflict between two components, and difficult to generate the meta-type or metadata, and manage the OSGi component.


[ERROR] Bundle com.rashid.aem.bundles:servlets:bundle:1.0.0-SNAPSHOT : Service-Component entry can not be located in JAR: OSGI-INF/com.rashid.aem.servlets.MobileAppImageServlet.xml~

[ERROR] Error(s) found in bundle configuration


Resolution

Update the name property value under @component annotation.


Example:

@Component( immediate = true,
service = Servlet.
class,
name =
"com.rashid.aem.servlets.GetAllImageServlet",
property = {
"sling.servlet.selectors=mobileapp",
"sling.servlet.extensions=json",
"sling.servlet.methods=GET",
"sling.servlet.paths=/bin/getAllImages"})

How to update git password in local windows machine?

We can update git password or any other login credential in windows credential manager.

To open the windows credential manager

1. Open control panel

2. Switch to small view and look for credential manager

How to update password in windows machine for any logged-in account

3. Go to Windows credentials tab

Windows Credentials manager to update the credential of logged in accounts

4. In Generic credentials section look for your account and click on that. When you click it will get expanded and you will see option Edit or Remove

5. Click on Edit and update the credential and save it.

6. Now perform your action.

Note: We can not store more than one Git credential in windows credential  

How to test a site on different browsers and devices online?

While working with responsive design there are various CSS properties that don't support in all browsers, for that we have to write either common CSS properties that are supported by all modern browsers or write properties specific to the browser. Now the thing is how to test a web page on different browsers and devices, a person or team doesn't own all devices, and not even possible. So to overcome with this we have various online tools available that provide all types of platform and devices for testing. Below are some of them.

 1. BrowserStack -- www.browserstack.com

This is free to use to a minute for a test run. If someone wants to spend more time then they can purchase their paid version.

2. Browserling -- www.browserling.com

This is good for cross-browser testing, but this doesn't have the feature to test the browsing on iOS devices.

3. Kobiton -- www.kobiton.com

Kobiton also provide free trial for two weeks, we could first try the product features and then we can decide for subscription. 

There are so many other online and offline tools also we have for cross browser testing that can be use. Above are a short list of online cross browser testing tool. Hope this helps you to grab the right information which you are looking for. Thank you!