2 Replies Latest reply on Dec 7, 2010 3:04 PM by 704908

    Bug in ChainedPublishingTransformerScheme?

    704908
      Hi Guys,

      I think there is a bug in ChainedPublishingTransformerScheme in coherence-pushreplicationpattern-3.0.3.20019.

      My cache config is as follows:
                <cache-mapping>
                     <cache-name>publishing-positionlast</cache-name>
                     <scheme-name>distributed-scheme-with-publishing-cachestore</scheme-name>
                     
                     <sync:publisher>
                          <sync:publisher-name>positionlast-publisher</sync:publisher-name>
                          <sync:publisher-scheme>
                               <sync:remote-cluster-publisher-scheme>
                              <sync:remote-invocation-service-name>FIXME</sync:remote-invocation-service-name>
                              <sync:remote-publisher-scheme>
                                   <sync:local-cache-publisher-scheme>
                                        <sync:target-cache-name>publishing-positionlast</sync:target-cache-name>
                                   </sync:local-cache-publisher-scheme>
                              </sync:remote-publisher-scheme>
                                    <sync:max-failures>5</sync:max-failures>
                               </sync:remote-cluster-publisher-scheme>
                          </sync:publisher-scheme>
                          <sync:publishing-transformer-scheme>
                               <sync:chained-transformer-scheme>
                                    <sync:filtering-transformer-scheme>
                                              <sync:filter>
                                                   <replication-filter:consume-filter/>
                                              </sync:filter>
                                    </sync:filtering-transformer-scheme>
                                    <sync:filtering-transformer-scheme>
                                         <sync:entry-operation-filter>
                                              <sync:filter>
                                                   <replication-filter:location-filter/>
                                              </sync:filter>
                                              <sync:operations>Insert, Update, Delete</sync:operations>
                                         </sync:entry-operation-filter>
                                    </sync:filtering-transformer-scheme>
                               </sync:chained-transformer-scheme>
                          </sync:publishing-transformer-scheme>
                     </sync:publisher>
                     
                     <init-params>
                        <init-param>
                              <param-name>local-scheme-name</param-name>
                               <param-value>eventsource-local-scheme</param-value>
                        </init-param>
                      </init-params>
                </cache-mapping>
      This results in a the following stack trace:
      java.lang.NullPointerException
           at com.oracle.coherence.patterns.pushreplication.transformers.ChainedPublishingTransformerScheme.addPublishingTransformerScheme(ChainedPublishingTransformerScheme.java:56)
           at com.oracle.coherence.patterns.pushreplication.configuration.PushReplicationNamespaceContentHandler$13.onElement(PushReplicationNamespaceContentHandler.java:337)
           at com.oracle.coherence.environment.extensible.namespaces.AbstractNamespaceContentHandler.onElement(AbstractNamespaceContentHandler.java:146)
           at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processElement(DefaultConfigurationContext.java:320)
           at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processOnlyElementOf(DefaultConfigurationContext.java:347)
           at com.oracle.coherence.patterns.pushreplication.configuration.PushReplicationNamespaceContentHandler$12.onElement(PushReplicationNamespaceContentHandler.java:315)
           at com.oracle.coherence.environment.extensible.namespaces.AbstractNamespaceContentHandler.onElement(AbstractNamespaceContentHandler.java:146)
           at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processElement(DefaultConfigurationContext.java:320)
           at com.oracle.coherence.configuration.Configurator.getMandatoryProperty(Configurator.java:318)
           at com.oracle.coherence.configuration.Configurator.configure(Configurator.java:132)
           at com.oracle.coherence.patterns.pushreplication.configuration.PushReplicationNamespaceContentHandler$3.onElement(PushReplicationNamespaceContentHandler.java:175)
           at com.oracle.coherence.environment.extensible.namespaces.AbstractNamespaceContentHandler.onElement(AbstractNamespaceContentHandler.java:146)
      It looks to me like publishingTransformerSchemes should be initialised on construction, not just in readExternal.

      Regards, Paul