While connecting to database I am getting "driver not found" error. How can we resolve this issue? - ipaf

while executing DB queries in PAF I am getting "driver not found" error. How can I resolve this issue?

User needs to download driver executable jar file for corresponding database and add that jar file in project class path. To put driver jar file in class path follow below steps:
Click on the dropdown next to the Run button on the IDE and select “Run Configurations…”
Select any of the java application from left pane select the tab arguments ->Dependencies--->select class path entries-->click on add external jars button
Select the driver jar file from the folder where it is saved and add to dependencies. click on 'Apply' and close button
You have to set the drivername in db.driver of init file.
Eg: if the db is oracle, you can give db.driver=oracle.jdbc.driver.OracleDriver.

Related

How to set up properly screenshots folder path for cypress-mochawesome-reporter?

My Mochawsome report created under installed cypress-mochawesome-reporter plugin doesn't contain screenshots as their path is wrong and contains not existing directory "screenshotscypress": "cypress/report/screenshotscypress/screenshots/". How to get rid of it? Screenshots for the failed tests are created properly and stored in "cypress/screenshots" folder by default. They are successfully copied to "report/screenshots" folder after test run is finished. But report itself contains only screenshot's icon but not the screenshot itself. Click on this icon displays the path mentioned above and containing "screenshotscypress" directory.

UNABLE TO CREATE A NEW SPRING STARTER PROJECT

I'm not able to create a spring starter project in sts tool(spring tool suite).
While trying to create a new spring starter project then I have received the "Artifact transfer exception" error.
And also I have attached the screen shot for the same.
Can you help on this.
Try spring initializer (https://start.spring.io/), just substitute your values, then click generate, unarchive project and open, and all must works.
Acoording to the link that Stephen C said in his comment:
m2eclipse issues ArtifactTransferException - But pom.xml compiles / installs from the command line
Open folder by running this text (without Quotes) in Search Explorer of Window “%USERPROFILE%.m2″.
After running above command, “m2″ folder of maven will open. Now search for file (without Quotes) “*.lastUpdated”.
In this step, delete all the files found by running Step 2.
Now go to Eclipse project and select “Maven | Update Dependency” or “Maven | Update Project”.

How to launch an RCP application from windows Run dialog?

I have an Eclipse RCP application which I need to launch from Windows Run dialog.
I tried it by setting a key in REGISTERY entry in
HKLM\SOFTWARES\Microsoft\Windows\Current Version\All Paths\**full path to exe**
but the app was not launching. How can I launch an RCP application from the RUN dialog?
File hierarchy in the folder:
Entry in registry(app name Hello.exe:
The exe is not loading because in the .ini file endorsed folder is specified to take from the current location (./endorsed). How can I tell the machine to load jars from an endorsed folder?
One approach I found to be working is that to modify the .ini file at run time, so we can specify the full path for the endorsed folder while run time. But is that a good design?
Dont use registry entries. Rather specify the full path.

gradle build causing error :startScripts Failed

I am following the step-by-step instructions provided in http://spring.io/guides/gs/consuming-web-service/#scratch to learn how to consume a SOAP web service using Gradle and Spring-WS. I have created the folder structure specified in the above URL (namely., c:/src/main/java/hello) and copied the source code for build.gradle, WeatherClient.java, WeatherConfiguration.java and Application.java into this directory structure. When I execute the command "gradle build" in c:\src\main\java\hello, I am getting the following error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':startScripts'.
No value has been specified for property 'mainClassName'.
Following a suggestion I found in one of the Q&A in stackoverflow, I included mainClassName = '' at the end of the build.gradle file. The above error was overcome, but I do not find the "gs-consuming-web-service.jar" file in the C:\src\main\java\hello\build\libs folder as suggested by the instructions. Rather, I find a jar file named "hello.jar" in this folder.
And if I try to execute the hello.jar executable, I get a java.lang.ClassNotFoundException.
Has anyone tried to follow the instructions given in the URL: http://spring.io/guides/gs/consuming-web-service/#scratch with success? If yes, can you please advise where I have gone wrong?
I was able to get the demo project work by following the steps:
Create a folder named gs-consuming-web-service and in it, create a file named build.gradle with the source code provided in http://spring.io/guides/gs/consuming-web-service/#scratch. Add an extra dependency (the one that is highlighted below) in this build.gradle file at the location below:
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework.ws:spring-ws-core")
compile(files(genJaxb.classesDir).builtBy(genJaxb))
**compile("org.springframework:spring-web:4.1.4.RELEASE")**
jaxb "com.sun.xml.bind:jaxb-xjc:2.1.7"
}
Create the directory structure ...gs-consuming-web-service/src/main/java/hello and in the hello folder, create the java files for WeatherClient.java, WeatherConfiguration.java and Application.java using the source code in http://spring.io/guides/gs/consuming-web-service/#scratch.
Launch InteliJ IDE and select the import project option. In the ensuing screen/step, select the build.gradle file in gs-consuming-web-service folder. Select check-boxes "Use auto-import" and "Create directories for empty content roots automatically". In this screen, make sure that the Gradle home, Gradle JVM are pre-populated correctly (in my case, these have been pre-populated with the path to Gradle-2.8 and JDK 1.8 respectively). Click OK.
At command prompt window, while within the gs-consuming-web-service folder, execute the command "gradle build".
This should get you to a successful gradle build. Good luck and happy learning.

Can't add OracleDriver to Subclipse build path

I need to make some modifications to the Subclipse Eclipse svn plugin. To do so, I need to connect to a specific Oracle database, but my code keeps dying on this line:
Class.forName("oracle.jdbc.OracleDriver");
With (surprise) :
ClassNotFoundException
I've added the ojdbc.jar to the build path of my project
(org.tigris.subversion.subclipse.core, the project that tries to connect to the database)
This works fine in a regular project, just not with the Subclipse plugin, so it's not being deployed I guess.
I do have it checked in this menu:
Configure Build Path -> Order and Export
Any idea what I'm doing wrong?
Copy the jar to the plugin directory.
Open the file "META-INF/MANIFEST.MF" in the plugin project directory, switch to
the "runtime" tab, and then click "add" button the the "class-path"
section to select the driver jar file.

Resources