Hi,
I want to programmatically generate some export properties similar to this in my C++ UDOP:
export properties
For this, I'm trying to define a STRINGLIST stream property.
My code looks something like this:
dlist<string> topics;
topics.push_back("AA");
topics.push_back("BB");
StreamPropertyCollection spc;
StreamProperty* sp= new StreamProperty("topics", ProfileManagerHelper::STRINGLIST,topics);
spc.push_back(sp);
opc.addStreamPropertyCollection(0, spc);
However, this does not seem to work and I'm getting the following errors:
07 Feb 2011 16:37:17.989 6208 ERROR dpspe M
UDOP_TSAADispatcher.cpp:setupTopics:68
- failed to associate a property collection '0 properties. ' to a stream produced by this operator: Type mismatch between property type and return argument for value; propertyType is: stringlist
07 Feb 2011 16:37:17.989 6208 ERROR dpspe M
DpsPE.cpp:process:496
- Received exception during PE processing... Exception: Type mismatch between property type and return argument for value; propertyType is: stringlist
07 Feb 2011 16:37:18.021 6208 ERROR PEC M
PECServiceImpl.cpp:starter:487
P73 - peid=73. Uncaught Distillery Exception: 'void SPC::StreamProperty::setValue(const T&) with T = dlist<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >' [/home/streamsadmin/InfoSphereStreams/include/SAM/StreamProperty.h:156] with msg: Type mismatch between property type and return argument for value; propertyType is: stringlist
So it's not accepting my dlist<string> for a STRINGLIST property.
I've also tried to pass a pointer to topics and it gives me the same error.
Is there a way to perform this and set a property with several values?
Thanks
Eric
Answer by EricThiebaut-George (1) | Feb 07, 2011 at 11:57 AM
I solved my own problem ;-).
I looked at ProfileManagerHelper.h and noticed that I had to replace dlist by vector.
All working now.
Eric
TextExtract] CDIST0863E Expected Input to a be a list 5 Answers
Do I need to implement the state handler for stateless operators to support consistent regions? 1 Answer
Cannot start a streams domain using a non-login user 1 Answer
Pass config placement:host("") as a parameter 2 Answers
How to write data from a list to a database using ODBCAppend 2 Answers