I don't know if you can use the database name that way in db.open(). Try to use the jcd-alias attribute value of the <jdbc-connection-descriptor> element. This one should either be in repository_database.xml, or even repository.xml, if you've merged the two files in one. It looks like you've not kept the "default" value.


Jewett, Diane C wrote:
I get the following when trying to open the database using ODMG. I am using
struts, MySQL and tomcat 4.1.27.

code:

  private void init() throws DatastoreException {
    // get odmg facade instance
    log.info( "StorefrontServiceImpl: init()" );

    try{
      odmg = OJB.getInstance();
      db = odmg.newDatabase();
      //open database
      log.info( "StorefrontServiceImpl: Opening database!" );
//    try{
//      db.open("default", Database.OPEN_READ_WRITE);
      db.open("/WEB-INF/classes/repository.xml", Database.OPEN_READ_WRITE);
    }catch( ODMGException  ex ){
      ex.printStackTrace();
      throw DatastoreException.datastoreError(ex);
    }catch( Throwable t ){
      t.printStackTrace();
      throw DatastoreException.datastoreError(t);
    }
  }
> ....


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to