[jira] [Updated] (CONNECTORS-1603) Global config cannot be replaced when invalid XML stored in Zookeeper

2019-04-25 Thread Raman Gupta (JIRA)


 [ 
https://issues.apache.org/jira/browse/CONNECTORS-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raman Gupta updated CONNECTORS-1603:

Summary: Global config cannot be replaced when invalid XML stored in 
Zookeeper  (was: Global config corrupted when invalid XML stored in Zookeeper)

> Global config cannot be replaced when invalid XML stored in Zookeeper
> -
>
> Key: CONNECTORS-1603
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
> Project: ManifoldCF
>  Issue Type: Bug
>Reporter: Raman Gupta
>Priority: Major
>
> When using Zookeeper to store the global config, it seems that the 
> properties-global.xml is stored verbatim. However, if this file contains 
> invalid XML, then all subsequent operations fail, including storing the 
> global config again, as before the global config is stored, the existing 
> global config is read and parsed, which fails.
> The only workaround to this is to use ZK to delete the current configuration 
> at key `/org.apache.manifoldcf/configuration`,
> It should be possible for the `ZooKeeperLockManager` command to overwrite the 
> configuration at `/org.apache.manifoldcf/configuration` even if the current 
> value is invalid.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CONNECTORS-1603) Global config corrupted when invalid XML stored in Zookeeper

2019-04-25 Thread Raman Gupta (JIRA)


 [ 
https://issues.apache.org/jira/browse/CONNECTORS-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raman Gupta updated CONNECTORS-1603:

Description: 
When using Zookeeper to store the global config, it seems that the 
properties-global.xml is stored verbatim. However, if this file contains 
invalid XML, then all subsequent operations fail, including storing the global 
config again, as before the global config is stored, the existing global config 
is read and parsed, which fails.

The only workaround to this is to use ZK to delete the current configuration at 
key `/org.apache.manifoldcf/configuration`,

It should be possible for the `ZooKeeperLockManager` command to overwrite the 
configuration at `/org.apache.manifoldcf/configuration` even if the current 
value is invalid.

  was:
When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:



When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:



Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The 
reference to entity "bar" must end with the ';' delimiter.
 at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
 at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
 at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
 ... 9 more

 


> Global config corrupted when invalid XML stored in Zookeeper
> 
>
> Key: CONNECTORS-1603
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
> Project: ManifoldCF
>  Issue Type: Bug
>Reporter: Raman Gupta
>Priority: Major
>
> When using Zookeeper to store the global config, it seems that the 
> properties-global.xml is stored verbatim. However, if this file contains 
> invalid XML, then all subsequent operations fail, including storing the 
> global config again, as before the global config is stored, the existing 
> global config is read and parsed, which fails.
> The only workaround to this is to use ZK to delete the current configuration 
> at key `/org.apache.manifoldcf/configuration`,
> It should be possible for the `ZooKeeperLockManager` command to overwrite the 
> configuration at `/org.apache.manifoldcf/configuration` even if the current 
> value is invalid.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CONNECTORS-1603) Global config corrupted when invalid XML stored in Zookeeper

2019-04-25 Thread Raman Gupta (JIRA)


 [ 
https://issues.apache.org/jira/browse/CONNECTORS-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raman Gupta updated CONNECTORS-1603:

Summary: Global config corrupted when invalid XML stored in Zookeeper  
(was: Global config XML double-decoded when stored in Zookeeper)

> Global config corrupted when invalid XML stored in Zookeeper
> 
>
> Key: CONNECTORS-1603
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
> Project: ManifoldCF
>  Issue Type: Bug
>Reporter: Raman Gupta
>Priority: Major
>
> When using Zookeeper to store the global config, it is impossible to have 
> entities in the input XML. For example if we have a db password with value 
> "foo", then we have to encode this in the global config XML like this:
> 
> When writing the global config to Zookeeper, it appears like this XML file is 
> parsed, but then written to ZooKeeper as:
> 
> Now, when this global config is read from ZooKeeper, Manifold parses it as 
> XML again, and of course fails with the error:
> Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; 
> The reference to entity "bar" must end with the ';' delimiter.
>  at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>  at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
>  at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
>  ... 9 more
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CONNECTORS-1603) Global config XML double-decoded when stored in Zookeeper

2019-04-25 Thread Raman Gupta (JIRA)


 [ 
https://issues.apache.org/jira/browse/CONNECTORS-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raman Gupta updated CONNECTORS-1603:

Description: 
When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:



When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:



Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The 
reference to entity "bar" must end with the ';' delimiter.
 at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
 at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
 at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
 ... 9 more

 

  was:
When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:



When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:



Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

{{
Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The 
reference to entity "bar" must end with the ';' delimiter.
 at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
 at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
 at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
 ... 9 more
}}


 


> Global config XML double-decoded when stored in Zookeeper
> -
>
> Key: CONNECTORS-1603
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
> Project: ManifoldCF
>  Issue Type: Bug
>Reporter: Raman Gupta
>Priority: Major
>
> When using Zookeeper to store the global config, it is impossible to have 
> entities in the input XML. For example if we have a db password with value 
> "foo", then we have to encode this in the global config XML like this:
> 
> When writing the global config to Zookeeper, it appears like this XML file is 
> parsed, but then written to ZooKeeper as:
> 
> Now, when this global config is read from ZooKeeper, Manifold parses it as 
> XML again, and of course fails with the error:
> Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; 
> The reference to entity "bar" must end with the ';' delimiter.
>  at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>  at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
>  at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
>  ... 9 more
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CONNECTORS-1603) Global config XML double-decoded when stored in Zookeeper

2019-04-25 Thread Raman Gupta (JIRA)


 [ 
https://issues.apache.org/jira/browse/CONNECTORS-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raman Gupta updated CONNECTORS-1603:

Description: 
When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:



When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:



Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

{{
Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The 
reference to entity "bar" must end with the ';' delimiter.
 at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
 at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
 at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
 ... 9 more
}}


 

  was:
When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:

  

When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:

  

Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

{{Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; 
The reference to entity "bar" must end with the ';' delimiter.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at 
java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
... 9 more
}}


> Global config XML double-decoded when stored in Zookeeper
> -
>
> Key: CONNECTORS-1603
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
> Project: ManifoldCF
>  Issue Type: Bug
>Reporter: Raman Gupta
>Priority: Major
>
> When using Zookeeper to store the global config, it is impossible to have 
> entities in the input XML. For example if we have a db password with value 
> "foo", then we have to encode this in the global config XML like this:
> 
> When writing the global config to Zookeeper, it appears like this XML file is 
> parsed, but then written to ZooKeeper as:
> 
> Now, when this global config is read from ZooKeeper, Manifold parses it as 
> XML again, and of course fails with the error:
> {{
> Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; 
> The reference to entity "bar" must end with the ';' delimiter.
>  at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>  at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
>  at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
>  ... 9 more
> }}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CONNECTORS-1603) Global config XML double-decoded when stored in Zookeeper

2019-04-25 Thread Raman Gupta (JIRA)
Raman Gupta created CONNECTORS-1603:
---

 Summary: Global config XML double-decoded when stored in Zookeeper
 Key: CONNECTORS-1603
 URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
 Project: ManifoldCF
  Issue Type: Bug
Reporter: Raman Gupta


When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:

  

When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:

  

Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The 
reference to entity "bar" must end with the ';' delimiter.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at 
java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
... 9 more




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CONNECTORS-1603) Global config XML double-decoded when stored in Zookeeper

2019-04-25 Thread Raman Gupta (JIRA)


 [ 
https://issues.apache.org/jira/browse/CONNECTORS-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raman Gupta updated CONNECTORS-1603:

Description: 
When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:

  

When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:

  

Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

{{Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; 
The reference to entity "bar" must end with the ';' delimiter.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at 
java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
... 9 more
}}

  was:
When using Zookeeper to store the global config, it is impossible to have 
entities in the input XML. For example if we have a db password with value 
"foo", then we have to encode this in the global config XML like this:

  

When writing the global config to Zookeeper, it appears like this XML file is 
parsed, but then written to ZooKeeper as:

  

Now, when this global config is read from ZooKeeper, Manifold parses it as XML 
again, and of course fails with the error:

Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The 
reference to entity "bar" must end with the ';' delimiter.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at 
java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
... 9 more



> Global config XML double-decoded when stored in Zookeeper
> -
>
> Key: CONNECTORS-1603
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
> Project: ManifoldCF
>  Issue Type: Bug
>Reporter: Raman Gupta
>Priority: Major
>
> When using Zookeeper to store the global config, it is impossible to have 
> entities in the input XML. For example if we have a db password with value 
> "foo", then we have to encode this in the global config XML like this:
>value="foobar"/>
> When writing the global config to Zookeeper, it appears like this XML file is 
> parsed, but then written to ZooKeeper as:
>   
> Now, when this global config is read from ZooKeeper, Manifold parses it as 
> XML again, and of course fails with the error:
> {{Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; 
> The reference to entity "bar" must end with the ';' delimiter.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at 
> java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
> at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
> ... 9 more
> }}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)