Forum Discussion

_ivanovich_'s avatar
_ivanovich_
Frequent Contributor
10 years ago

Read Excel file with Groovy code works with SOAPUI free version but not with the Ready API

Hi,

i downloaded the same jars files in Soapui free V 5.2.1 and Ready API 1.4.0. with licence.

i have a groovy to read excel file, it works with the free version in win7 but not with the pro version with win8.

after hours and hours, i did not figre out the problem with Ready API.

 

List of jars in Ready API/bin/ext

commons-codec-1.9

commons-logging-1.1.3

dom4j-1.6

junit-4.12

log4j-1.2.17

poi-3.5-FINAL

poi-3.7

poi-3.13-20150929

poi-examples-3.13-20150929

poi-excelant-3.13-20150929

poi-ooxml-3.13-20150929

poi-ooxml-schemas-3.10-FINAL

poi-ooxml-schemas-3.13-20150929

poi-scratchpad-3.13-20150929

xmlbeans-2.6.0

 

I have this error:

java.lang.NoClassDefFoundError:org/openxmlformats/schemas/spreadsheetml/x2006/main/CETxtensionList

 

 

Any help please, thank you

  • WirtRo48's avatar
    WirtRo48
    Occasional Contributor

    I faced the same problem some weeks ago. I solved it with copying the "ooxml-schemas-1.1.jar" file into the lib-directory directly under the ReadyAPI installation. Restart ReadyAPI and my code for reading/writing excel files was working again.

     

    • _ivanovich_'s avatar
      _ivanovich_
      Frequent Contributor

      HI,

      for now i use a simple txt file instead of Excel.

      i tried to add the jar file "ooxml-schemas-1.1.jar" and restarted, i still have the same problem.

       

      Thank you

       

      • nmrao's avatar
        nmrao
        Icon for Champion Level 2 rankChampion Level 2
        Sorry to get back late, _ivanovich_. That is strange. Did you report the issue with support as suggested by TanyaYatskovska.
        At least good that you proceeded with txt file which you may be able to open excel if needed.
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2

    I believe that you should be able to access the excel file in ReadyAPI out-of-the-box. i.e., you should be able to run the data driven tests easily than to the open source edition.

    Please see documentaion.

    http://readyapi.smartbear.com/structure/sources/excel/introduction

     

    So, the libraries must already be available in its lib directory. May not required to copy them under ReadyAPI-<version>/bin/ext directory. They could even conflicting. Remove them and try above documentation. Or try the groovy script that you had in Open Source edition directly if you want and that should be working without additional libraries.

    • _ivanovich_'s avatar
      _ivanovich_
      Frequent Contributor

      Thank you Rao,

      i removed all jars i added and re-try the groovy code.

      i have the same error

       

       

      • nmrao's avatar
        nmrao
        Icon for Champion Level 2 rankChampion Level 2
        May be you can add full stacktrace from the log files.
    • _ivanovich_'s avatar
      _ivanovich_
      Frequent Contributor

      Hi Rao,

       

      this is the stack trace:

      java.lang.NoClassDefFoundError: org/openxmlformats/schemas/spreadsheetml/x2006/main/CTExtensionList
          at java.lang.Class.getDeclaredMethods0(Native Method)
          at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
          at java.lang.Class.privateGetPublicMethods(Unknown Source)
          at java.lang.Class.getMethods(Unknown Source)
          at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getSAMMethod(CachedSAMClass.java:161)
          at org.codehaus.groovy.reflection.ClassInfo.isSAM(ClassInfo.java:356)
          at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:346)
          at org.codehaus.groovy.reflection.ClassInfo.access$700(ClassInfo.java:38)
          at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:494)
          at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:485)
          at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
          at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
          at org.codehaus.groovy.reflection.ClassInfo.getCachedClass(ClassInfo.java:108)
          at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:107)
          at org.codehaus.groovy.reflection.ParameterTypes.getParametersTypes0(ParameterTypes.java:78)
          at org.codehaus.groovy.reflection.ParameterTypes.getParameterTypes(ParameterTypes.java:64)
          at org.codehaus.groovy.reflection.CachedMethod.compareToMethod(CachedMethod.java:183)
          at org.codehaus.groovy.reflection.CachedMethod.compareTo(CachedMethod.java:139)
          at org.codehaus.groovy.reflection.CachedMethod$MyComparator.compare(CachedMethod.java:312)
          at java.util.Arrays.binarySearch0(Unknown Source)
          at java.util.Arrays.binarySearch(Unknown Source)
          at org.codehaus.groovy.reflection.CachedMethod.find(CachedMethod.java:65)
          at groovy.lang.MetaClassImpl.applyPropertyDescriptors(MetaClassImpl.java:2519)
          at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2258)
          at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3299)
          at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3263)
          at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:251)
          at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:282)
          at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:292)
          at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:259)
          at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:868)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:122)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:163)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
          at ExcelReader.readData(Script1.groovy:39)
          at ExcelReader$readData.call(Unknown Source)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
          at Script1.run(Script1.groovy:52)
          at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:92)
          at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:76)
          at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:155)
          at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:263)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTExtensionList
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)

      • _ivanovich_'s avatar
        _ivanovich_
        Frequent Contributor

        TanyaYatskovska

        Thank you Tanya,

        i will check your link but i have some problems with Ready API with license,

        when i create a project, if i rename the name of the project, later when i re-open Ready API the project name remain a Project.

        And sometime, READY API is toyally stuck with a black screen then i lost everything, i lost the whole project.

        So i have to copy_paste the project file manually every 15min.even i configure in the Preference.

         

        I prefer groovy because i have control, i know what i'm doing, if i use new functionnalities of Ready API, i do not know what is happening.

        And i observed some functionalities are working well in soapui 5 and not in Ready API

        I will check the link you mentioned for data test driven

         

        Is there some known bugs in Ready API?

        Thank you