ch5082
9 years agoOccasional Contributor
NoClassDefFoundError
Hello,
I'm trying to import and invoke a Java class which will connect to the Quality Center rest api. The import to my class seems fine as I'm able to print a message to a popup window. But I'm getting the NoClassDefFoundError for java/util/Base64 as it trys to encode a string.
Java code:
byte[] credBytes = (username + ":" + password).getBytes();
JOptionPane.showMessageDialog(null, "CredBytes", "InfoBox: Login", JOptionPane.INFORMATION_MESSAGE);
String credEncodedString = "Basic " + Base64.getEncoder().encodeToString(credBytes);
The java.util.Base64 is imported as a part of my Class.
my soapui groovy script:
import qcrestapi.QCRest
QCRest qcRest = new QCRest()
qcRest.QCLogin("USER","*******")
- Take a look at soapui.bat, and you should able to point to required java version.