Jose under Mac OS X - database

Yves
2004-10-20
2013-04-24
  • Yves
    Yves
    2004-10-20

    Problems still not solved: Here again a summary:

    I created a database, a user and privileges.  I tested with this user and with the root account but stumble in the same problem which boils down to this.

    Please find the modifications I did to the configuration file below:

    G4:/Downloads/jose.app yves$ java -cp jose.jar de.jose.db.Setup -db MySQL-external -schema META
    java.lang.NullPointerException
            at de.jose.db.ConnectionPool.create(ConnectionPool.java:119)
            at de.jose.db.ConnectionPool.<init>(ConnectionPool.java:37)
            at de.jose.db.JoConnection.init(JoConnection.java:62)
            at de.jose.db.Setup.<init>(Setup.java:59)
            at de.jose.db.Setup.main(Setup.java:764)

    <data-sources>
        <!-- MySQL Embedded (default)
            automatically starts a MySQL server
        -->
        <data-source default="false">

    ...

        <data-source default="true">
            <display-name> MySQL-external </display-name>
            <jndi-name> jdbc/mysql-external </jndi-name>
            <adapter-class embedded="false"> de.jose.db.MySQLAdapter </adapter-class>
            <driver-class> com.mysql.jdbc.Driver </driver-class>
            <class-path>mysql.jar</class-path>
            <jdbc-url> jdbc:mysql://localhost:3306/jose </jdbc-url>
            <!-- insert actual host name or IP address    -->
            <!-- insert port number, unless default -->

            <!-- insert user name -->
            <connection-param>
                <param-name> user </param-name>
                <param-value> joseuser </param-value>
            </connection-param>

            <!-- insert password (if required) -->
            <connection-param>
                <param-name> password </param-name>
                <param-value> josepassword </param-value>
            </connection-param>

    ...

     
  • Yves
    Yves
    2004-10-20

    Some additions to my previous message:

    System is operational:

    G4:~ yves$ mysql -ujoseuser -pjosepassword jose
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 48 to server version: 4.0.20-max

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql>

    G4:~ yves$ mysqladmin version
    mysqladmin  Ver 8.40 Distrib 4.0.20, for apple-darwin6.8 on powerpc
    Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL license

    Server version          4.0.20-max
    Protocol version        10
    Connection              Localhost via UNIX socket
    UNIX socket             /tmp/mysql.sock
    Uptime:                 2105 hours 46 min 46 sec

    Threads: 1  Questions: 363  Slow queries: 0  Opens: 31  Flush tables: 1  Open tables: 1  Queries per second avg: 0.017

     
  • Peter Schäfer
    Peter Schäfer
    2004-10-30

    ahm ... sorry

    I'm afraid the manual setup process does not work with the current jose version. Also the documentation is not quite up-to-date at this point.

    What I would like to suggest is this:

    (1) run jose with the default (embedded) settings. This will automatically create a set of database files in the folder jose/database/mysql/jose.

    (2) copy these files into the data directory of your MySQL server: /usr/local/mysql/data/jose (most likely).
    Since your server is running on localhost, I assume that you have the necessary privileges.

    (3) switch jose's database settings and try again

    Hope this helps,
    Peter

     
    • Yves
      Yves
      2004-10-30

      Thanks to your comment, I figured out how to get it working.

      Install the default version of Jose for Mac OS X, do not reconfigure anything. 
      Run from the console:
      sudo mysqladmin -urootsqlusername -prootsqlpassword shutdown
      (replace rootsqlusername and rootsqlpassword with the correct values)
      Then start Jose.

      The suggestion that default database files are created does not work without first stopping the mysql server.  Only the jose folder and the dblock file is being created.