Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unreachable catch block  RSS feed

 
Santosh Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i am having an entity bean which is bean managed.
while deploying the application archieve in WAS 4.0, it throws an error saying unreachable catch block in EJBREMOTEBEAN***
Thx. in advance
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. And you think there is a problem?
 
gautam shah
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Santosh Gupta:
hi
i am having an entity bean which is bean managed.
while deploying the application archieve in WAS 4.0, it throws an error saying unreachable catch block in EJBREMOTEBEAN***
Thx. in advance

just try to arrange your catch blocks in ejbremotebean in a way that exception belongs to a super class should comes after one of its subclass exception. eg. if there are four exception which u want to catch then either arrange them in proper way or remove all those catch blocks and replace with a single catch block which must be able to catch any kind of exception.
try {
some statements
}catch( ex1 e1) {}
catch( ex2 e2) {}
catch( ex3 e3) {}
catch( ex4 e4) {}
here either there should be no inheritence relationship in ex1 to ex4 classes or if there one exists then arrange them in the catch blocks in a order so subclasses should comes first then their super classes.
i think so.....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!