[omniORB] RE: System Exception BAD_PARAMETER::InvalidServiceCtxtId (26)

TUser gev at terma.com
Tue Sep 18 09:26:00 BST 2007


Thanks for the reply, which showed us the way; An uninitialized object
containing an enumeration. Seems to work now.





Wernke zur Borg wrote:
> 
>> 
>> 
>> Using OmniOrb 4.0.3 (SLeS) we get a system exception, with 
>> minor code 26
>> (InvalidServiceCtxtId).
>> 
>> The IDL is shown below;
>> interface TCOhpServerClient
>> {
>>   TCOhpStatus getTcoCoeffUTC(in  TCOhpTDSsunTime referenceTime,
>>                              out TCOhpCorbaCoefficient coefficient);
>> };
>> 
>> The implementation is shown below;
>> 
>> TCOhpStatus TCOhpServer::getTcoCoeffUTC(const 
>> TCOhpTDSsunTime& refTime,
>>                                         TCOhpCorbaCoefficient& coeff)
>>   throw (CORBA::SystemException)
>> {
>>   // Local variables
>>   TCOhpStatus retVal = TCO_STATUS_OK;
>> 
>>   // Protect the Coefficient cache before reading any data
>>   pthread_mutex_lock(&m_mutex);
>>   if (true == m_coefCacheIf->isInCache(startTime))
>>   {
>>     // The data is already available in the cache.
>>     m_coefCacheIf->getCoeffs(startTime, coeffs, nrOfCoefficients);
>>   }
>>   else
>>   {
>>     retVal = TCO_STATUS_NO_COEFFS_AVAILABLE;
>>   }
>> 
>>   return retVal;
>> }
>> 
>> 
>> Following the return the exception is thrown.
>> 
>> We catch the exception in the client and print the minor 
>> code. The value is
>> 1096024090 (Decimal). Looking in the minorCode.h file, this 
>> maps to minor
>> code 26 (InvalidServiceCtxtId). The code should be a standard 
>> OMG minor code
>> for BAD_PARAM, but looking in the CORBA 3 specification we 
>> dont find this.
>> 
>> Questions are many;
>> 1. Why do we get this error?
>> 2. Do we interpret the error code correctly, i.e. is it 
>> really minor code 26
>> we see?
>> 3. What is a service context id?
>> 
>> Been wasting almost a week on this problem. We would be very 
>> thankful for
>> any help.
> 
> 
> Hi,
> 
> the code maps to OMNIORBMinorCode_26, which is MARSHAL_InvalidEnumValue.
> Do not mix up the OMNIORB minor codes with the OMG ones...
> 
> Perhaps you can also post the complete definition of your return code
> enum. Have you made sure that both sides use the same IDL? You may have
> added the value TCO_STATUS_NO_COEFFS_AVAILABLE to the enum but not
> recompiled the client side with the modified IDL.
> 
> Regards, Wernke
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> 
> 

-- 
View this message in context: http://www.nabble.com/System-Exception-BAD_PARAMETER%3A%3AInvalidServiceCtxtId-%2826%29-tf4473277.html#a12759428
Sent from the OmniORB - User mailing list archive at Nabble.com.




More information about the omniORB-list mailing list