Hello community. I hope you are doing well. I will I have faced an issue while creating a form basing on an xsd schema. We use core components (and a template with the core page component).
Although the schema is valid, Data Source is emty after creating a form.
If use the same schema for creating a form with OOTB components, everything is ok.
I have found follow in a log file:
com.adobe.aemds.guide.service.impl.GuideModelImporterImpl Error in reading JSON Schema from path/content/dam/formsanddocuments/schemas/schema.xsd/jcr:content/renditions/original
com.adobe.aemds.guide.service.GuideException: Error in reading JSON Schema from URI
at com.adobe.aemds.guide.service.impl.GuideModelImporterImpl.importFromJSONUri(GuideModelImporterImpl.java:713) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.GuideModelImporterImpl.importFromJSONUri(GuideModelImporterImpl.java:686) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.GuideModelImporterImpl.importFromJSONSchema(GuideModelImporterImpl.java:647) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.GuideModelImporterImpl.importFromJSONSchema(GuideModelImporterImpl.java:598) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.GuideModelImporterImpl.createFormJsonFromJsonSchema(GuideModelImporterImpl.java:1523) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.GuideModelImporterImpl.createFormJsonFromSchema(GuideModelImporterImpl.java:1458) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.FormJsonDataSchema$1.call(FormJsonDataSchema.java:89) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.FormJsonDataSchema$1.call(FormJsonDataSchema.java:82) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.callWith(ResourceResolverHelperImpl.java:65) [com.adobe.granite.resourceresolverhelper:1.0.4]
at com.adobe.aemds.guide.service.impl.FormJsonDataSchema.getJsonFromSchema(FormJsonDataSchema.java:82) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.service.impl.FormDataSchemaOperation.serve(FormDataSchemaOperation.java:75) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at com.adobe.aemds.guide.internal.impl.servlet.FormContainerCoreServlet.doGet(FormContainerCoreServlet.java:40) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) [org.apache.felix.http.servlet-api:1.2.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [org.apache.felix.http.servlet-api:1.2.0]
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:127) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) [org.apache.felix.http.jetty:4.2.12]
at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308) [com.adobe.granite.license:1.2.10]
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:149) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.2.12]
at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) [org.apache.sling.i18n:2.6.2]
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:149) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.2.12]
at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:73) [org.apache.sling.engine:2.7.10.B0004]
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:149) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:152) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1000) [org.apache.felix.http.jetty:4.2.12]
at com.adobe.granite.auth.oauth.impl.OAuthCallbackFilter.doFilter(OAuthCallbackFilter.java:78) [com.adobe.granite.auth.oauth:1.10.8]
at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1006) [org.apache.felix.http.jetty:4.2.12]
at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:326) [org.apache.sling.security:1.1.16]
at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1006) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:97) [org.apache.felix.http.sslfilter:1.2.6]
at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:137) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1006) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(WhiteboardManager.java:1010) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:94) [org.apache.felix.http.jetty:4.2.12]
at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49) [org.apache.felix.http.jetty:4.2.12]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [org.apache.felix.http.servlet-api:1.2.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.Server.handle(Server.java:516) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [org.apache.felix.http.jetty:4.2.12]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [org.apache.felix.http.jetty:4.2.12]
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.github.fge.jsonschema.core.exceptions.ProcessingException: fatal: content at URI "crx:/content/dam/formsanddocuments/schemas/schema.xsd#" is not valid JSON
level: "fatal"
uri: "crx:/content/dam/formsanddocuments/schemas/schema.xsd#"
parsingMessage: "Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')"
at com.github.fge.jsonschema.core.load.URIManager.getContent(URIManager.java:110) [com.adobe.cq.json-schema-parser:4.0.158]
at com.github.fge.jsonschema.core.load.SchemaLoader$1.load(SchemaLoader.java:115) [com.adobe.cq.json-schema-parser:4.0.158]
at com.github.fge.jsonschema.core.load.SchemaLoader$1.load(SchemaLoader.java:109) [com.adobe.cq.json-schema-parser:4.0.158]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195)
at com.google.common.cache.LocalCache.get(LocalCache.java:3934)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821)
at com.github.fge.jsonschema.core.load.SchemaLoader.get(SchemaLoader.java:172) [com.adobe.cq.json-schema-parser:4.0.158]
at com.adobe.cq.jsonschema.parser.impl.JsonSchemaParserValidator.<init>(JsonSchemaParserValidator.java:154) [com.adobe.cq.json-schema-parser:4.0.158]
at com.adobe.cq.jsonschema.parser.impl.JsonSchemaParserValidatorImpl.getResolvedObject(JsonSchemaParserValidatorImpl.java:98) [com.adobe.cq.json-schema-parser:4.0.158]
at com.adobe.cq.jsonschema.parser.impl.JsonSchemaParserValidatorImpl.getResolvedObject(JsonSchemaParserValidatorImpl.java:34) [com.adobe.cq.json-schema-parser:4.0.158]
at com.adobe.aemds.guide.service.impl.GuideModelImporterImpl.importFromJSONUri(GuideModelImporterImpl.java:705) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.596]
... 69 common frames omitted
Do you have any ideas why XSD file is parsed as a json one?