OnDemand User Group
Support Forums => OD/WEK & JAVA API => Topic started by: mwan on April 16, 2007, 09:44:24 AM
-
Hello,
I'm having trouble connecting to an OnDemand server located on my network through TCP/IP. I currently get the following exception while running the sample code from the documentation:
com.ibm.edms.od.ODException: The server failed while attempting to convert data
at com.ibm.edms.od.ODServer.logon(ODServer.java:333)
This is my code:
odServer = new ODServer( );
odServer.initialize( argv[3], "odtest.Main.java", 5348 );
odServer.setConnectType(ODConstant.CONNECT_TYPE_TCPIP);
odServer.setServ er("odsrv1");
odServer.setPort(1445);
My arswww.ini file is defined as:
[@SRV@_odsrv1]
HOST=odsrv1
PROTOCOL=0
PORT=1445
Is the code having trouble reading from the specified arswww.ini file? I seem to get the same error when I type gibberish into the setServer() function.
Thanks.
-
The error message "The server failed while attempting to convert data" implies (at least, to me) that a document transform/translation failed. Are you converting the document stored in OnDemand into another format? Is that portion of the code working properly?
-JD.
-
My application now works but I still have no idea what went wrong. The error message appears when I call the logon() function, so I don't think that there's a document transform going on at that time.
I tried running the program through the command prompt and it works! The program still will not run through NetBeans however.
Thanks everyone for their time.
-
This sounds like a codepage conflict to me. Try removing the codepage parameter in the odServer.initialize() call. Also verify the codepage setting in the arswww.ini file.