Home Help Center

Problem with User defined exception

aeugenaeugen Member Eugeny RoOrganization: NoneProject: Client-server for remote face recognition SDK
Application deployed to IceGrid.
My Ice version 3.6.1


Can not get user defined exception, every time get Ice.UnknownUserException on java client part.

My ice description:
[FONT=courier new][["java:package:ru.blablabla.frsdk"]]

module FaceProcessorModule
{
..................................
exception FaceProcessorException
{
string reason = "Unknown Exception";
};

............................
interface FaceProcessor
{
............................
// Just for test
void raiseException(string pMessage) throws FaceProcessorException;
};
};[/FONT]

C++ implementation of raiseExceptoin :

.......................
void FaceProcessorModule::FaceProcessorI::raiseExceptio n(const ::std::string& pMessage, const Ice::Current&)
{
std::cout << "FaceProcessorModule: FaceProcessorI: throw an Exception" << std::endl;
FaceProcessorException fpe;
fpe.reason = pMessage;
throw fpe;
}
............................

P.S. Ice Examples with user defined exceptions works fine.


Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Did you set the Ice.Package.FaceProcessorModule or Ice.Default.Package property to [FONT=courier new, courier, monospace]ru.blablabla.frsdk[/FONT][FONT=arial, helvetica, sans-serif] in the configuration of your Java client? If not, this is most likely the issue, the Java runtime can't find the user exception Java class to instantiate. See [/FONT]https://doc.zeroc.com/display/Ice36/Customizing+the+Java+Mapping#CustomizingtheJavaMapping-JavaPackages for more information.

    Cheers,
    Benoit.
  • aeugenaeugen Member Eugeny RoOrganization: NoneProject: Client-server for remote face recognition SDK
    benoit wrote: »
    ....

    Great thanks!!! Now it works! :)
Sign In or Register to comment.