• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Unreachable catch block

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. And you think there is a problem?
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.....
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic