Make sure to catch all the exceptions thrown by a reasoner when doing a subClassOf or a superClassOf method call. It may sometime lead to exceptions, for example, with the Pellet reasoner, if you use the subClassOf method on owl:Thing, then you will get exceptions from Pellet.