Contributions
java.lang.noclassdeffounderror sun/io/unknowncharacterexception is displayed on connecting to DB2
Hi , I am gettingjava.lang.noclassdeffounderror sun/io/unknowncharacterexception is displayed on connecting to DB2 from ready API Below is the code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.*; try { // Load the DB2 Drivers Class.forName("com.ibm.db2.jcc.DB2Driver"); // Establish Connection to DB2 Connection mConnection = DriverManager.getConnection("jdbc:db2://mvsnbdc-db2db2e:55100/Schema","XXXX","XXXX") } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } for the line .get connection i am getting the mentioned Error I have addeddb2jcc4, db2jcc_license_cujar files in bin/ext ..folder It could be good if this could be solved7 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.7KViews0likes1Commentjava.io.FileNotFoundException on trying to read a text file
import java.io.*; import java.io.File import java.io.InputStream import java.io.OutputStream import java.io.Reader import java.io.Writer import java.nio.file.Path //To read the file path / / FilePath = context.expand( '${General_Properties#RequestXML_Path}' ).toString(); //FilePath = testRunner.testCase.testSuite.getPropertyValue("FilePath").toString(); log.info(FilePath) def file1 = new File(FilePath) def fileContent = file1.getText() //log.info (fileContent) //Storing the request before converstion for REquest response storage step testRunner.testCase.testSteps["General_Properties"].setPropertyValue( "Request_Store", fileContent ) in my previous step i get the value ofRequestXML_Path from excel as H:\Naveen\AIA Service\AIA_Automation\Data\Request_XML\NC\NC_Request.txt on executing i am getting below error java.io.FileNotFoundException: H:\Naveen\AIA Service\AIA_Automation\Data\Request_XML\NC\NC_Request.txt (The system cannot find the path specified) error at line: 16 Could anyone help me out on this1.5KViews0likes1CommentHow to create a property using groovy script???
Hi Team, In my automation script i am in need to create a property and store the value dynamically ,so that the value stored is used in upcoming steps for further process,Could anyone help in this. I tried online every article says on set and get property in groovy,but i need to create a property in groovy.Solved6.6KViews0likes4Comments