From Luk on udig-users:
Jody tested and found the following:
So we got two issues here:
1) The EPSG.zip did not get unpacked; and thus EPSG definitions were not available to PostGIS
2) If the Layer and FeatureSource CoordianteReferenceSystems do not match...
- The CRS is forced in there using ForceCoordinateSystemFeatureResults(featureSource.getFeatures(), layer.getCRS());
- Which is in turn wrapped up in DataUtilities.source(collection)
- which calls next() without hasNext() to sort out the FeatureType