From: Sharon L. <lu...@us...> - 2007-01-10 19:19:19
|
Your classpath is specifying a Xerces (XML Parser) jar file ( C:\jccdriver\xerces.jar) that I believe conflicts with the Xerces version used by the HTTP service. The HTTP service uses Xerces2-J 2.6.2 which is packaged with the HTTP service as a nested jar file within the STAFHTTP.jar file. When you register the HTTP service in the STAF.cfg file, please make sure that the the C:\jccdriver\xerces.jar file is not in the CLASSPATH. If you don't need this jar file in the classpath for other STAF services or other reasons, then change the classpath before starting STAFProc. If you do need this jar file in the classpath for other STAF services or other reasons, then you can override the classpath used when registering the HTTP service in the STAF.cfg file. For example: SERVICE Http LIBRARY JSTAF EXECUTE C:/STAF/http/STAFHTTP.jar OPTION JVMName=HTTP OPTION "J2=-cp C:/STAF/bin/JSTAF.jar" See section "4.4.2 JSTAF service proxy library" in the STAF User's Guide for more information on options when registering a service using the JSTAF service proxy library. Let us know if this resolves the problem. -------------------------------------------------------------- Sharon Lucas IBM Austin, lu...@us... (512) 838-8347 or Tieline 678-8347 Suja Viswesan/Silicon Valley/IBM@IBMUS Sent by: sta...@li... 01/10/2007 12:42 PM To st...@us... cc Subject [staf-users] Problem with HTTP service and STAX Hi I installed STAF 3.2.0.1, STAX 3.1.5 and HTTP 3.0.0 BEta 12 today. I ran my HTTP workload and it failed. Here is my job snippet. <testcase name="'http request'" mode="'strict'"> <sequence> <!-- ******************* EXTRACT LATEST FILEs *********************** --> <script> timerDuration = '24h' noOfTime = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20'] </script> <message>'Running WAS-XA workload'</message> <timer duration="timerDuration"> <paralleliterate var="number" in="noOfTime"> <loop> <testcase name="'http request'" mode="'strict'"> <sequence> <call function="'sendHttpRequest'">machine, 'http://9.30.28.150:9080/TellerServlet/TellerClient'</call> <stafcmd name="'Delay'"> <location>location</location> <service>'delay'</service> <request>'delay 5000'</request> </stafcmd> </sequence> </testcase> </loop> </paralleliterate> </timer> <!--******************* END COMPILE JAVA FILES *********************** --> </sequence> </testcase> sendHttpRequest function doesthe following: <function name="sendHttpRequest"> <function-list-args> <function-required-arg name="location">location</function-required-arg> <function-required-arg name="url">url</function-required-arg> </function-list-args> <sequence> <stafcmd name="'http'"> <location>location</location> <service>'http'</service> <request>'REQUEST METHOD get URL %s'%(url)</request> </stafcmd> <script> myresult = [-1,'REQUEST FAILED'] if RC == STAFRC.Ok: statusCode = STAFResult['statusCode'] if statusCode == '200': content = STAFResult['content'] from java.lang import String strcontent = String(content) myresult = [strcontent.indexOf('transfer'),content]; </script> <if expr="myresult[0] == -1"> <sequence> <tcstatus result="'fail'">'%s; RC=%s, Result=%s' % (myresult[1], myresult[0], myresult[1])</tcstatus> <log>STAFResult</log> <message>STAFResult</message> </sequence> <else> <tcstatus result="'pass'"/> </else> </if> </sequence> </function> Here is the STAF.cfg I have # Turn on tracing of internal errors and deprecated options trace enable tracepoints "error deprecated" # Enable TCP/IP connections interface tcp library STAFTCP # Set default local trust trust machine local://local level 5 # Default Service Loader Service serviceloader library STAFDSLS SERVICE STAX LIBRARY JSTAF EXECUTE C:/STAF/stax/STAX.jar OPTION J2=-Xmx1024m SERVICE EVENT LIBRARY JSTAF EXECUTE \ C:/STAF/stax/STAFEvent.jar #SERVICE EMAIL LIBRARY JSTAF EXECUTE \ #C:/STAF/email/STAFEmail.jar \ #PARMS MAILSERVER ap.relay.ibm.com SERVICE Http LIBRARY JSTAF EXECUTE C:/STAF/http/STAFHTTP.jar SET MAXQUEUESIZE 10000 TRUST DEFAULT LEVEL 5 The error is 20070110-09:06:12 java.lang.NoSuchMethodError: org.apache.xerces.parsers.DOMParser.<init>(Lorg/apache/xerces/xni/parser/XMLParserConfiguration;)V at org.cyberneko.html.parsers.DOMParser.<init>(DOMParser.java:42) at com.ibm.staf.service.http.html.HTMLParser.<init>(HTMLParser.java:56) at com.ibm.staf.service.http.WebSession.<init>(WebSession.java:134) at com.ibm.staf.service.http.HTTP.handleNonSessionMethod(HTTP.java:1306) at com.ibm.staf.service.http.HTTP.handleMethod(HTTP.java:1286) at com.ibm.staf.service.http.HTTP.acceptRequest(HTTP.java:240) at com.ibm.staf.service.STAFServiceHelper.callService(STAFServiceHelper.java:349) My CLASSPATH C:\STAF\bin\JSTAF.jar;C:\STAF\samples\demo\STAFDemo.jar;.;C:\jccdriver\CMVC.jar; C:\jccdriver\xerces.jar;C:\jcc_home\jcc\lib\db2jccharness.jar;C:\jcc_home\jcc\cl asses;c:\jcc_home\jcc\sqlj.zip;C:\jcc_home\jcc\lib\db2jcc.jar;C:\jcc_home\jcc\li b\db2jcc_license_cisuz.jar;C:\jccdriver\logging-log4j-1.2.12\dist\lib\log4j-1.2. 12.jar;C:\SQLLIB\java\db2java.zip;C:\SQLLIB\java\db2jcc.jar;C:\SQLLIB\java\sqlj. zip;C:\SQLLIB\java\db2jcc_license_cu.jar;C:\SQLLIB\bin;C:\SQLLIB\java\common.jar Thanks Suja -------------------------------------------------------------------- Suja Viswesan IBM Silicon Valley Lab 555 Bailey Avenue - B345, San Jose, California 95141, USA Internet: su...@us... Phone: (408) 463 2850 - T/L 543-2850 -------------------------------------------------------------------- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ staf-users mailing list sta...@li... https://lists.sourceforge.net/lists/listinfo/staf-users |