DSSetServerParams problem (dsapi w/ c++)
Posted: Sun Jul 10, 2011 3:33 am
edit: corrected sample code to show actual DSSetServerParams( ) I was using.
I'm running datastage + client on a virtual machine: ds 8.5 fixpack 1, Windows Server 2008 (64 bit).
Summary: Using C++ I can call connect with DSGetProjectList( ) provided I don't use DSSetServerParams( ); I'd very much like to make it work with DSSetServerParams( ) and would welcome any trouble shooting insights you can suggest.
Thanks, John
details
I'm compiling for Win32.
When I run the C++ code below, I'm getting this:
And this shows up in the debug console: "exception: First-chance exception at 0x75dcb727 in ds_test.exe: Microsoft C++ exception: javax::security::auth::login::LoginException at memory location 0x0015f2f4." I found an 8.5 fixpack 1 reference or two to "LoginException" on ibm's support portal, and two here on dsxchange (one about ulimits, the other about credentials; I'm pretty sure this isn't a credential issue since I can connect to datastage well enough: see "sanity check" after the code sample below).
Oddly enough, when I comment out the DSSetServerParams( ) call, it connects just fine (with no noticeable pauses):
And this message turns up in the debug console: "first-chance exception at 0x75dcb727 in ds_test.exe: 0x000006BA: The RPC server is unavailable." - just fyi, doesn't seem to hurt anything since it did bring back the project list.
code sample
sanity check
And just to make sure I'm typing my userid + servername properly, dsjob works well enough:
I'm running datastage + client on a virtual machine: ds 8.5 fixpack 1, Windows Server 2008 (64 bit).
Summary: Using C++ I can call connect with DSGetProjectList( ) provided I don't use DSSetServerParams( ); I'd very much like to make it work with DSSetServerParams( ) and would welcome any trouble shooting insights you can suggest.
Thanks, John
details
I'm compiling for Win32.
When I run the C++ code below, I'm getting this:
Code: Select all
C:>ds_test.exe
Hello from ds85_test
(... 6 second pause ...)
after get project list: dserr=81011
ERROR: get project list failed.
Oddly enough, when I comment out the DSSetServerParams( ) call, it connects just fine (with no noticeable pauses):
Code: Select all
C:>ds_test.exe
Hello from ds85_test
after get project list: dserr=0
a=ANALYZERPROJECT
a=Develop
a=dstage1
a=Test
Done
code sample
Code: Select all
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <dsapi.h>
int _tmain(int argc, _TCHAR* argv[])
{
char *a;
int dserr;
printf("Hello from ds85_test\n");
char domain[256] = "infoserver1:9080";
DSSetServerParams( domain, "infoserver1", "isadmin", "isadmin" );
a = DSGetProjectList( );
dserr = DSGetLastError( );
printf("after get project list: dserr=%d\n", dserr );
if( dserr != DSJE_NOERROR ) {
printf("ERROR: get project list failed.\n");
return 1;
}
while( *a ) {
printf("a=%s\n", a);
a += 1 + strlen(a);
}
printf("Done\n");
return 0;
}
And just to make sure I'm typing my userid + servername properly, dsjob works well enough:
Code: Select all
C:\IBM\InformationServer\Server\DSEngine\bin>dsjob -domain infoserver1:9080 -user isadmin -password isadmin -server infoserver1 -lprojects
ANALYZERPROJECT
Develop
dstage1
Test
Status code = 0
C:\IBM\InformationServer\Server\DSEngine\bin>dsjob -lprojects
ANALYZERPROJECT
Develop
dstage1
Test
Status code = 0