Mailingliste - Einträge 2006


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] exception when runnint jython server script.. Please help !


  • Subject: Re: [qftestJUI] exception when runnint jython server script.. Please help !
  • From: Karlheinz Kellerer <Karlheinz.Kellerer@?.de>
  • Date: 07 Feb 2006 13:12:55 +0100

Hi Bill,

honestly, I've no idea what might cause the exception. 

Have you tried executing your script by using an "Execute Shell Command" node
(followed by a "Wait for process to terminate" node) instead of a server
script. Just a proposal...

Best regards, 
    Karl 

Bill Deegan <bill.deegan@?.com> writes:

> I have a Server Script node with the following code in it, When I run it I get
> the stacktrace at the bottom. Any help would be appreciated in figuring out
> what the issue is.
> Note that after I get the stacktrace and stop the test, I cannot remove the
> directory tree it's being unzipped in as some file is still held open by qfs,
> and I need to shutdown qfs to delete it.
> 
> Thanks,
> Bill
> 
> 
> import sys
> import zipfile
> import os
> import os.path
> 
> zipsource=rc.lookup("source")
> #zipsource='/workspace/bdeegan/myrep/packages/planAhead-JPA.82.0-lnx24/prep/hdi/planAheadJPA.82.0/testcases/PlanAhead_Tutorial.zip'
> zipdest=rc.lookup("destDir")
> #zipdest='/home/bdeegan/tmp/'
> print "Source   :",zipsource
> print "Dest     :",zipdest
> 
> if not zipdest.endswith(':') and not os.path.exists(zipdest):
>      os.mkdirs(zipdest)
> 
> 
> zf = zipfile.ZipFile(zipsource)
> dirs = []
> baseDir = None
> for name in zf.namelist():
>      if name.endswith('/'):
>          dirs.append(name)
>          if not baseDir:
>              baseDir = name
>          elif (len(baseDir) > len(name)):
>              baseDir = name
> 
> dirs.sort()
> 
> #print "Basedir->",baseDir
> #os.removedirs(baseDir)
> 
> num_files = len(zf.namelist())
> percent   = 1/num_files
> for dir in dirs:
>      curdir = os.path.join(zipdest, dir)
>      print "DIR->",curdir
>      os.mkdir(curdir)
> 
> divisions = 100 / 10
> perc = int(num_files / divisions)
> 
> # extract files to directory structure
> for name in zf.namelist():
> 
>      print "Extracting %s" % name
> 
>      if not name.endswith('/'):
>          outfile = open(os.path.join(zipdest, name), 'wb')
>          outfile.write(zf.read(name))
>          outfile.flush()
>          outfile.close()
> 
> 
> 
> When I run this to extract my testcase zip file, I get the following errors:
> de.qfs.apps.qftest.run.ScriptException: The script failed with the following
> message:
> Traceback (innermost last):
>    File "<string>", line 1, in ?
>    File
> "/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/qftestJUI.py",
> line 68, in runscript
>    File
> "/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/qfcommon.py",
> line 305, in runscript
>    File "<string>", line 50, in ?
>    File
> "/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zipfile.py",
> line 326, in read
>    File
> "/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zlib.py", line
> 82, in decompress
>    File
> "/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zlib.py", line
> 110, in _get_inflate_data
> java.lang.IllegalAccessException: Class org.python.core.PyReflectedFunction can
> not access a member of class java.lang.AbstractStringBuilder with modifiers
> "public"
> 	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
> 	at java.lang.reflect.Method.invoke(Method.java:578)
> 	at
> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
> 	at org.python.core.PyMethod.__call__(PyMethod.java:96)
> 	at org.python.core.PyObject.__call__(PyObject.java:270)
> 	at org.python.core.PyInstance.invoke(PyInstance.java:261)
> 	at
> zlib$py._get_inflate_data$15(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zlib.py:110)
> 	at
> zlib$py.call_function(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zlib.py)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:208)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:268)
> 	at org.python.core.PyFunction.__call__(PyFunction.java:172)
> 	at
> zlib$py.decompress$12(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zlib.py:82)
> 	at
> zlib$py.call_function(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zlib.py)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:208)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:280)
> 	at org.python.core.PyFunction.__call__(PyFunction.java:175)
> 	at org.python.core.PyInstance.invoke(PyInstance.java:253)
> 	at
> zipfile$py.read$15(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zipfile.py:326)
> 	at
> zipfile$py.call_function(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/zipfile.py)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:208)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:280)
> 	at org.python.core.PyFunction.__call__(PyFunction.java:175)
> 	at org.python.core.PyInstance.invoke(PyInstance.java:253)
> 	at org.python.pycode._pyx2.f$0(<string>:50)
> 	at org.python.pycode._pyx2.call_function(<string>)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:208)
> 	at org.python.core.PyCode.call(PyCode.java:14)
> 	at org.python.core.Py.runCode(Py.java:1135)
> 	at org.python.core.Py.exec(Py.java:1157)
> 	at
> qfcommon$py.runscript$20(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/qfcommon.py:305)
> 	at
> qfcommon$py.call_function(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/qfcommon.py)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:208)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:405)
> 	at org.python.core.PyFunction.__call__(PyFunction.java:184)
> 	at org.python.core.PyObject.__call__(PyObject.java:248)
> 	at org.python.core.PyObject.invoke(PyObject.java:2016)
> 	at
> qftestJUI$py.runscript$3(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/qftestJUI.py:68)
> 	at
> qftestJUI$py.call_function(/group/hd/staff/bdeegan/QFS/qftest/qftestJUI-1.08.5/jython/Lib/qftestJUI.py)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:208)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:405)
> 	at org.python.core.PyFunction.__call__(PyFunction.java:184)
> 	at org.python.core.PyObject.__call__(PyObject.java:248)
> 	at org.python.core.PyObject.invoke(PyObject.java:2016)
> 	at org.python.pycode._pyx1.f$0(<string>:1)
> 	at org.python.pycode._pyx1.call_function(<string>)
> 	at org.python.core.PyTableCode.call(PyTableCode.java:208)
> 	at org.python.core.PyCode.call(PyCode.java:14)
> 	at org.python.core.Py.runCode(Py.java:1135)
> 	at org.python.core.Py.exec(Py.java:1157)
> 	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:137)
> 	at de.qfs.apps.qftest.script.JythonEngine.exec(JythonEngine.java:173)
> 	at com.ibm.bsf.BSFManager.exec(BSFManager.java:480)
> 	at de.qfs.apps.qftest.run.RMIRunContext.runScript(RMIRunContext.java:873)
> 	at de.qfs.apps.qftest.step.ServerScriptStep.exec(ServerScriptStep.java:113)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.call(AbstractRunContext.java:936)
> 	at de.qfs.apps.qftest.step.BasicSequence.exec(BasicSequence.java:674)
> 	at de.qfs.apps.qftest.step.Procedure.exec(Procedure.java:181)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.call(AbstractRunContext.java:936)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.callProcedure(AbstractRunContext.java:1478)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.callProcedure(AbstractRunContext.java:1387)
> 	at de.qfs.apps.qftest.step.ProcedureCall.exec(ProcedureCall.java:434)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.call(AbstractRunContext.java:936)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.run(AbstractRunContext.java:687)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext$Runner.run(AbstractRunContext.java:4978)
> 
> java.lang.IllegalAccessException: java.lang.IllegalAccessException: Class
> org.python.core.PyReflectedFunction can not access a member of class
> java.lang.AbstractStringBuilder with modifiers "public"
> 
> 	at de.qfs.apps.qftest.run.RMIRunContext.runScript(RMIRunContext.java:899)
> 	at de.qfs.apps.qftest.step.ServerScriptStep.exec(ServerScriptStep.java:113)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.call(AbstractRunContext.java:936)
> 	at de.qfs.apps.qftest.step.BasicSequence.exec(BasicSequence.java:674)
> 	at de.qfs.apps.qftest.step.Procedure.exec(Procedure.java:181)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.call(AbstractRunContext.java:936)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.callProcedure(AbstractRunContext.java:1478)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.callProcedure(AbstractRunContext.java:1387)
> 	at de.qfs.apps.qftest.step.ProcedureCall.exec(ProcedureCall.java:434)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.call(AbstractRunContext.java:936)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext.run(AbstractRunContext.java:687)
> 	at
> de.qfs.apps.qftest.run.AbstractRunContext$Runner.run(AbstractRunContext.java:4978)
> 
> 
> _______________________________________________
> qftestJUI-list mailing list
> qftestJUI-list@?.de
> http://www.qfs.de/mailman/listinfo/qftestjui-list

-- 
Karlheinz Kellerer                     Karlheinz.Kellerer@?.de
Quality First Software GmbH                    http://www.qfs.de
Tulpenstr. 41                               Tel: +49 8171 919877
DE-82538 Geretsried                         Fax: +49 8171 919876


Videos Downloads Dokumentation Kaufen Gratis Testen