AEM - Java servlet can't register on fresh 6.4 install
Hey Everyone,
I've been dealing with a really tricky issue on a fresh AEM 6.4 install. One of my servlets cannot start. It can register fine and shows up okay however, it always throws a 404 at the path its registered at. I deleted and re-installed my AEM and the issue still persists. The error is very cryptic and there isnt much on the internet about it.
Has anyone every seen? "Service factory returned null"
10.05.2018 14:45:04.358 *ERROR* [FelixDispatchQueue] org.apache.sling.servlets.resolver FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory returned null. (Component: com.amsurg.core.servlets.RSSXMLServlet (3142)))
org.osgi.framework.ServiceException: Service factory returned null. (Component: com.amsurg.core.servlets.RSSXMLServlet (3142))
It's nothing with my code and I have several other servlets that register just fine. This particular one was working earlier then just stopped. Anyone have any troubleshooting ideas? I've tried re-building, restarting AEM, and checking the servlet sling checker but nothing seems to be able to find it.
It registers okay and shows up in the bundle as
| Service ID 6903 | Types: javax.servlet.Servlet Service PID: com.amsurg.core.servlets.RSSXMLServlet Component Name: com.amsurg.core.servlets.RSSXMLServlet Component ID: 3142 Vendor: Adobe |
But underneath it there is no part that looks like this
Types: org.apache.sling.spi.resource.provider.ResourceProvider
Description: ServletResourceProvider for Servlets at [/libs/amsurg/structure/page/GET.servlet, /libs/amsurg/structure/page/HEAD.servlet]
Anyone have any troubleshooting ideas? This is how it is registered - @SlingServlet(paths = "/bin/feed", methods = "GET", metatype = true)
Thanks
Brendan