Forum Discussion

HimanshuTayal's avatar
HimanshuTayal
Community Hero
5 years ago

Getting error while importing Excel file using POI

Hello Community Members,

 

I am stuck at 1 point where i wan't to fetch excel data having formula, i am able to achieve this in Eclipse and tried using same jars in soapui but getting below error:

 

Getting error on below code:

 

 

ERROR:An error occurred [Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader], see error log for details

 

Using below jars in my ext folder.

 

 

nmrao 

richie 

Lucian 

TanyaYatskovska 

sonya_m 

 

Any Help on this..TIA

  • nmrao's avatar
    nmrao
    Champion Level 3
    What does it mean, "I am able to achieve this in eclipse"?

    Have you copy, pasted the same java program in Groovy Script test step?

    Hope all the dependencies copied under bin/ext directory and restarted the tool.

    Is java version in the eclipse and SoapUi the same?

    Have you checked if there any conflicting libraries ? I.e., Same library different versions between lib and bin/ext?

    If java program is working, then can you create a library and call it in test step?

    What is the formulae in excel? Does it include special characters such as #$?

    Is it possible to test by saving the data into CSV format and use this file to read data and see?

    • HimanshuTayal's avatar
      HimanshuTayal
      Community Hero

      What does it mean, "I am able to achieve this in eclipse"?

      I was doing in SoapUI since morning but wasn't getting any moving ahead so tried the same task with eclipse with Maven project and solve this.


      Have you copy, pasted the same java program in Groovy Script test step?
      Yes i have copy pasted same code


      Hope all the dependencies copied under bin/ext directory and restarted the tool.
      Yes copied all dependencies into bin/ext folder and restarted the tool.


      Is java version in the eclipse and SoapUi the same?
      Yes java version is same in both the tools


      Have you checked if there any conflicting libraries ? I.e., Same library different versions between lib and bin/ext?
      All Libraries are same as i have copied to ext from .m2 repository of Eclipse


      If java program is working, then can you create a library and call it in test step?

      How to achieve this?


      What is the formulae in excel? Does it include special characters such as #$?

      it's a simple refer below screenshot.


      Is it possible to test by saving the data into CSV format and use this file to read data and see?

      No i have very huge data.

       

      Above screenshot is just to test

       

      Screenshot of Eclipse

       

  • nmrao's avatar
    nmrao
    Champion Level 3
    Are you a pro tool user? If so I believe it has all dependencies out of the box. Isn't it? And any specific reason for trying in free tool?
    • HimanshuTayal's avatar
      HimanshuTayal
      Community Hero

      nmrao 

       

      Yes, My company have provided me SoapUI Pro license but we have only 1 license and we need this to give this to manual team for execution and they don't have Pro license that's the reason doing it on opensource so that they will be able to use this.

      • nmrao's avatar
        nmrao
        Champion Level 3
        That's ok. You can still try the same in pro to see if you are getting the same error the same script, an advantage for you. This is to ensure that no issues wth dependencies.