• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

exception over RMI

 
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 have problem with exceptionhandling over RMI in VAJ 5.3.3.
I'm throwing an exception called TestException on the serverside, but on the clientside I can only catch a general Exception, even though I get the message:
java.lang.Exception: se.fsp.bet.exception.TestException:
Somewhere in RMI my TestException has been encapsulated or what ??
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your remove interface declare that it throws a "TestException"?
Are you getting a compile-time or runtime error?
-t
 
Thembile Mzantsi
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I meant "Remote Interface"
 
Johan_Gustafsson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thanks for your quick reply !
Yes my Remote Interface declares that it throws TestException. I'm getting a runtime error in that sense that I throw TestException on the serverside but when i catch it in the generated server stub on the clientside it catches a general Exception instead of TestException. The generated stub code looks something like this:
try {
...........
} catch (java.lang.RuntimeException e) {
throw e;
} catch (java.rmi.RemoteException e) {
throw e;
} catch (se.fsp.bet.exception.TestException)
throw e;
} catch (java.lang.Exception e) {
throw new java.rmi.UnexpectedException("undeclared checked exception", e); ;
}
 
I'm not sure if I approve of this interruption. But this tiny ad checks out:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic