You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Thomas Fischer <fi...@seitenbau.net> on 2005/06/22 08:51:30 UTC

RE: MySql InnoDB question




Hi,

this message is usually the sign that something else is wrong. Most
probably, Torque will not work correctly if you see this message.
There is at least one unresolved issue with InnoDB tables, it should be in
scarab (the issue tracker) with a ticket id between TRQS250 and TRQS300.
Please have a look.

         Thomas

"Youngho Cho" <yo...@nannet.co.kr> schrieb am 22.06.2005 02:23:27:

> Hello,
>
> I am tring to use MySQL 4.1 InnoDB table type.
> I install MySQL 4.1.12 (using InnoDB engine mode ) in Window XP and
Torque 3.1
> After create db with torque and changed the all table type to innoDB
> type with mysql admin client
>
> But when I start the torque,
> I got the following warn message
>
> 2005-06-21 18:38:48,936 [Torque - ID Broker thread] DEBUG org.
> apache.torque.oid.IDBroker - IDBroker thread was started.
> 2005-06-21 18:38:48,941 [main] WARN  org.apache.torque.oid.IDBroker
> - IDBroker is being used with db 'easydesk', which does not support
> transactions. IDBroker attempts to use transactions to limit the
> possibility of duplicate key generation.  Without transactions,
> duplicate key generation is possible if multiple JVMs are used or
> other means are used to write to the database.
>
> I notice that when this message show, torque doesn't use transaction.
> How do I set the torque use transaction with MySQL InnoDB type ??
>
> Thanks.
>
> Youngho


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


Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Ug.. sorry,

torque.dsfactory.easydesk.connection.url=jdbc:mysql://192.168.1.25:3306/easydesk?zeroDateTimeBehavior=round&useNewIO=true
is correct.

Thanks.

Youngho

----- Original Message ----- 
From: "Youngho Cho" <yo...@nannet.co.kr>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Thursday, June 23, 2005 5:18 PM
Subject: Re: MySql InnoDB question


> Here is my torque confiuration part.
> 
> torque.database.default=easydesk
> torque.database.easydesk.adapter=mysql
> 
> torque.dsfactory.easydesk.factory=\
>   org.apache.torque.dsfactory.SharedPoolDataSourceFactory
> torque.dsfactory.easydesk.pool.maxActive=60
> torque.dsfactory.easydesk.pool.maxWait=30000
> torque.dsfactory.easydesk.pool.testOnBorrow=true
> 
> torque.dsfactory.easydesk.pool.timeBetweenEvictionRunsMillis=-1
> torque.dsfactory.easydesk.pool.validationQuery=SELECT 1
> torque.dsfactory.easydesk.connection.driver=org.gjt.mm.mysql.Driver
> torque.dsfactory.easydesk.connection.url=jdbc:mysql://192.168.1.25:3306/easydesk?useUnicode=true&characterEncoding=EUC-
>       KR&zeroDateTimeBehavior=round&useNewIO=true
> torque.dsfactory.easydesk.connection.user=
> torque.dsfactory.easydesk.connection.password=
> 
> torque.idbroker.clever.quantity=false
> torque.idbroker.prefetch=true
> torque.idbroker.usenewconnection=true
> torque.manager.useCache=true
> 
> 
> Thanks
> 
> Youngho
> 
> ----- Original Message ----- 
> From: "Andras Balogh" <an...@reea.net>
> To: "Apache Torque Users List" <to...@db.apache.org>
> Sent: Thursday, June 23, 2005 4:53 PM
> Subject: Re: MySql InnoDB question
> 
> 
> > Hello,
> > 
> > Can You post your torque.properties file?
> > I have seen this error when i have not added correctly this line:
> > torque.database.<YOURDB>.adapter=mysql
> > 
> > Best regards,
> > Andras.
> > 
> > 
> > Youngho Cho wrote:
> > 
> > >Hello,
> > >
> > >Yes I know Torque support idMethod="native" for mysql.
> > >But I would like to use idMethod="idbroker" for enjoing database independant feature fully.
> > >
> > >Thanks.
> > >
> > >Youngho
> > >
> > >
> > >  
> > >
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org

Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Here is my torque confiuration part.

torque.database.default=easydesk
torque.database.easydesk.adapter=mysql

torque.dsfactory.easydesk.factory=\
  org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.easydesk.pool.maxActive=60
torque.dsfactory.easydesk.pool.maxWait=30000
torque.dsfactory.easydesk.pool.testOnBorrow=true

torque.dsfactory.easydesk.pool.timeBetweenEvictionRunsMillis=-1
torque.dsfactory.easydesk.pool.validationQuery=SELECT 1
torque.dsfactory.easydesk.connection.driver=org.gjt.mm.mysql.Driver
torque.dsfactory.easydesk.connection.url=jdbc:mysql://192.168.1.25:3306/easydesk?useUnicode=true&characterEncoding=EUC-
      KR&zeroDateTimeBehavior=round&useNewIO=true
torque.dsfactory.easydesk.connection.user=
torque.dsfactory.easydesk.connection.password=

torque.idbroker.clever.quantity=false
torque.idbroker.prefetch=true
torque.idbroker.usenewconnection=true
torque.manager.useCache=true


Thanks

Youngho

----- Original Message ----- 
From: "Andras Balogh" <an...@reea.net>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Thursday, June 23, 2005 4:53 PM
Subject: Re: MySql InnoDB question


> Hello,
> 
> Can You post your torque.properties file?
> I have seen this error when i have not added correctly this line:
> torque.database.<YOURDB>.adapter=mysql
> 
> Best regards,
> Andras.
> 
> 
> Youngho Cho wrote:
> 
> >Hello,
> >
> >Yes I know Torque support idMethod="native" for mysql.
> >But I would like to use idMethod="idbroker" for enjoing database independant feature fully.
> >
> >Thanks.
> >
> >Youngho
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

Re: MySql InnoDB question

Posted by Andras Balogh <an...@reea.net>.
Hello,

Can You post your torque.properties file?
I have seen this error when i have not added correctly this line:
torque.database.<YOURDB>.adapter=mysql

Best regards,
Andras.


Youngho Cho wrote:

>Hello,
>
>Yes I know Torque support idMethod="native" for mysql.
>But I would like to use idMethod="idbroker" for enjoing database independant feature fully.
>
>Thanks.
>
>Youngho
>
>
>  
>


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


Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hello,

Yes I know Torque support idMethod="native" for mysql.
But I would like to use idMethod="idbroker" for enjoing database independant feature fully.

Thanks.

Youngho


----- Original Message ----- 
From: "Andras Balogh" <an...@reea.net>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Thursday, June 23, 2005 4:02 PM
Subject: Re: MySql InnoDB question


> Hello,
> 
> How did you configured the idMethod in your schema? You don't need 
> IDBroker since mysql should
> support auto increment primary keys so you should go with 
> idMethod="native" for tables with auto increment
> primary key.
> 
> Best regards,
> Andras.
> 
> 
> Youngho Cho wrote:
> 
> >Hello,
> >
> >I read TRQ278 for InnoDB related Issue.
> >It is about create tables and fk relations issue.
> >In my case, when I create tables using generated sql from xml.
> >I set SET FOREIGN_KEY_CHECKS=0; before execute the sql.
> >Than there is no complain.
> >
> >My problem is I would like to use transaction but the warn report said torque doesn't use transaction.
> >I use connector/j-3.1.7 driver.
> >Do I have to ask it to mysql driver mailling list ?
> >How you use torque with InnoDB ?
> >
> >Thanks.
> >
> >Youngho
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hello,

I also believe that there is something wrong in my conf.

The InnoDB setup System is in my home.
I will check it out at home and post it here the log.


Thanks,

Youngho

----- Original Message ----- 
From: "Thomas Fischer" <fi...@seitenbau.net>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Thursday, June 23, 2005 4:39 PM
Subject: Re: MySql InnoDB question


> 
> 
> 
> 
> Hi,
> 
> I am rather sure that this will not solve the problem, as the problem is
> probably not in the IdBroker, but somewhere else.
> Usually, if you see this message, there is something wrong in the
> configuration. It would help to read the logs; if you do not have any, you
> should configure logging for your application to find the error.
> 
>      Thomas
> 
> 
> Andras Balogh <an...@reea.net> schrieb am 23.06.2005 09:02:00:
> 
> > Hello,
> >
> > How did you configured the idMethod in your schema? You don't need
> > IDBroker since mysql should
> > support auto increment primary keys so you should go with
> > idMethod="native" for tables with auto increment
> > primary key.
> >
> > Best regards,
> > Andras.
> >
> >
> > Youngho Cho wrote:
> >
> > >Hello,
> > >
> > >I read TRQ278 for InnoDB related Issue.
> > >It is about create tables and fk relations issue.
> > >In my case, when I create tables using generated sql from xml.
> > >I set SET FOREIGN_KEY_CHECKS=0; before execute the sql.
> > >Than there is no complain.
> > >
> > >My problem is I would like to use transaction but the warn report
> > said torque doesn't use transaction.
> > >I use connector/j-3.1.7 driver.
> > >Do I have to ask it to mysql driver mailling list ?
> > >How you use torque with InnoDB ?
> > >
> > >Thanks.
> > >
> > >Youngho
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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

Re: MySql InnoDB question

Posted by Thomas Vandahl <th...@tewisoft.de>.
Youngho Cho wrote:

> It looks like the torque initialize process has a problem for checking Tranasction Support or Not.
> During initialize process, the IDBroker call the TorqueInstance for checking the Connection support transaction.
> Because the TorqueInstance doesn't initialize yet,  it always set false even the connection support transaction.

I use Torque 3.2-dev with MySQL InnoDB tables and it works fine. The 
warning below appears if Torque cannot connect to the database for 
whatever reason. Probably because it is not initialized correctly as the 
error message suggests.

> 2005-06-23 23:31:15,078 [main] ERROR org.apache.torque.oid.IDBroker - org.apache.torque.TorqueException: Torque is not initialized.
> 2005-06-23 23:31:15,078 [main] WARN  org.apache.torque.oid.IDBroker - IDBroker is being used with db 'easydesk', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation.  Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database.

Could you please post your Torque.properties?

Bye, Thomas.


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


Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hello,

Thanks. I will check it out.


Youngho


----- Original Message ----- 
From: "Dan Cooper" <dc...@fvt.com>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Thursday, June 30, 2005 7:38 AM
Subject: Re: MySql InnoDB question


> Did you ever get past this problem?
> 
> You should log into Mysql and run the command:
> 
> show table status;
> 
> on the easydesk database.  This will show you what table types have been 
> created in your database.  I had this same problem with Torque when I 
> first started and it turned out that Torque was not creating InnoDB 
> tables.  In my previous email to this list there are instructions on how 
> to change the table type when using Torque to generate your schema.
> 
> Regards & Happy Torqueing
> 
> Dan Cooper
> 
> Youngho Cho wrote:
> 
> >Hello,
> >
> >Here is my test result.
> >I added log line into initialize() method.
> >
> >It looks like the torque initialize process has a problem for checking Tranasction Support or Not.
> >During initialize process, the IDBroker call the TorqueInstance for checking the Connection support transaction.
> >Because the TorqueInstance doesn't initialize yet,  it always set false even the connection support transaction.
> >
> >2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - init(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
> >2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
> >2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - initialize()
> >2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
> >2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - initAdapters(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
> >2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - Adding mysql -> easydesk as Adapter
> >2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - initDataSourceFactories(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
> >2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - handle: easydesk DataSourceFactory: org.apache.torque.dsfactory.SharedPoolDataSourceFactory
> >2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
> >2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - Starting initCPDS
> >2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
> >2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@135da43, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
> >2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@11a0d35, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
> >2005-06-23 23:31:14,890 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, driver, org.gjt.mm.mysql.Driver)
> >2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, url, jdbc:mysql://localhost:3306/easydesk?zeroDateTimeBehavior=round&useNewIO=true)
> >2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, user, root)
> >2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, password,  (value not logged))
> >2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
> >2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
> >2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1015a9e, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
> >2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@e8606c, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
> >2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxActive, 60)
> >2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxWait, 30000)
> >2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, testOnBorrow, true)
> >2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, timeBetweenEvictionRunsMillis, -1)
> >2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, validationQuery, SELECT 1)
> >2005-06-23 23:31:15,000 [main] DEBUG org.apache.torque.TorqueInstance - Adding a dummy entry for default, mapped onto easydesk
> >2005-06-23 23:31:15,062 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
> >2005-06-23 23:31:15,078 [main] ERROR org.apache.torque.oid.IDBroker - org.apache.torque.TorqueException: Torque is not initialized.
> >2005-06-23 23:31:15,078 [main] WARN  org.apache.torque.oid.IDBroker - IDBroker is being used with db 'easydesk', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation.  Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database.
> >2005-06-23 23:31:15,109 [Torque - ID Broker thread] DEBUG org.apache.torque.oid.IDBroker - IDBroker thread was started.
> >2005-06-23 23:31:17,703 [main] INFO  org.apache.torque.TorqueInstance - Added Manager for Class: com.nannet.jettiger.om.JettigerUser -> com.nannet.jettiger.om.JettigerUserManager
> >2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
> >2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - initialize finished
> >
> >
> >I could solved this problem by moving initialize finish flag set true 
> >when after dataSourceFactory initialize not completely finished the TorqueInstance.
> >
> >[youngho@dev db-torque]$ cvs diff src/java/org/apache/torque/TorqueInstance.java
> >Index: src/java/org/apache/torque/TorqueInstance.java
> >===================================================================
> >RCS file: /home/cvspublic/db-torque/src/java/org/apache/torque/TorqueInstance.java,v
> >retrieving revision 1.11
> >diff -r1.11 TorqueInstance.java
> >149a150,151
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

Re: MySql InnoDB question

Posted by Dan Cooper <dc...@fvt.com>.
Did you ever get past this problem?

You should log into Mysql and run the command:

show table status;

on the easydesk database.  This will show you what table types have been 
created in your database.  I had this same problem with Torque when I 
first started and it turned out that Torque was not creating InnoDB 
tables.  In my previous email to this list there are instructions on how 
to change the table type when using Torque to generate your schema.

Regards & Happy Torqueing

Dan Cooper

Youngho Cho wrote:

>Hello,
>
>Here is my test result.
>I added log line into initialize() method.
>
>It looks like the torque initialize process has a problem for checking Tranasction Support or Not.
>During initialize process, the IDBroker call the TorqueInstance for checking the Connection support transaction.
>Because the TorqueInstance doesn't initialize yet,  it always set false even the connection support transaction.
>
>2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - init(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
>2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
>2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - initialize()
>2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
>2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - initAdapters(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
>2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - Adding mysql -> easydesk as Adapter
>2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - initDataSourceFactories(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
>2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - handle: easydesk DataSourceFactory: org.apache.torque.dsfactory.SharedPoolDataSourceFactory
>2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
>2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - Starting initCPDS
>2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
>2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@135da43, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
>2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@11a0d35, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
>2005-06-23 23:31:14,890 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, driver, org.gjt.mm.mysql.Driver)
>2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, url, jdbc:mysql://localhost:3306/easydesk?zeroDateTimeBehavior=round&useNewIO=true)
>2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, user, root)
>2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, password,  (value not logged))
>2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
>2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
>2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1015a9e, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
>2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@e8606c, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
>2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxActive, 60)
>2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxWait, 30000)
>2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, testOnBorrow, true)
>2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, timeBetweenEvictionRunsMillis, -1)
>2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, validationQuery, SELECT 1)
>2005-06-23 23:31:15,000 [main] DEBUG org.apache.torque.TorqueInstance - Adding a dummy entry for default, mapped onto easydesk
>2005-06-23 23:31:15,062 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
>2005-06-23 23:31:15,078 [main] ERROR org.apache.torque.oid.IDBroker - org.apache.torque.TorqueException: Torque is not initialized.
>2005-06-23 23:31:15,078 [main] WARN  org.apache.torque.oid.IDBroker - IDBroker is being used with db 'easydesk', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation.  Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database.
>2005-06-23 23:31:15,109 [Torque - ID Broker thread] DEBUG org.apache.torque.oid.IDBroker - IDBroker thread was started.
>2005-06-23 23:31:17,703 [main] INFO  org.apache.torque.TorqueInstance - Added Manager for Class: com.nannet.jettiger.om.JettigerUser -> com.nannet.jettiger.om.JettigerUserManager
>2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
>2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - initialize finished
>
>
>I could solved this problem by moving initialize finish flag set true 
>when after dataSourceFactory initialize not completely finished the TorqueInstance.
>
>[youngho@dev db-torque]$ cvs diff src/java/org/apache/torque/TorqueInstance.java
>Index: src/java/org/apache/torque/TorqueInstance.java
>===================================================================
>RCS file: /home/cvspublic/db-torque/src/java/org/apache/torque/TorqueInstance.java,v
>retrieving revision 1.11
>diff -r1.11 TorqueInstance.java
>149a150,151
>  
>


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


Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hello,

Here is my test result.
I added log line into initialize() method.

It looks like the torque initialize process has a problem for checking Tranasction Support or Not.
During initialize process, the IDBroker call the TorqueInstance for checking the Connection support transaction.
Because the TorqueInstance doesn't initialize yet,  it always set false even the connection support transaction.

2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - init(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - initialize()
2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - initAdapters(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - Adding mysql -> easydesk as Adapter
2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - initDataSourceFactories(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - handle: easydesk DataSourceFactory: org.apache.torque.dsfactory.SharedPoolDataSourceFactory
2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - Starting initCPDS
2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@135da43, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@11a0d35, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
2005-06-23 23:31:14,890 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, driver, org.gjt.mm.mysql.Driver)
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, url, jdbc:mysql://localhost:3306/easydesk?zeroDateTimeBehavior=round&useNewIO=true)
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, user, root)
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, password,  (value not logged))
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1015a9e, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@e8606c, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxActive, 60)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxWait, 30000)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, testOnBorrow, true)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, timeBetweenEvictionRunsMillis, -1)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, validationQuery, SELECT 1)
2005-06-23 23:31:15,000 [main] DEBUG org.apache.torque.TorqueInstance - Adding a dummy entry for default, mapped onto easydesk
2005-06-23 23:31:15,062 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:15,078 [main] ERROR org.apache.torque.oid.IDBroker - org.apache.torque.TorqueException: Torque is not initialized.
2005-06-23 23:31:15,078 [main] WARN  org.apache.torque.oid.IDBroker - IDBroker is being used with db 'easydesk', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation.  Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database.
2005-06-23 23:31:15,109 [Torque - ID Broker thread] DEBUG org.apache.torque.oid.IDBroker - IDBroker thread was started.
2005-06-23 23:31:17,703 [main] INFO  org.apache.torque.TorqueInstance - Added Manager for Class: com.nannet.jettiger.om.JettigerUser -> com.nannet.jettiger.om.JettigerUserManager
2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - initialize finished


I could solved this problem by moving initialize finish flag set true 
when after dataSourceFactory initialize not completely finished the TorqueInstance.

[youngho@dev db-torque]$ cvs diff src/java/org/apache/torque/TorqueInstance.java
Index: src/java/org/apache/torque/TorqueInstance.java
===================================================================
RCS file: /home/cvspublic/db-torque/src/java/org/apache/torque/TorqueInstance.java,v
retrieving revision 1.11
diff -r1.11 TorqueInstance.java
149a150,151
>               isInit = true;
> 
161c163
<         isInit = true;
---
>         // isInit = true;


But I am not sure what are side effects and it is right approach.
Do we need seperate initailize process like connection setup parts and internal map and manger builder parts ?

Also after the change, I got the following error runnig an application.

2005-06-24 07:00:51,359 [Thread-57] ERROR org.apache.torque.TorqueInstance - Error occured while closing connection.
java.sql.SQLException: Attempted to use Connection after closed() was called.
 at org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.assertOpen(ConnectionImpl.java:86)
 at org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.close(ConnectionImpl.java:115)
 at org.apache.torque.TorqueInstance.closeConnection(TorqueInstance.java:824)
 at org.apache.torque.Torque.closeConnection(Torque.java:300)
 at org.apache.torque.util.Transaction.rollback(Transaction.java:172)
 at org.apache.torque.util.Transaction.safeRollback(Transaction.java:195)
 at com.nannet.jettiger.om.BaseActivity.save(BaseActivity.java:1344)
 at com.nannet.jettiger.om.BaseActivity.save(BaseActivity.java:1319)


I am not sure is it also torque problem or our application problem.
Does any one has similar problem ?


----- Original Message ----- 
From: "Thomas Fischer" <fi...@seitenbau.net>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Thursday, June 23, 2005 4:39 PM
Subject: Re: MySql InnoDB question


> 
> 
> 
> 
> Hi,
> 
> I am rather sure that this will not solve the problem, as the problem is
> probably not in the IdBroker, but somewhere else.
> Usually, if you see this message, there is something wrong in the
> configuration. It would help to read the logs; if you do not have any, you
> should configure logging for your application to find the error.
> 
>      Thomas
> 
> 
> Andras Balogh <an...@reea.net> schrieb am 23.06.2005 09:02:00:
> 
> > Hello,
> >
> > How did you configured the idMethod in your schema? You don't need
> > IDBroker since mysql should
> > support auto increment primary keys so you should go with
> > idMethod="native" for tables with auto increment
> > primary key.
> >
> > Best regards,
> > Andras.
> >
> >
> > Youngho Cho wrote:
> >
> > >Hello,
> > >
> > >I read TRQ278 for InnoDB related Issue.
> > >It is about create tables and fk relations issue.
> > >In my case, when I create tables using generated sql from xml.
> > >I set SET FOREIGN_KEY_CHECKS=0; before execute the sql.
> > >Than there is no complain.
> > >
> > >My problem is I would like to use transaction but the warn report
> > said torque doesn't use transaction.
> > >I use connector/j-3.1.7 driver.
> > >Do I have to ask it to mysql driver mailling list ?
> > >How you use torque with InnoDB ?
> > >
> > >Thanks.
> > >
> > >Youngho
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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

Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hello,

Here is my test result.
I added log line into initialize() method.

It looks like the torque initialize process has a problem for checking Tranasction Support or Not.
During initialize process, the IDBroker call the TorqueInstance for checking the Connection support transaction.
Because the TorqueInstance doesn't initialize yet,  it always set false even the connection support transaction.

2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - init(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.CompositeConfiguration@1c6a99d)
2005-06-23 23:31:14,609 [main] DEBUG org.apache.torque.TorqueInstance - initialize()
2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
2005-06-23 23:31:14,625 [main] DEBUG org.apache.torque.TorqueInstance - initAdapters(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - Adding mysql -> easydesk as Adapter
2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - initDataSourceFactories(org.apache.commons.configuration.SubsetConfiguration@1a9876e)
2005-06-23 23:31:14,718 [main] DEBUG org.apache.torque.TorqueInstance - handle: easydesk DataSourceFactory: org.apache.torque.dsfactory.SharedPoolDataSourceFactory
2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:14,828 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - Starting initCPDS
2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@135da43, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
2005-06-23 23:31:14,843 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@11a0d35, org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5)
2005-06-23 23:31:14,890 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, driver, org.gjt.mm.mysql.Driver)
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, url, jdbc:mysql://localhost:3306/easydesk?zeroDateTimeBehavior=round&useNewIO=true)
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, user, root)
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@8c7be5, password,  (value not logged))
2005-06-23 23:31:14,906 [main] DEBUG org.apache.torque.dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1015a9e, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
2005-06-23 23:31:14,937 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@e8606c, org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxActive, 60)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, maxWait, 30000)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, testOnBorrow, true)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, timeBetweenEvictionRunsMillis, -1)
2005-06-23 23:31:14,984 [main] DEBUG org.apache.torque.dsfactory.AbstractDataSourceFactory - setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1e45a5c, validationQuery, SELECT 1)
2005-06-23 23:31:15,000 [main] DEBUG org.apache.torque.TorqueInstance - Adding a dummy entry for default, mapped onto easydesk
2005-06-23 23:31:15,062 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:15,078 [main] ERROR org.apache.torque.oid.IDBroker - org.apache.torque.TorqueException: Torque is not initialized.
2005-06-23 23:31:15,078 [main] WARN  org.apache.torque.oid.IDBroker - IDBroker is being used with db 'easydesk', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation.  Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database.
2005-06-23 23:31:15,109 [Torque - ID Broker thread] DEBUG org.apache.torque.oid.IDBroker - IDBroker thread was started.
2005-06-23 23:31:17,703 [main] INFO  org.apache.torque.TorqueInstance - Added Manager for Class: com.nannet.jettiger.om.JettigerUser -> com.nannet.jettiger.om.JettigerUserManager
2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@1a9876e
2005-06-23 23:31:17,781 [main] DEBUG org.apache.torque.TorqueInstance - initialize finished


I could solved this problem by moving initialize finish flag set true 
when after dataSourceFactory initialize not completely finished the TorqueInstance.

[youngho@dev db-torque]$ cvs diff src/java/org/apache/torque/TorqueInstance.java
Index: src/java/org/apache/torque/TorqueInstance.java
===================================================================
RCS file: /home/cvspublic/db-torque/src/java/org/apache/torque/TorqueInstance.java,v
retrieving revision 1.11
diff -r1.11 TorqueInstance.java
149a150,151
>               isInit = true;
> 
161c163
<         isInit = true;
---
>         // isInit = true;


But I am not sure what are side effects and it is right approach.
Do we need seperate initailize process like connection setup parts and internal map and manger builder parts ?

Also after the change, I got the following error runnig an application.

2005-06-24 07:00:51,359 [Thread-57] ERROR org.apache.torque.TorqueInstance - Error occured while closing connection.
java.sql.SQLException: Attempted to use Connection after closed() was called.
 at org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.assertOpen(ConnectionImpl.java:86)
 at org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.close(ConnectionImpl.java:115)
 at org.apache.torque.TorqueInstance.closeConnection(TorqueInstance.java:824)
 at org.apache.torque.Torque.closeConnection(Torque.java:300)
 at org.apache.torque.util.Transaction.rollback(Transaction.java:172)
 at org.apache.torque.util.Transaction.safeRollback(Transaction.java:195)
 at com.nannet.jettiger.om.BaseActivity.save(BaseActivity.java:1344)
 at com.nannet.jettiger.om.BaseActivity.save(BaseActivity.java:1319)


I am not sure is it also torque problem or our application problem.
Does any one has similar problem ?


----- Original Message ----- 
From: "Thomas Fischer" <fi...@seitenbau.net>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Thursday, June 23, 2005 4:39 PM
Subject: Re: MySql InnoDB question


> 
> 
> 
> 
> Hi,
> 
> I am rather sure that this will not solve the problem, as the problem is
> probably not in the IdBroker, but somewhere else.
> Usually, if you see this message, there is something wrong in the
> configuration. It would help to read the logs; if you do not have any, you
> should configure logging for your application to find the error.
> 
>      Thomas
> 
> 
> Andras Balogh <an...@reea.net> schrieb am 23.06.2005 09:02:00:
> 
> > Hello,
> >
> > How did you configured the idMethod in your schema? You don't need
> > IDBroker since mysql should
> > support auto increment primary keys so you should go with
> > idMethod="native" for tables with auto increment
> > primary key.
> >
> > Best regards,
> > Andras.
> >
> >
> > Youngho Cho wrote:
> >
> > >Hello,
> > >
> > >I read TRQ278 for InnoDB related Issue.
> > >It is about create tables and fk relations issue.
> > >In my case, when I create tables using generated sql from xml.
> > >I set SET FOREIGN_KEY_CHECKS=0; before execute the sql.
> > >Than there is no complain.
> > >
> > >My problem is I would like to use transaction but the warn report
> > said torque doesn't use transaction.
> > >I use connector/j-3.1.7 driver.
> > >Do I have to ask it to mysql driver mailling list ?
> > >How you use torque with InnoDB ?
> > >
> > >Thanks.
> > >
> > >Youngho
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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

Re: MySql InnoDB question

Posted by Thomas Fischer <fi...@seitenbau.net>.



Hi,

I am rather sure that this will not solve the problem, as the problem is
probably not in the IdBroker, but somewhere else.
Usually, if you see this message, there is something wrong in the
configuration. It would help to read the logs; if you do not have any, you
should configure logging for your application to find the error.

     Thomas


Andras Balogh <an...@reea.net> schrieb am 23.06.2005 09:02:00:

> Hello,
>
> How did you configured the idMethod in your schema? You don't need
> IDBroker since mysql should
> support auto increment primary keys so you should go with
> idMethod="native" for tables with auto increment
> primary key.
>
> Best regards,
> Andras.
>
>
> Youngho Cho wrote:
>
> >Hello,
> >
> >I read TRQ278 for InnoDB related Issue.
> >It is about create tables and fk relations issue.
> >In my case, when I create tables using generated sql from xml.
> >I set SET FOREIGN_KEY_CHECKS=0; before execute the sql.
> >Than there is no complain.
> >
> >My problem is I would like to use transaction but the warn report
> said torque doesn't use transaction.
> >I use connector/j-3.1.7 driver.
> >Do I have to ask it to mysql driver mailling list ?
> >How you use torque with InnoDB ?
> >
> >Thanks.
> >
> >Youngho
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> 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


Re: MySql InnoDB question

Posted by Andras Balogh <an...@reea.net>.
Hello,

How did you configured the idMethod in your schema? You don't need 
IDBroker since mysql should
support auto increment primary keys so you should go with 
idMethod="native" for tables with auto increment
primary key.

Best regards,
Andras.


Youngho Cho wrote:

>Hello,
>
>I read TRQ278 for InnoDB related Issue.
>It is about create tables and fk relations issue.
>In my case, when I create tables using generated sql from xml.
>I set SET FOREIGN_KEY_CHECKS=0; before execute the sql.
>Than there is no complain.
>
>My problem is I would like to use transaction but the warn report said torque doesn't use transaction.
>I use connector/j-3.1.7 driver.
>Do I have to ask it to mysql driver mailling list ?
>How you use torque with InnoDB ?
>
>Thanks.
>
>Youngho
>
>
>  
>


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


Re: MySql InnoDB question

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hello,

I read TRQ278 for InnoDB related Issue.
It is about create tables and fk relations issue.
In my case, when I create tables using generated sql from xml.
I set SET FOREIGN_KEY_CHECKS=0; before execute the sql.
Than there is no complain.

My problem is I would like to use transaction but the warn report said torque doesn't use transaction.
I use connector/j-3.1.7 driver.
Do I have to ask it to mysql driver mailling list ?
How you use torque with InnoDB ?

Thanks.

Youngho


----- Original Message ----- 
From: "Thomas Fischer" <fi...@seitenbau.net>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Wednesday, June 22, 2005 3:51 PM
Subject: RE: MySql InnoDB question


> 
> 
> 
> 
> Hi,
> 
> this message is usually the sign that something else is wrong. Most
> probably, Torque will not work correctly if you see this message.
> There is at least one unresolved issue with InnoDB tables, it should be in
> scarab (the issue tracker) with a ticket id between TRQS250 and TRQS300.
> Please have a look.
> 
>          Thomas
> 
> "Youngho Cho" <yo...@nannet.co.kr> schrieb am 22.06.2005 02:23:27:
> 
> > Hello,
> >
> > I am tring to use MySQL 4.1 InnoDB table type.
> > I install MySQL 4.1.12 (using InnoDB engine mode ) in Window XP and
> Torque 3.1
> > After create db with torque and changed the all table type to innoDB
> > type with mysql admin client
> >
> > But when I start the torque,
> > I got the following warn message
> >
> > 2005-06-21 18:38:48,936 [Torque - ID Broker thread] DEBUG org.
> > apache.torque.oid.IDBroker - IDBroker thread was started.
> > 2005-06-21 18:38:48,941 [main] WARN  org.apache.torque.oid.IDBroker
> > - IDBroker is being used with db 'easydesk', which does not support
> > transactions. IDBroker attempts to use transactions to limit the
> > possibility of duplicate key generation.  Without transactions,
> > duplicate key generation is possible if multiple JVMs are used or
> > other means are used to write to the database.
> >
> > I notice that when this message show, torque doesn't use transaction.
> > How do I set the torque use transaction with MySQL InnoDB type ??
> >
> > Thanks.
> >
> > Youngho
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org