Coherence Proxy tcp-acceptor is not allowing xml-override option for authorized-hosts

(Doc ID 2177493.1)

Last updated on SEPTEMBER 15, 2016

Applies to:

Oracle Coherence - Version 12.1.2.0.0 to 12.2.1.1.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

Customer wants to have the authorized-hosts file separated out using xml-override option from the coherence-cache-config and tangosol-coherence-override.xml cluster config xml files. But customer has noticed that xml-override attribute option is only working in the cluster config xml file, tangosol-coherence-override.xml, for cluster-config/authorized-hosts element and it is failing when specified in the cache config xml file, coherence-cache-config.xml, for proxy-scheme/acceptor-config/tcp-acceptor/authorized-hosts element.

The tangosol-coherence-override.xml and coherence-cache-config.xml files are using schema coherence-operational-config.xsd and coherence-cache-config.xsd respectively. 

Example: Configuration snippet from coherence-cache-config.xml is follows.

<cache-config>
...
<proxy-scheme>
  <scheme-name>ProxyService</scheme-name>
  <service-name>ProxyService</service-name>
  <thread-count-max>30</thread-count-max>
  <thread-count-min>8</thread-count-min>
   <acceptor-config>
       <tcp-acceptor>
          <address-provider>proxy</address-provider>
          <authorized-hosts xml-override="proxy-authorized-hosts.xml" />
       </tcp-acceptor>
   </acceptor-config>
<proxy-config>
<cache-service-proxy>
  <enabled>true</enabled>
</cache-service-proxy>
<invocation-service-proxy>
  <enabled>true</enabled>
</invocation-service-proxy>
</proxy-config>
<load-balancer>client</load-balancer>
<autostart system-property="tangosol.coherence.proxy.autostart">false</autostart>
</proxy-scheme>
</caching-schemes>
</cache-config>

Example: Configuration of proxy-authorized-hosts.xml

<?xml version='1.0'?>
<authorized-hosts>
<host-address id="1">xxx.xxx.xxx.xxx</host-address>
</authorized-hosts>

Error is thrown in the logs when attempted to boot the proxy server.

2016-08-19 11:22:37.760/1.247 Oracle Coherence GE 12.2.1.1.0 <Error> (thread=main, member=n/a): Error org.xml.sax.SAXParseException; lineNumber: 62; columnNumber: 83; cvc-complex-type.3.2.2: Attribute 'xml-override' is not allowed to appear in element 'authorized-hosts'. - line 62
Exception in thread "main" (Wrapped) java.io.IOException: Could not load cache configuration resource file:/coherence/lpl/config/coherence-cache-config.xml, Cause:cvc-complex-type.3.2.2: Attribute 'xml-override' is not allowed to appear in element 'authorized-hosts'.
at com.tangosol.util.Base.ensureRuntimeException(Base.java:296)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:277)
at com.tangosol.net.ScopedCacheFactoryBuilder.loadConfigFromURI(ScopedCacheFactoryBuilder.java:399)
at com.tangosol.net.ScopedCacheFactoryBuilder.buildFactory(ScopedCacheFactoryBuilder.java:428)
at com.tangosol.net.ScopedCacheFactoryBuilder.getFactoryInternal(ScopedCacheFactoryBuilder.java:272)
at com.tangosol.net.ScopedCacheFactoryBuilder.getFactory(ScopedCacheFactoryBuilder.java:235)
at com.tangosol.net.ScopedCacheFactoryBuilder.getConfigurableCacheFactory(ScopedCacheFactoryBuilder.java:115)
at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:154)
at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:136)
at com.tangosol.net.DefaultCacheServer.getConfigurableCacheFactory(DefaultCacheServer.java:702)
at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:416)
Caused by: java.io.IOException: Could not load cache configuration resource file:/coherence/lpl/config/coherence-cache-config.xml, Cause:cvc-complex-type.3.2.2: Attribute 'xml-override' is not allowed to appear in element 'authorized-hosts'.
at com.tangosol.net.ScopedCacheFactoryBuilder.loadConfigFromURI(ScopedCacheFactoryBuilder.java:396)
... 8 more

Customer's question is when the schema is not allowing the xml-override option forproxy-scheme/acceptor-config/tcp-acceptor/authorized-hosts element is there a workaround to externalize the authorized host lists for Proxy?

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms