This discussion is archived
1 Reply Latest reply: Mar 14, 2011 9:26 AM by mjohnson RSS

Bug in FilePublisher.java in coherence-pushreplicationpattern-3.0.3.20019

769299 Explorer
Currently Being Moderated
Just getting started with Push Replication so thought I'd start with something simple. Decided to use the FilePublisher. It creates the *.log files of content in the correct directory OK, but the files are all empty and the publish cache never drains.

I get the following error on the server:

java.util.MissingFormatArgumentException: Format specifier 's'
     at java.util.Formatter.format(Formatter.java:2432)
     at java.util.Formatter.format(Formatter.java:2367)
     at java.lang.String.format(String.java:2769)
     at com.oracle.coherence.patterns.pushreplication.publishers.FilePublisher.publishBatch(FilePublisher.java:107)
     at com.oracle.coherence.patterns.pushreplication.providers.coherence.CoherencePublishingService.onPublish(CoherencePublishingService.java:1058)
     at com.oracle.coherence.patterns.pushreplication.providers.coherence.CoherencePublishingService$5.run(CoherencePublishingService.java:702)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:662)


At line 107 of the FilePublisher.java file, there is a String.format() call with a format string that requires four string arguments; the code only provides 3. I've taken a local copy of this file and updated the format string to just "%s, %s, %s\n" and it seems to work OK now. Cache items are now getting written to the *.log files correctly.

This is in the latest coherence-pushreplicationpattern-3.0.3.20019 source code.

Just bringing the above to your attention if it hasn't been logged already.

Cheers,

Steve

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points