adding jsonb to core project has killed all slingServlets.
In order to convert between json and objects in an Adobe AEM project, I added the following to the core modules pom.xml file:
<dependency> <groupId>javax.json.bind</groupId> <artifactId>javax.json.bind-api</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>org.eclipse</groupId> <artifactId>yasson</artifactId> <version>1.0</version> <scope>runtime</scope> </dependency>
I added them right below this dependency:
<artifactId>slf4j-test</artifactId>
If I then add the following line:
Jsonb jsonb = JsonbBuilder.create();
to any sling servlet (and the import), it complies without error, but when I try to hit any servlet I get the below error. If I remove the line, it works again. Could it be I have added the dependency to the wrong pom.xml, or in the wrong place, or need to add it somewhere else also?
Resource at '/bin/demo/querybuilder' not found: No resource found
Cannot serve request to /bin/demo/querybuilder in BundledScriptServlet (/libs/sling/servlet/errorhandler/404.jsp)
Request Progress:
0 TIMER_START{Request Processing}
21 COMMENT timer_end format is {<elapsed microseconds>,<timer name>} <optional message>
43 LOG Method=GET, PathInfo=null
58 TIMER_START{handleSecurity}
3285 TIMER_END{3224,handleSecurity} authenticator org.apache.sling.auth.core.impl.SlingAuthenticator@bd75a69 returns true
4676 TIMER_START{ResourceResolution}
5588 TIMER_END{910,ResourceResolution} URI=/bin/demo/querybuilder resolves to Resource=NonExistingResource, path=/bin/demo/querybuilder
5601 LOG Resource Path Info: SlingRequestPathInfo: path='/bin/demo/querybuilder', selectorString='null', extension='null', suffix='null'
5601 TIMER_START{ServletResolution}
5615 TIMER_START{resolveServlet(/bin/demo/querybuilder)}