problem fixed ... but took a while

From: Christopher Day (chrissf_199..ahoo.com)
Date: Wed Feb 12 2003 - 22:27:58 EST

  • Next message: Andrus: "Re: problem fixed ... but took a while"

    Hi Ladies and Gentlemen.

    I've just downloaded Cayenne and am excited to be using it with Struts for a
    potential new job.

    I am in the process of configuring the cayenne-web-app tutorial and hit a snag
    when I needed to generate primary key support in the database. I am on a Win2k
    SP3 machine, and attempted to use "com.mysql.jdbc.Driver" and subsequently
    "org.gjt.mm.mysql.Driver" (after locating the latter!)

    When I would go to click `Generate` I kept receiving an error saying that the
    JDBC driver (either of them) could not be found.

    My valiant attempts included:

      a) putting the respective JAR files in %JAVA_HOME%\jre\lib\ext

      b) removing them from %JAVA_HOME%\jre\lib\ext and explicitly setting their
          full path in the system CLASSPATH.

    I finally found success when I edited the modeler startup script (modeler.bat)
    at the :check_cp section to read:

    set OPTIONS=-classpath
    %CAYENNE_HOME%\lib\modeler\cayenne-modeler.jar;%CAYENNE_HOME%\lib\modeler\mysql_2_uncomp.jar

    I am assuming this is because the -classpath option of JAVAW overrides the
    environment but if that were true then the following two lines which check for
    CLASSPATH existence and append it to the local OPTIONS variable *should* have
    also provided success n'est-ce pas? This was unfortunately not the case.

    Anyhoo I just thought I'd pass this along in case anyone else has experienced a
    similar snafu.

    Thankful for an excellent product,

    Chris

    __________________________________________________
    Do you Yahoo!?
    Yahoo! Shopping - Send Flowers for Valentine's Day
    http://shopping.yahoo.com



    This archive was generated by hypermail 2.0.0 : Wed Feb 12 2003 - 22:29:52 EST