I am using geotools to generate some images based on the shapefile data, it works well until I tried to add labels for the line features: the labels are rendred even there is no features in the images.

As shown, the result is not what I expected, the labels are rendered without attached with the feature.