Menu

Jdbc drivers

Help
Anonymous
2011-11-10
2013-08-19
  • Anonymous

    Anonymous - 2011-11-10

    Hello

    Sorry for a maybe stupid question...

    I'd like to know where to place the jdbc file in order to use it with the
    webharvest GUI.

    Thank's

     
  • Anonymous

    Anonymous - 2011-11-10

    Maybe I haven't been very clear. I'd like to connect to a mySql database and i
    get the error

    ERROR - java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    

    I have downloaded the drivers but I don't know how to install them with WH.

    thank's

     
  • Steven P. Goldsmith

    lib folder usually. I typically put the JDBC driver in my test path, since
    it's not needed to compile.

     
  • Alex Wajda

    Alex Wajda - 2011-11-17

    I think the question was about using GUI as a standalone application (single
    jar-file). Good question. I don't know the answer :) Recently I've been fixing
    some JDBC stuff in WH and also noticed that there seems to be no user friendly
    way to register external jdbc driver without necessity to add to the classpath
    explicitly. That's a good item in my TODO list.

     
  • Alex Wajda

    Alex Wajda - 2011-11-17

    By the way - database processor needs to be seriously reworked as it has a lot
    of weak places at the moment.

     
  • MarkRB

    MarkRB - 2012-02-17

    In a similar vein....

    I am trying to use Webharvest to insert records in an InterSystems Cache
    database.

    I have the relevant file cachedb.jar in the same folder as
    webharvest_all_2.jar

    Following error is thrown when tring to connect to database:

    java.lang.ClassNotFoundException: com.intersys.jdbc.CacheDriver

    Of course that happens on the following line of code:

    jdbcclass="com.intersys.jdbc.CacheDriver"

    I'm pretty sure my connection string is correct.

    Wajda79 mentioned explicitly adding to a ClassPath? Not sure how

    to do that.

    All help appreciated...

     
  • Anonymous

    Anonymous - 2012-05-19

    copy the mysql driver to the jar-file under the COM folder and restart web-
    harvest!

    :-)

     
  • Jonathan

    Jonathan - 2013-07-29

    Hello, I am using Ubuntu 12.04 and am having problems getting data into a MySQL database, specifically error messages along it not finding the JDBC driver (the same is in the OP).

    I can get data scraped into XML but cannot get it into my databases. I have looked at examples, such as the Dilbert scraping one (which scrapes to a databse) or modding the New York Times one, but no luck. I have looked at the webharvest doc which says "JDBC driver library file(s) should be provided on the classpath if used programatically, or on the same path with Web-Harvest executable if used standalone."

    I have put mysql-connector-java-5.1.25-bin.jar into the same folder as webharvest_all_2.jar but it won't work.

    I am a journalist rather than a programmer so I need a fair bit of hand holding. For instance I don't understand the lines about the classpath, or putting the jar-file under the COM folder as I can't find such a folder.

    Alternatively is there a good way of converting XML into CSV as I know I can get XML? Excel 2010 is good for a couple of files but I have a couple of hundred I need putting into a database or spreadsheet and Webharvest won't let me scrape into a CSV.

    Thanks.

     

    Last edit: Jonathan 2013-07-29
  • Mrunmay

    Mrunmay - 2013-08-19

    Procedure to use the Mysql jar file in your project is very easy.
    Either you can set the mysql-connector-java-x.x.x-bin.jar in the CLASSPATH or you can set it from the command window.
    Procedure to set the path from command window is as follows.
    Copy the mysql-connector-java-x.x.x-bin.jar file and paste it near the webharvest_all_2.jar.
    Then in the command prompt goto that folder and type :
    javaw.exe -Xms1024m -Xmx1024m -cp "mysql-connector-java-x.x.x-bin.jar" -jar "webharvest_all_2.jar"
    Now the Web-Harvest GUI will open for you to work with Mysql Database.

    Thanks

     

    Last edit: Mrunmay 2013-08-19

Log in to post a comment.