• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB EntityManager results in NullPointerException  RSS feed

Ibragim Gapuraev
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an error that I cannot logically understand. I am implementing RSS processing app. The logic is that user takes link of some RSS feed and adds to database. If the feed already exist in database, it takes the id of feed and adds it to subscriptions of the user. Here is the code:

However, if user added a feed, another user cannot add it and there is the error:

I just dont see why would it fail. One of my opinion is that possibly, EntityManager somehow is null. But, in first part of if statement it works.

I tried to use EntityManager find method, it resulted same error. So, definitely, EntityManager is somehow null in second part of if statement.

Thanks for all the help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!