Buying items from the NPC market is always a gamble. They could be on or in entities to IA players or to players they will never give access. All that happens is you own the items but will never get them.
To my knowledge though they will never be in a black hole or on a sun, but can very well be in a ship near one of them.
Well it would seem you just wasted credits on it. As if it is in a black hole or a sun you cannot get to it. Unfortunately that is the risk you take on the in-game market. Which is why most use the CPM market page.
Commander Pepi Deto
Instructor, Ichigo Military Academy
Falleen Protection Forces Task Force 1
Trade Federation Citizen L1
if the items are physically located on a black hole or sun (or the ship they are located on is) then it is due to a bug or a limitation in the code that moves these entities off the original sun/bh. Admins can occasionally teleport the container off of these obstacles if they are actually on the same square.