If you are getting plenty of flowers but nothing produces, then it is most likely due to poor pollination. Hand pollination often helps. These articles will help you with attracting more pollinators:
If you are not seeing flowers, then you likely have too much nitrogen in the soil and should offset this by adding more phosphorus. This can be achieved by using a phosphorus-rich fertilizer or by adding bone meal.