[ace-users] ACE/TAO: Reasons for exception in create_policy()?

Johnny Willemsen jwillemsen at remedy.nl
Tue Sep 4 07:11:40 CDT 2007


Hi,

Have you tried TAO\orbsvcs\tests\Security\Secure_Invocation? You need the
svc.conf file in that directory to load the SSLIOP library which then
results in the registering of the policy factory

Regards,

Johnny Willemsen
Remedy IT
Postbus 101
2650 AC  Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl  

*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl ***
*** Commercial service and support for ACE/TAO/CIAO             ***
*** See http://www.theaceorb.nl/en/support.html                 ***

> ACE VERSION: 5.6
> 
> HOST MACHINE and OPERATING SYSTEM:
>     Windows XP Version 5.1 SP2, Winsock 3.10.0.103
> 
> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
>     The same target.
> 
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
>     Microsoft "Visual Studio 2003" 7.1.6030, SP1
> 
> THE $ACE_ROOT/ace/config.h FILE has contents:
>   Just two lines:
>     #define ACE_HAS_STANDARD_CPP_LIBRARY 1
>     #include "ace/config-win32.h"
> 
> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE
>     is not existant. I use the VS project file to build ACE.
> 
> CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
>     is not existant. There is only one "default.rel" file.
> 
> AREA/CLASS/EXAMPLE AFFECTED:
>     This codeline is affected:
>     CORBA::Policy_var policy = 
> orb->create_policy(Security::SecQOPPolicy,
>                                                   no_protection);
> 
> DOES THE PROBLEM AFFECT:
>     COMPILATION? No
>     LINKING? No
>     EXECUTION? Yes.
> 
> SYNOPSIS:
>     In the function create_policy() (see above) an exception 
> is thrown:
>     "IDL:omg.org/CORBA/PolicyError:1.0"
> 
> DESCRIPTION:
>     I tried this policies for the first time. My example code is just
>     a copy of the FAQ at: http://www.theaceorb.com/faq/index.html#141
>     It compiles fine but throws the mentioned exception.
>     After debugging I found that it fails in this code in the file
>     "policyfactory_registry.cpp" (create_policy()):
>     ...
>     if (this->factories_.find (type, policy_factory) == -1) {
>         // Policy factory corresponding to given policy type does not
>         // exist in policy factory map.
>         throw ::CORBA::PolicyError (CORBA::BAD_POLICY_TYPE);
>     }
>     //    ^ this throw throws and so my app fails.
>     ...
> 
> REPEAT BY: Just execute the testprogram. The failing code is:
>     ...
>     ACE_TRY {
> 	CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
> 	ACE_TRY_CHECK;
> 	CORBA::Policy_var policy = 
> orb->create_policy(Security::SecQOPPolicy,
> 						      no_protection);
> 	CORBA::PolicyList policy_list(1);
> 	policy_list.length(1);
> 	policy_list[0] = CORBA::Policy::_duplicate(policy.in());
> 	ACE_TRY_CHECK;
> 	CORBA::Object_var obj;
>     ...
> 
> SAMPLE FIX/WORKAROUND:
>     Not available.
> 
> 
> Nice Greetings and thank you for suggestions,
> Michael Herrmann
> 
> 
> -- 
> Michael Herrmann
> TietoEnator Deutschland GmbH
> System Ingenieur
> 
> R&D Central Europe
> Alt-Moabit 91a
> D-10559 Berlin-AG 
> Tel. 030 - 390722-0 (zeitweise: 030-386-58708)
> mailto: michael.j.herrmann at tietoenator.com
> mailto: michael.herrmann.ext at nsn.com
> 
> www.tietoenator.de
> TietoEnator Deutschland GmbH, Düsseldorfer Straße 40, 65760 Eschborn
> Geschäftsführung: Patricia Emmel, Michael Graben, Jürgen 
> Hatzipantelis (Vorsitzender), Walter Hübler, Martti Paajanen.
> Sitz der Gesellschaft: Eschborn, Amtsgericht Frankfurt/Main HRB 75570
> 
> Please note: The information contained in this message may be 
> legally privileged and confidential and protected from 
> disclosure. If the reader of this message is not the intended 
> recipient, you are hereby notified that any unauthorised use, 
> distribution or copying of this communication is strictly 
> prohibited. If you have received this communication in error, 
> please notify us immediately by replying to the message and 
> deleting it from your computer. Thank You.
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
> 



More information about the Ace-users mailing list