MitchellChu / enterprise-java-xacml

Automatically exported from code.google.com/p/enterprise-java-xacml
0 stars 2 forks source link

XML Parsing Errors when running the conformance tests #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When running ConformanceTest, the policy schema is used to validate
requests and responses, resulting in many parsing errors similar to the
following:

[Feb 27, 2009 15:04:52,335 PST]  <Warn> <myHost> <main>
<an.xacml.adapter.file.XMLFileDataStore:153> - Could not load file '/h
ome/kibab/workspace/EnterpriseXACML/tests/data/IIA001Request.xml' since it
should not be a valid policy file.
an.xml.XMLGeneralException: Error occurs during parse XML file.
    at an.xml.XMLParserWrapper.parse(XMLParserWrapper.java:211)
    at
an.xacml.adapter.file.XMLFileDataStore.load(XMLFileDataStore.java:109)
    at an.xacml.engine.PDP.loadPolicies(PDP.java:106)
    at an.xacml.engine.PDP.startPDP(PDP.java:141)
    at an.xacml.engine.PDP.start(PDP.java:305)
    at
tests.an.xacml.conformance20.XACMLConformanceTestCase.initialize(XACMLConfo
    at
tests.an.xacml.conformance20.XACMLConformanceTestSuite.runSuite(XACMLConfor
    at
tests.an.xacml.conformance20.ConformanceTest.suiteAttributeReferences(Confo
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRun
    at
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner
    at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfter
    at
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java
    at
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
    at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClas
    at
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunne
    at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner
    at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfter
    at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
    at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRe
    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestR
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestR
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunne
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'Request'.
...

Original issue reported on code.google.com by kaleb.pe...@gmail.com on 27 Feb 2009 at 11:11

GoogleCodeExporter commented 9 years ago
In taking a thorough look at suiteAttributeReferences(), I discovered that it's 
the
regex in AttributeReferences.properties that causes all three files (Policy, 
Request
and Response) to be picked up and processed with the Policy schema.

Original comment by kaleb.pe...@gmail.com on 28 Feb 2009 at 12:06