db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Reath" <matt.re...@cciinc.us>
Subject RE: Problems with save() method with Peer class
Date Thu, 07 Aug 2003 14:39:14 GMT
Andras,

I've included my config files. I hope you can help. 

--BEGIN build.properties ---

torque.project = ontrack
torque.database = mysql

torque.targetPackage = com.cci.ontrack.data

torque.addGetByNameMethod = true
torque.addIntakeRetrievable = false
torque.addSaveMethod = true
torque.addTimeStamp = true
torque.basePrefix = Base
torque.complexObjectModel = true
torque.useClasspath = false
torque.useManagers = false

torque.database.createUrl = jdbc:mysql://127.0.0.1/mysql
torque.database.buildUrl = jdbc:mysql://127.0.0.1/ontrack
torque.database.url = jdbc:mysql://127.0.0.1/ontrack
torque.database.driver = org.gjt.mm.mysql.Driver
torque.database.user = matt
torque.database.password = <took out password>
torque.database.host = 127.0.0.1

torque.sameJavaName = false

--END build.propertise--

--BEGIN Torque.properties--

log4j.rootCategory = DEBUG, default
log4j.appender.default = org.apache.log4j.FileAppender
log4j.appender.default.file = ./torque.log
log4j.appender.default.layout = org.apache.log4j.SimpleLayout

torque.database.default = ontrack
torque.database.ontrack.adapter = mysql
torque.database.ontrack.driver = org.gjt.mm.mysql.Driver
torque.database.ontrack.url = jdbc:mysql://127.0.0.1/ontrack
torque.database.ontrack.username = matt
torque.database.ontrack.password = <took out password>


--END Torque.properties

My build-torque.xml file is vanilla. I haven't edited it at all.

--BEGIN ontrack-schema.xml--

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE database SYSTEM
 "http://db.apache.org/torque/dtd/database_3_1.dtd">

<database
  name="ontrack"
  defaultIdMethod="idbroker">

  <table name="customer" description="Customer Table">
    <column
      name="customer_id"
      required="true"
      primaryKey="true"
      type="INTEGER"
      description="Customer Id"/>
    <column
      name="name"
      required="true"
      type="VARCHAR"
      size="255"
      description="Customer Name"/>
    <column
      name="address1"
      required="true"
      type="VARCHAR"
      size="255"
      description="Address"/>
    <column
      name="address2"
      required="true"
      type="VARCHAR"
      size="255"
      description="Address"/>
    <column
      name="city"
      required="true"
      type="VARCHAR"
      size="255"
      description="City"/>
    <column
      name="state"
      required="true"
      type="VARCHAR"
      size="2"
      description="State"/>
    <column
      name="zip"
      required="true"
      type="VARCHAR"
      size="15"
      description="Zip Code"/>
    <column
      name="country"
      required="true"
      type="VARCHAR"
      size="100"
      description="Country"/>
    <column
      name="phone"
      required="true"
      type="VARCHAR"
      size="15"
      description="Phone Number"/>
    <column
      name="fax"
      required="true"
      type="VARCHAR"
      size="15"
      description="Fax Number"/>
    <column
      name="website"
      required="true"
      type="VARCHAR"
      size="255"
      description="Web Address"/>
    <column
      name="email"
      required="true"
      type="VARCHAR"
      size="255"
      description="Email Address"/>
    
  </table>
  
 </database>

--END ontrack-schema.xml--

--BEGIN id-table-schema.xml--

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE database SYSTEM
"http://db.apache.org/torque/dtd/database_3_0_1.dtd">

<database name="ontrack">
  <table name="ID_TABLE" idMethod="idbroker">
    <column name="ID_TABLE_ID" required="true" primaryKey="true"
type="INTEGER"/>
    <column name="TABLE_NAME" required="true" size="255"
type="VARCHAR"/>
    <column name="NEXT_ID" type="INTEGER"/>
    <column name="QUANTITY" type="INTEGER"/>
    
    <unique>
      <unique-column name="TABLE_NAME"/>
    </unique>        
    
  </table>
</database>  

--END id-table-schema.xml--


-----Original Message-----
From: Andras Balogh [mailto:andras@reea.net] 
Sent: Thursday, August 07, 2003 9:28 AM
To: Apache Torque Users List
Subject: Re: Problems with save() method with Peer class

Hi,

This usually happens if you didn't configured correctly the
torque.properties file.
Make sure you have this line in your file:

torque.database.default=your_db_name
torque.database.your_db_name.adapter=mysql

Best wishes,

Andras.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message