Updating JDBC driver in Eclipse for Derby 10.9 - sql

So I am running into an issue right now.... and I need your help. I am trying to get a Derby JDBC driver setup in Eclipse. The Derby driver I downloaded was 10.9, but the Driver that is in Eclipse says it is "System Version 10.2".
I went to Window -> Preferences, Data Management, Connectivity, Driver Definition, then created a new one. I select the latest version of the Derby Embedded JDBC Driver, which is 10.2. I then include the derby.jar file in the JAR List then click OK.
Then, in Eclipse again, I go to "Data Source Explorer" then right click on Database Connections -> New... I select Derby, then select the Driver I just used, add a user/pass, then click Finish.
It creates the DB just fine... But when I use the following code I get an errror:
String host = "jdbc:derby:C:\\Users\\Samson\\MyDB;create=true";
String user = "admin";
String pass = "admin";
try {
java.sql.Connection conn = DriverManager.getConnection(host, user, pass);
} catch (SQLException e) {
e.printStackTrace();
}
The error is:
ERROR XSLAN: Database at C:\Users\Samson\MyDB has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.9.
So it seems like it is trying to connect to this 10.9 database with a 10.2 driver for some reason but I can't figure out what I'm doing wrong. Any ideas? Thanks!!
Edit: Okay so the above code is placed within a Java Servlet if that helps. I created a new project called "DBConnect" and placed the lib for derby inside it and created a simple program to connect to the DB and it worked just fine. So it's related to my Servlet.
Edit2: Nothing like being an idiot in your first post to StackOverflow. I have to update the Derby driver in Geronimo as it is only using 10.2 instead of 10.9.
Edit3: On my work PC it is giving me the same issue. For some reason whenever I create a regular Java project it works fine, but whenever I try to use a Java Servlet to connect to this database I still get the error. If anyone has any suggestions I am open to it.
Edit4: Looks like the Geronimo installation is using 10.8.2.2_1, but I still have no clue how to actually get it updated. Going to try and just download the 10.8 driver for now and deal with this at a later time.
Edit5: Yeah it looks like I can't really use the Data Source Explorer in Eclipse for some reason. I have 10.8.2.2_1 installed and I can get my servlet to save/read from the DB just fine, but when I try to connect using the Data Source Explorer it just doesn't even show the Table I created.
Edit6: Sigh... Well 10.8 did, in fact, work. I just wasn't looking in the right Schema. I feel like an idiot.

I went ahead and installed derby 10.8 instead of 10.9 and it seems to be working just fine now. Geronimo was setup to use 10.8 instead of 10.9.

Related

Pentaho 5: Repository connection window not showing up

I am able to open a Pentaho version 5 Spoon session on my new laptop but when I clicked on Tools -> Repository -> Connect, nothing comes up (no connection window).
However, I am using the same executable on my old laptop and there its working without any issues. I have also downloaded a fresh executable of version 5 on my new laptop but it didn't work as well. I am wondering what could be causing this.
Any pointers will be very helpful.
Thanks.
As suggested by #Working Hard.. in the comments, I installed jdk8 (I was using jdk10 earlier) and created a new environment variable PENTAHO_JAVA_HOME as explained in the below URL and added the path accordingly.
https://help.pentaho.com/Documentation/5.2/0F0/0G0/020
Regards,
Sachin

Simple JNDI not working with Parallels VM

We use JNDI connections for all of our jobs.
I recently upgraded to a new Macbook pro and now, none of my jobs/transformations using JNDI work. All fail with a "No suitable driver found" error.
This is really weird since the /lib subdirectory has the necessary JAR files. I put them there. I made sure my jdbc.properties file is correctly located in /Volumes/C/data-integration-5.3/simple-jndi.
Even after I copied the simple-jndi directory to /Volumes/C/ and to /Volumes/C/.pentaho, the problem remains. "No suitable driver found" error.
The problem exists with multiple JDBC drivers (Oracle, MySQL and Postgres), not just one. Where should the simple-jndi directory be located???
My laptop runs OS X Yosemite with Parallels software for MS Windows 7 pro emulation.
Make sure you have ojdbc7.jar accessible.
Solved it.
My VM user id was not a domain user id . Only local. After my helpdesk guy fixed it, I am now able to use JNDI without problem.
Weird but it works.

Weblogic Server, Timed out waiting for completion, while creating a new server

I have installed the Weblogic 12c (12.1.3) on my Windows 7 machine. After creating the Admin server and logging in, I am trying to create a new Managed Server. But when I press the create button, it takes a lot of time showing the loading symbol and finally gives the error Timed out waiting for completion: Activate State: STATE_DISTRIBUTED Target Servers States: AdminServer STATE_DISTRIBUTED.
Earlier I was working on weblogic 10.3.2 and it was working fine, but after this installation it gives me the error and I am unable to create a new Managed Server.
My JAVA_HOME is pointing to JDK 1.8 currently. Also there is this entry in the PATH variable which is something like 'C:\ProgramData\Oracle\java\javapath' which has 3 SYMLINKS to java.exe, javaw.exe and javaws.exe to my JRE 1.8 instead of the JDK 1.8. I uninstalled the JRE and just kept the JDK for the time being but still did not work.
Please advice.
Was able to find the solution for it. Pointed my JAVA_HOME back to JDK 1.7 and at the same time changed the port of NodeManager from the default 5556 to 5557 and was able to successfully create and link the Machine and the Managed Server.

Is there a Selenium WebDriver available for the Microsoft Edge browser?

As of the date of this post the name "Microsoft Edge" has just been officially announced as the default browser for the new Windows 10.
It may be premature to ask but I would like to know if a new Selenium WebDriver is available for it and if not, if there is any telling how long we might expect to wait until we see one developed?
(A technical preview of Windows 10 has already been out so this doesn't seem like a foolish question to me.)
Yes, there is a WebDriver implementation for Microsoft Edge. Its initial availability was announced on 23 July 2015. Language bindings in the Selenium open source project have been updated to take advantage of this driver implementation, and those updates have been released in Selenium 2.47. Note that the Java language bindings were re-released as 2.47.1 to correct an initial issue. The initial implementation has limited functionality, but Microsoft is committed to bringing a fully functional driver implementation to fruition, so updates will be forthcoming.
Microsoft has provided MicrosoftWebDriver which can be used for Edge browser.
Correct version of MicrosoftWebDriver needs to be downloaded, based on the OS Build number
Go to Start > Settings > System > About and note down the OS Build number.
Download the proper version of the driver from this link - https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
If the file that's downloaded is .msi, then install it to get the .exe driver. For one of the release, direct .exe can be downloaded.
Once the MicrosoftWebDriver.exe is downloaded, we can use it in our test script using either System.setProperty("webdriver.edge.driver", "driver location") or using environment variable
The sample script would be like this -
System.setProperty("webdriver.edge.driver","C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe"); //put actual location
WebDriver driver = new EdgeDriver();
driver.get("your link");
Refer this article for detailed information - http://automationtestinghub.com/selenium-3-launch-microsoft-edge-with-microsoftwebdriver/
The Microsoft Edge driver for Selenium can be automatically downloaded (for Java) using the library webdrivermanager as follows:
EdgeDriverManager.getInstance().setup();
The variable webdriver.edge.driver is also exported by webdrivermanager with the proper path of MicrosoftWebDriver.exe.
"in case it wasn't clear, Microsoft Edge will have WebDriver support. It isn't available today, but is in development Q's? #msedgesummit" tweet from John Jansen the who is - "Microsoft Engineer. Principal Software Engineer (nee Test) Lead on Project Spartan (nee Internet Explorer)."
You can find him on twitter #thejohnjansen and wait for an announcement :)
Prerequisite: Windows 10 is installed on your machine
Download the specified Microsoft WebDriver server version for your build (In my case it is MicrosoftWebDriver.exe for the Operating System: Windows 10 Pro 64-bit (10.0, Build 14393))
Selenium WD Java code for MS Edge is as follows:
System.setProperty("webdriver.edge.driver", "D:\Ripon\MicrosoftWebDriver.exe");
driver = new EdgeDriver();
As of EdgeHTML version 18 (which arrived with Windows version 1809), there is no longer a standalone driver download. You can obtain the new driver in one of two ways:
Start - type "Manage optional features" - Click "Add a Feature" - Find "WebDriver"
Entering the following on an elevated command prompt - "DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0"
https://blogs.windows.com/msedgedev/2018/06/14/webdriver-w3c-recommendation-feature-on-demand/#Qj75uxuFHccPmCW5.97
Legacy versions are still available from:
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Update:
It appears that version 18 is now legacy and we are back to installing a separate webdriver since the move to Chromium. The link directly above this will still take you to the correct drivers page.
Thanks for your help, I was blocked with my tests, searching for a "EdgeDriver.exe" asked by the selenium EdgeDriver implementation and only find the MicrosoftWebDriver.
I have made this in C# if this can help someone, based on your previous answers :
First, you need to download the MicrosoftWebDriver nuget package, this one will only make a copy of the MicrosoftWebDriver.exe into your destination folder on compilation then
private readonly string _localDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Environment.SetEnvironmentVariable("webdriver.edge.driver", _localDir + "MicrosoftWebDriver.exe");
var driver = new EdgeDriver();
Hope this can help someone.

Impala jdbc driver work with Pentaho Designer

I have some trouble to get impala jdbc driver working with Pentaho Designer.
I got the jdbc driver from cloudera website. After extracting the drivers and put them under lib/jdbc, I set up connection via Generic Database.
The custom connection url is: jdbc:hive2://example.com:21050/;auth=noSasl
The custom driver class name is: org.apache.hive.jdbc.HiveDriver
I tried a simple query like "SELECT count(*) FROM table_1;", and got an error: "ParentException:
java.sql.SQLException: Method not supported"
Any ideas?
Matt from Pentaho submitted pull request to apache repository on github: https://github.com/apache/hive/pull/9
This pull request contains implementation of all needed methods in JDBC driver for Pentaho tools. I fetched his commit, built jar and copied it into libext/JDBC directory instead of jar from Cloudera website. Driver still misses lot of methods, but is able to perform basic operations on Impala.
Pentaho does not support impala in previous versions. If you are using 4.4.2 PDI,you can use it for instaview.
Impala will be officially support in pentaho 5.0 and its already been released.