DeltaXML Support Forums
| new topic post reply | DeltaXML Products and Applications -> DeltaXML Core -> NonMatchingPCDataCombineException |
NonMatchingPCDataCombineException | ||||
Posted:
08-July-2008 20:00 Hi I was able to create a delta file without problems but when trying to recombine the delta with one of the original files to get a third one I receive the following exception:
Here are the XML files a.xml
b.xml
Any idea? | ||||
Recombined Deltas must be 'raw' | ||||
Posted:
09-July-2008 12:11 Hello Giovani, Without seeing the delta input to the recombine operation it is hard to give a definitive answer to this problem. However, I can make an educated guess: there is a good chance that your delta input to the combine operation has been modified in some way. The recombine operation requires 'raw' delta files, and in particular you should not: * Indent the output delta ("Indent=yes" on the command-line) * Remove whitespace with the NormalizeSpace filter prior to comparison (add "Preserve Whitespace=true" to the command-line tools). We added these options to various comparison pipelines because they provide flexibility for users doing various types of comparison operation and post-processing, however they do not play well with the recombination operations. If you are familar with the UNIX command-line tools diff and patch, this would be similar to reformatting a diff output file and then expecting patch to operate on it. We document this, for the command-line tools in the release and online at: http://www.deltaxml.com/core/5.0/docs/command-processor.html#commands From the exception stack-trace I see that you are using the API. You may have noticed that there isn't a PipelinedCombiner as pipelining the combine operation doesn't make sense (there are no useful input or output filters that can be applied). In general if you are using the com.deltaxml.api.XMLCombiner it makes sense to also use the comparator from the same package, the com.deltaxml.api.XMLComparator. I think we need to make our documentation clearer on these aspects of the Combiner API usage (similar to the command-line documentation) and we will do this for our 5.1 release. Thanks for the feedback and apologies for any confusion this has caused. Nigel | ||||
![]() | ||||
Posted:
09-July-2008 13:44 Hello thank you for the reply. My delta file has not been modified by any other process. Not sure what is wrong. I also would like to say that I followed the same steps in the tutorial, using the same XML files and the same error happens. Below is the java code and delta file. I keep receiving the same exception. I appreciate your help. Java Code:
Delta File | ||||
![]() | ||||
Posted:
09-July-2008 13:46 Not sure why the delta didn't display here. Trying to post it again (removing now the xml version tag). | ||||
![]() | ||||
Posted:
09-July-2008 13:47 Quoting the delta. Here you go.
| ||||
Delta files are asymmetric | ||||
Posted:
09-July-2008 15:17 Hi Giovani, Thanks for the code, I think I've finally spotted the problem: A delta file is not symmetric; the combine operation has a direction which must correspond to the direction (order of input files/streams) in the comparison operation. In summary: a.xml compare b.xml -> ab.xml (ab.xml is the delta) a.xml combine ab.xml -> b.xml b.xml reverse-combine ab.xml -> a.xml The reverse combination is controlled via a feature setting: http://www.deltaxml.com/core/5.0/docs/api/com/deltaxml/api/package-summary.html#features I took your code and made it work on my system. As well as changing the parameters to the combine I also had to: * change some of the filepaths to avoid c: (I was using Unix rather than Windows) * Change one of the StreamResults - for reasons I don't completely understand yet. Here is the code and the command-lines used to compile and run:
Here are the command-lines I used on my Macbook - on Windows they will be similar but you may need to replace : with ; in the classpaths. I copied all of the .jar file from our 5.0 release into this test directory.
| ||||
| new topic post reply |
To find out about new replies to this post as they occur please subscribe to one of these feeds: | ![]() ![]() | moderate |
NonMatchingPCDataCombineException
