Trying to convert json to xml and trying to indent the xml So used below library but
package org.apache.xml.serialize does not exist getting this error though I added dependency in pom
Solved! Go to Solution.
Views
Replies
Total Likes
You might be getting this error because "xercesImpl" jar/library is not available OOTB in AEM bundles.
In that case, you need to embed this dependency as part of your core module as external dependency.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- <Embed-Dependency> artifactId1, artifactId2;inline=true </Embed-Dependency> -->
<Embed-Dependency>xercesImpl</Embed-Dependency>
Note: You may have to embed other dependencies which are needed for "xercesImpl" as well.
Try this out.
Hi @Keerthi0555
Please check this thread - https://stackoverflow.com/questions/19977979/converting-json-to-xml-in-java
Regards,
Shiv
Hi @Keerthi0555 ,
Can you tell me which Java utilities you are using for converting the JSON to XML?
It is always good to check the maven dependencies in AEM using depfinder and then use that in your POM as dependency, if you don't find that OSGi bundle in AEM then you can go for external dependency.
Thanks,
You might be getting this error because "xercesImpl" jar/library is not available OOTB in AEM bundles.
In that case, you need to embed this dependency as part of your core module as external dependency.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- <Embed-Dependency> artifactId1, artifactId2;inline=true </Embed-Dependency> -->
<Embed-Dependency>xercesImpl</Embed-Dependency>
Note: You may have to embed other dependencies which are needed for "xercesImpl" as well.
Try this out.