Highlighted

OSGI bundles not running in local AEM instance

Avatar

Avatar

bcg-maya-kav2

Avatar

bcg-maya-kav2

bcg-maya-kav2

09-08-2018

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.

Replies

Highlighted

Avatar

Avatar

edubey

Total Posts

1.5K

Likes

264

Correct Answer

392

Avatar

edubey

Total Posts

1.5K

Likes

264

Correct Answer

392
edubey

10-08-2018

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.

Highlighted

Avatar

Avatar

bcg-maya-kav2

Avatar

bcg-maya-kav2

bcg-maya-kav2

10-08-2018

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.

Highlighted

Avatar

Avatar

bcg-maya-kav2

Avatar

bcg-maya-kav2

bcg-maya-kav2

10-08-2018

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.

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

10-08-2018

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

Highlighted

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K
Jörg_Hoh
Employee

10-08-2018

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?

Highlighted

Avatar

Avatar

bcg-maya-kav2

Avatar

bcg-maya-kav2

bcg-maya-kav2

10-08-2018

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.

Highlighted

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K
Jörg_Hoh
Employee

10-08-2018

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

Highlighted

Avatar

Avatar

bcg-maya-kav2

Avatar

bcg-maya-kav2

bcg-maya-kav2

10-08-2018

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.