You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openaz.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2015/04/15 14:52:49 UTC
Errors when adding AL 2.0 license in XML files
Hi,
I have tried to add the AL 2.0 to XML files, but then, I get tests errors.
Here is the addition to the XML file :
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
PolicyId="urn:oasis:names:tc:xacml:2.0:test001:policy"
...
and here is the error I get :
az-pep/src/test/resources/policies/TestPolicy001.xml": Exception parsing
Policy: Unexpected element "null"
com.att.research.xacml.std.dom.DOMStructureException: Exception loading
Policy file
"/Users/elecharny/incubator-openaz/openaz-pep/src/test/resources/policies/TestPolicy001.xml":
Exception parsing Policy: Unexpected element "null"
at
com.att.research.xacmlatt.pdp.policy.dom.DOMPolicyDef.load(DOMPolicyDef.java:145)
at
com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.loadPolicyDef(StdPolicyFinderFactory.java:104)
at
com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.getPolicyDefs(StdPolicyFinderFactory.java:168)
at
com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.init(StdPolicyFinderFactory.java:215)
at
com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.getPolicyFinder(StdPolicyFinderFactory.java:241)
at
com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory.getPolicyFinder(StdEvaluationContextFactory.java:98)
at
com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory.getEvaluationContext(StdEvaluationContextFactory.java:169)
at
com.att.research.xacmlatt.pdp.ATTPDPEngine.decide(ATTPDPEngine.java:208)
at
org.openliberty.openaz.pepapi.std.StdPepAgent.decide(StdPepAgent.java:129)
at
org.openliberty.openaz.pepapi.std.StdPepAgent.bulkDecide(StdPepAgent.java:115)
at
org.openliberty.openaz.pepapi.std.test.TestAPI.testMultiRequest(TestAPI.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Any idea on what's wrong ?
Re: Errors when adding AL 2.0 license in XML files
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 16/04/15 11:43, Colm O hEigeartaigh a écrit :
> Try "git diff --cached"?
>
> Colm.
Hmmm... I think that, for a weird reason, if there are some ^M in the
files, then git diff does not show anything.
I'll remove those stupid ^M
PS : i'm on Mac, so there should not be any ^M in the files, it seems
that they have been added when I used head/tail to modify the files.
Re: Errors when adding AL 2.0 license in XML files
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 16/04/15 11:43, Colm O hEigeartaigh a écrit :
> Try "git diff --cached"?
same thing...
Re: Errors when adding AL 2.0 license in XML files
Posted by Colm O hEigeartaigh <co...@apache.org>.
Try "git diff --cached"?
Colm.
On Thu, Apr 16, 2015 at 10:39 AM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 16/04/15 11:10, Colm O hEigeartaigh a écrit :
> > Could you send me the patch + I will take a look?
>
> For some unknown reason, git diff returns nothing :/
>
> I did a git add/git commit, and I'm sure the changes are in the code.
>
> WTF ?
>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
Re: Errors when adding AL 2.0 license in XML files
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 16/04/15 11:10, Colm O hEigeartaigh a écrit :
> Could you send me the patch + I will take a look?
For some unknown reason, git diff returns nothing :/
I did a git add/git commit, and I'm sure the changes are in the code.
WTF ?
Re: Errors when adding AL 2.0 license in XML files
Posted by Colm O hEigeartaigh <co...@apache.org>.
Could you send me the patch + I will take a look?
Colm.
On Thu, Apr 16, 2015 at 10:03 AM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Le 15/04/15 15:12, Colm O hEigeartaigh a écrit :
> > Hi Emmanuel,
> >
> > I took the liberty of fixing this.
>
> Sadly, that does not work with the hundreds of test xml files...
>
>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
Re: Errors when adding AL 2.0 license in XML files
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 15/04/15 15:12, Colm O hEigeartaigh a écrit :
> Hi Emmanuel,
>
> I took the liberty of fixing this.
Sadly, that does not work with the hundreds of test xml files...
Re: Errors when adding AL 2.0 license in XML files
Posted by Colm O hEigeartaigh <co...@apache.org>.
Hi Emmanuel,
I took the liberty of fixing this.
Colm.
On Wed, Apr 15, 2015 at 1:52 PM, Emmanuel Lécharny <el...@gmail.com>
wrote:
> Hi,
>
> I have tried to add the AL 2.0 to XML files, but then, I get tests errors.
>
> Here is the addition to the XML file :
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<!--
> + Licensed to the Apache Software Foundation (ASF) under one or more
> + contributor license agreements. See the NOTICE file distributed with
> + this work for additional information regarding copyright ownership.
> + The ASF licenses this file to You under the Apache License, Version 2.0
> + (the "License"); you may not use this file except in compliance with
> + the License. You may obtain a copy of the License at
> +
> + http://www.apache.org/licenses/LICENSE-2.0
> +
> + Unless required by applicable law or agreed to in writing, software
> + distributed under the License is distributed on an "AS IS" BASIS,
> + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + See the License for the specific language governing permissions and
> + limitations under the License.
> +-->
> <Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> PolicyId="urn:oasis:names:tc:xacml:2.0:test001:policy"
> ...
>
> and here is the error I get :
>
> az-pep/src/test/resources/policies/TestPolicy001.xml": Exception parsing
> Policy: Unexpected element "null"
> com.att.research.xacml.std.dom.DOMStructureException: Exception loading
> Policy file
>
> "/Users/elecharny/incubator-openaz/openaz-pep/src/test/resources/policies/TestPolicy001.xml":
> Exception parsing Policy: Unexpected element "null"
> at
>
> com.att.research.xacmlatt.pdp.policy.dom.DOMPolicyDef.load(DOMPolicyDef.java:145)
> at
>
> com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.loadPolicyDef(StdPolicyFinderFactory.java:104)
> at
>
> com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.getPolicyDefs(StdPolicyFinderFactory.java:168)
> at
>
> com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.init(StdPolicyFinderFactory.java:215)
> at
>
> com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory.getPolicyFinder(StdPolicyFinderFactory.java:241)
> at
>
> com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory.getPolicyFinder(StdEvaluationContextFactory.java:98)
> at
>
> com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory.getEvaluationContext(StdEvaluationContextFactory.java:169)
> at
> com.att.research.xacmlatt.pdp.ATTPDPEngine.decide(ATTPDPEngine.java:208)
> at
> org.openliberty.openaz.pepapi.std.StdPepAgent.decide(StdPepAgent.java:129)
> at
>
> org.openliberty.openaz.pepapi.std.StdPepAgent.bulkDecide(StdPepAgent.java:115)
> at
>
> org.openliberty.openaz.pepapi.std.test.TestAPI.testMultiRequest(TestAPI.java:87)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
>
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at
>
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
>
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at
>
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at
>
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at
>
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at
>
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at
>
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at
>
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at
>
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
>
>
> Any idea on what's wrong ?
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com