This is due to the change in GEOS-3235, the map of already used field names must not be a field, wfs output formats are supposed to be stateless
ShapeZipOutputFormat cannot handle long shapefile incompatible schemas
Mauro, the plan of attack for this one is to turn the map into a variable and have it reset for each generated shapefile. Think of the multi shapefile output case, what fields are stored in one shapefile is of no concern for the next one.
Also, we should keep the first truncated name as is (truncated, no postfix attached) and start adding numbers only when the subsequent duplicates (if any) are found.
The included patch should solve the issue (please, give it a review). In short:
Ah, thank you. I'll merge it in the larger work I'm doing (solving another issue at the same time, GEOS-3381)
Hopefully fixed on 1.7.x and trunk.
I gave the nightly build a kick so you can grab today's binary and it should contain the fix already, let me know if this works for you. Between this issue and the other one I had to rework the code more than I would have liked to.