We created project using latest archetype (cloud runtime).
Junit test fails in the part when json is loading,
ctx.load().json("/com/myproject/core/models/impl/MycmpntImplTest.json", "/content");
Same test works when I move it and run from inside weekend project or when I use weekend test libs (pom defintions) in our project.
Exception follows :
java.lang.IllegalStateException: Unable to enable secure processing.
at org.apache.sling.contentparser.xml.jcr.internal.JCRXMLContentParser.<init>(JCRXMLContentParser.java:61)
at org.apache.sling.testing.mock.sling.loader.ContentLoader.<init>(ContentLoader.java:149)
at org.apache.sling.testing.mock.sling.context.SlingContextImpl.load(SlingContextImpl.java:376)
at org.apache.sling.testing.mock.sling.context.SlingContextImpl.load(SlingContextImpl.java:366)
at com.myproject.core.models.impl.MycmpntImplTest.setUp(MycmpntImplTest.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.
.
.at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source)
at org.apache.sling.contentparser.xml.jcr.internal.JCRXMLContentParser.<init>(JCRXMLContentParser.java:57)
Solved! Go to Solution.
Views
Replies
Total Likes