Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

OSGI bundles not running in local AEM instance

Avatar

Level 1

Hello,

In my local environment, OSGI bundles built by my project are not running or updating in my local AEM instance.

I have checked /system/console/bundles, and I see absolutely no services running for my package.

However, the services are running on my teammates' local instances.

Is there some setting that might be preventing the OSGI services and Sling Servlets from running?

Thank you for any help.

I am running AEM 6.3.1, in case it matters.

8 Replies

Avatar

Level 10

Two things to check:

1. Delete the jcrPauseInstallation folder if you see under /system/sling/installer/jcr

1545801_pastedImage_1.png

2. Check for error in error.log when deploying your code.

Avatar

Level 1

Thank you for the quick response, edubey.

I tried removing the jcrPausInstallation folder. When I deployed after that, I saw a few errors with: "Node with path /system/sling/installer/jcr/pauseInstallation does not exist". So, that change took, but it did not resolve the issue.

Looking further at the error.log, these errors seem suspect:

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.filters.LoggingFilter.xml' not found

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.listeners.SimpleResourceListener.xml' not found

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.schedulers.SimpleScheduledTask.xml' not found

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.servlets.SimpleServlet.xml' not found

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.filters.LoggingFilter.xml' not found

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.listeners.SimpleResourceListener.xml' not found

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.schedulers.SimpleScheduledTask.xml' not found

*ERROR* [FelixStartLevel] com.client.group.project.core Component descriptor entry 'OSGI-INF/com.client.group.project.core.servlets.SimpleServlet.xml' not found

Not sure why these would be missing.

Will check with my team, but any other thoughts?

Thanks again.

Avatar

Level 1

I was able to "solve" the problem by completely blowing away my dev environment and starting anew.

Not a satisfying result, but it works for now.

Avatar

Level 10

Sometimes something becomes corrupt. This is not a bad approach when you are using a local DEV instance used for building components, etc.

Avatar

Employee Advisor

There are many reasons, why your services are not running. Check in this order:

* is the bundle which contains therse services active?

* does the bundle list all the services in the overview?

* go to the components view and check that all your services appear (each service is also a component)

* check that each component is active

* if not, you should be able to see if a required reference within the component is not satisfied.

Have you restarted your AEM already?

Avatar

Level 1

Thanks for the response Jörg Hoh.

So, when my local environment was having issues, the following were my responses:

* is the bundle which contains these services active? YES

* does the bundle list all the services in the overview? NO

* go to the components view and check that all your services appear (each service is also a component) None of my components are there.

* check that each component is active I cannot as there are no components.

* if not, you should be able to see if a required reference within the component is not satisfied. I cannot as there are no components.

After starting in a fresh environment, the above answers change to positives.

I suspect it has something to do with a setting I have in Eclipse when pushing updates to the local server, as I noticed that the services quit again after I hit "Publish" on my server in Eclipse. After the services stopped working the second time, I started my AEM instance fresh (deleted the crx-quickstart) and let AEM reinitialize things. Then, after re-uploading my project packages, the services ran properly again.

Avatar

Employee Advisor

If the components are not there, I would assume that the maven-bundle-plugin did not ran properly. The components are detected by reading the xml files inside the OSGI-INF directory in the bundle. If there are no xml files (because the maven-bundle-plugin did not run), there won't be any components.

That's the only explanation I have.

Jörg

Avatar

Level 1

Jörg,

Yes, it did seem that my maven-bundle-plugin did not run properly, as the OSGI-INF had no xml files.

However, I do not understand what made my maven-bundle-plugin run improperly. There must have been some action I took to cause this failure, but I do not know what it was.

For now, my environment is working, though.

Thank you for the explanation.