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 Jim Caserta <sm...@yahoo.com> on 2005/10/04 20:26:12 UTC

org.apache.torque.TorqueException: java.lang.InstantiationException

Hi,

I'm converting from Torque 3.0 to 3.2, and I'm
accessing a DB2 database. The Torque initialization is
throwing the following exception.
org.apache.torque.TorqueException:
java.lang.InstantiationException

I'm attempting to use the DataSourceFactory. Here is
my properties file..

torque.applicationRoot = .

log4j.category.org.apache.torque = ALL,
org.apache.torque
log4j.appender.org.apache.torque =
org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file =
logs/torque.log
log4j.appender.org.apache.torque.layout =
org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern
= %d [%t] %-5p %c - %m%n
log4j.appender.org.apache.torque.append = false
torque.defaults.pool.maxWait = 10000
torque.defaults.pool.maxIdle = 8
torque.defaults.pool.maxActive = 10
torque.defaults.pool.timeBetweenEvictionRunsMillis=
300000
torque.defaults.connection.driver =
COM.ibm.db2.jdbc.app.DB2Driver
torque.defaults.connection.url = jdbc:db2:DB2B
torque.defaults.connection.user = itdmegb
torque.defaults.connection.password = chubb99

torque.database.default=DB2B
torque.database.DB2B.adapter=db2app

#Using commons-dbcp
torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory

#torque.dsfactory.DB2B.pool.maxIdle=8
#torque.dsfactory.DB2B.pool.maxActive=10
#torque.dsfactory.DB2B.pool.testOnBorrow=true
#torque.dsfactory.DB2B.pool.validationQuery=values(1) 
torque.dsfactory.DB2B.connection.driver =
COM.ibm.db2.jdbc.app.DB2Driver
torque.dsfactory.DB2B.connection.url = jdbc:db2:DB2B
torque.dsfactory.DB2B.connection.user = xxxxxxx
torque.dsfactory.DB2B.connection.password = xxxxxx
torque.idbroker.clever.quantity=true
torque.manager.useCache = true

Thank you for any suggestions,
m



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


RE: Changes Report

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



Sorry the website is a bit confusing now, but it is not at all easy to
build a decent site using maven's multiproject stuff. When I get some time,
I will try to fix this.

The changes report can be found at

http://db.apache.org/torque/releases/torque-3.2-rc2/runtime/changes-report.html

     Thomas

Jim Caserta <sm...@yahoo.com> schrieb am 06.10.2005 22:24:48:

> I'm trying to access the "Changes Report" for 3.2,
> http://db.apache.org/releases/torque-3.2-rc2/changes-report.html
>
> and the link is not working.. Is there another place I
> can access the changes and upgrades in the 3.2
> release?
>
> By the way, except for a few small issues, converting
> from 3.0 to 3.2 want very well!
>
> Thanks!
> Jim
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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


Changes Report

Posted by Jim Caserta <sm...@yahoo.com>.
I'm trying to access the "Changes Report" for 3.2,
http://db.apache.org/releases/torque-3.2-rc2/changes-report.html

and the link is not working.. Is there another place I
can access the changes and upgrades in the 3.2
release?

By the way, except for a few small issues, converting
from 3.0 to 3.2 want very well!

Thanks!
Jim


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


Re: org.apache.torque.TorqueException: java.lang.InstantiationException

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



Jim Caserta <sm...@yahoo.com> schrieb am 05.10.2005 19:50:54:

> One other thing, just to be sure, and I'll pass it
> along to all Torque users here..
>
> If anyone has:
> Torque.closeConnection(dbConn);
> Torque.shutdown();
>
> It should be replaced with:
> dbConn.close();
> dbConn = null;
>
> Correct?

Correct. Use Torque.shutdown() only when your application exits, not for
closing any connections. Torque.shutdown() closes all db pools it opens
(except the JNDI pools), so among other things, you wont be able to get any
new connections after Torque.shutdown().

    Thomas


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


Re: org.apache.torque.TorqueException: java.lang.InstantiationException

Posted by Jim Caserta <sm...@yahoo.com>.
Thomas,

That was it. thanks!! 
One other thing, just to be sure, and I'll pass it
along to all Torque users here..

If anyone has:
Torque.closeConnection(dbConn);
Torque.shutdown();

It should be replaced with:
dbConn.close();
dbConn = null;

Correct?

Jim

--- Thomas Fischer <fi...@seitenbau.net> wrote:

> 
> 
> 
> 
> 
> Jim,
> 
> look at the example given for Torque.properties in
> the tutorial I sent you
> yesterday. Replace all occurences of the word 
> "bookstore" in the _KEYS_ of
> the properties by essMarine. Set the value
> torque.database.default=essMarine
> and modify the values according to your database
> settings. Then both the
> Idbroker warning and the null pointer exception
> should go away.
> 
>       Thomas
> 
> Jim Caserta <sm...@yahoo.com> schrieb am
> 05.10.2005 16:27:22:
> 
> > Your right Henning. My apologies.. I received a
> Null
> > pointer Exception after receiving that warning,
> and I
> > thought they might be connected.
> >
> > I'm attempting to do a join using:
> > rows = BasePeer.doSelect(criteria,conn); and
> received
> >
> > java.lang.NullPointerException: There was no
> > DataSourceFactory configured for the connection
> > essMarine
> >
> > Does that sound like it might be the property
> file? I
> > checked it and all seems ok..
> >
> > Thanks,
> > Jim
> >
> > --- "Henning P. Schmiedehausen" <hp...@intermeta.de>
> > wrote:
> >
> > > Jim Caserta <sm...@yahoo.com> writes:
> > >
> > > This is not an error. That is why there is
> "WARN"
> > > written in front of
> > > it. :-)
> > >
> > > The problem mentioned in the message persists,
> > > however. You are
> > > probably using MySQL.
> > >
> > >    Best regards
> > >       Henning
> > >
> > >
> > >
> > > >Thank you,
> > >
> > > >I switched over to the SharedPool and I am
> getting
> > > >this error in my WSAD console.
> > >
> > > >IDBroker      W org.apache.torque.oid.IDBroker
> > > >IDBroker is being used with db 'essMarine',
> 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 never had this error in 3.0. The IDBroker
> class
> > > does
> > > >come with the 3.2 jar.
> > >
> > > >The reference to "essMarine" must be coming
> from
> > > the
> > > >peer classes. Each one has the following line:
> > > > public static final String DATABASE_NAME =
> > > >"essMarine";
> > > >So I'm not sure if I have my Torque propereties
> > > file
> > > >is setup incorrectly or the problem could be
> else
> > > >where..
> > >
> > > >Thanks!
> > > >Jim
> > >
> > > >--- Thomas Fischer <fi...@seitenbau.net>
> wrote:
> > >
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> Hi,
> > > >>
> > > >> you cannot use the DataSourceFactory, as it
> is
> > > only
> > > >> an interface which
> > > >> cannot be instantiated. Use
> > > >> SharedPoolDataSourceFactory instead.
> > > >>
> > > >> See also the sample configuration in the
> > > Tutorial,
> > > >>
> > > >>
> > >
> > >http://db.apache.org/torque/releases/torque-3.2-
> > rc2/runtime/tutorial/step4.html
> > > >>
> > > >>     Thomas
> > > >>
> > > >> Jim Caserta <sm...@yahoo.com> schrieb
> am
> > > >> 04.10.2005 20:26:12:
> > > >>
> > > >> > Hi,
> > > >> >
> > > >> > I'm converting from Torque 3.0 to 3.2, and
> I'm
> > > >> > accessing a DB2 database. The Torque
> > > >> initialization is
> > > >> > throwing the following exception.
> > > >> > org.apache.torque.TorqueException:
> > > >> > java.lang.InstantiationException
> > > >> >
> > > >> > I'm attempting to use the
> DataSourceFactory.
> > > Here
> > > >> is
> > > >> > my properties file..
> > > >> >
> > > >> > torque.applicationRoot = .
> > > >> >
> > > >> > log4j.category.org.apache.torque = ALL,
> > > >> > org.apache.torque
> > > >> > log4j.appender.org.apache.torque =
> > > >> > org.apache.log4j.FileAppender
> > > >> > log4j.appender.org.apache.torque.file =
> > > >> > logs/torque.log
> > > >> > log4j.appender.org.apache.torque.layout =
> > > >> > org.apache.log4j.PatternLayout
> > > >> >
> > > >>
> > >
> >
>
>log4j.appender.org.apache.torque.layout.conversionPattern
> > > >> > = %d [%t] %-5p %c - %m%n
> > > >> > log4j.appender.org.apache.torque.append =
> false
> > > >> > torque.defaults.pool.maxWait = 10000
> > > >> > torque.defaults.pool.maxIdle = 8
> > > >> > torque.defaults.pool.maxActive = 10
> > > >> >
> > > >>
> > >
> torque.defaults.pool.timeBetweenEvictionRunsMillis=
> > > >> > 300000
> > > >> > torque.defaults.connection.driver =
> > > >> > COM.ibm.db2.jdbc.app.DB2Driver
> > > >> > torque.defaults.connection.url =
> jdbc:db2:DB2B
> > > >> > torque.defaults.connection.user = itdmegb
> > > >> > torque.defaults.connection.password =
> chubb99
> > > >> >
> > > >> > torque.database.default=DB2B
> > > >> > torque.database.DB2B.adapter=db2app
> > > >> >
> > > >> > #Using commons-dbcp
> > > >> >
> > > >>
> > >
> >
>
>torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory
> 
> > > >> >
> > > >> > #torque.dsfactory.DB2B.pool.maxIdle=8
> > > >> > #torque.dsfactory.DB2B.pool.maxActive=10
> > > >> >
> #torque.dsfactory.DB2B.pool.testOnBorrow=true
> > > >> >
> > > >>
> 
=== message truncated ===



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


Re: org.apache.torque.TorqueException: java.lang.InstantiationException

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




Jim,

look at the example given for Torque.properties in the tutorial I sent you
yesterday. Replace all occurences of the word  "bookstore" in the _KEYS_ of
the properties by essMarine. Set the value
torque.database.default=essMarine
and modify the values according to your database settings. Then both the
Idbroker warning and the null pointer exception should go away.

      Thomas

Jim Caserta <sm...@yahoo.com> schrieb am 05.10.2005 16:27:22:

> Your right Henning. My apologies.. I received a Null
> pointer Exception after receiving that warning, and I
> thought they might be connected.
>
> I'm attempting to do a join using:
> rows = BasePeer.doSelect(criteria,conn); and received
>
> java.lang.NullPointerException: There was no
> DataSourceFactory configured for the connection
> essMarine
>
> Does that sound like it might be the property file? I
> checked it and all seems ok..
>
> Thanks,
> Jim
>
> --- "Henning P. Schmiedehausen" <hp...@intermeta.de>
> wrote:
>
> > Jim Caserta <sm...@yahoo.com> writes:
> >
> > This is not an error. That is why there is "WARN"
> > written in front of
> > it. :-)
> >
> > The problem mentioned in the message persists,
> > however. You are
> > probably using MySQL.
> >
> >    Best regards
> >       Henning
> >
> >
> >
> > >Thank you,
> >
> > >I switched over to the SharedPool and I am getting
> > >this error in my WSAD console.
> >
> > >IDBroker      W org.apache.torque.oid.IDBroker
> > >IDBroker is being used with db 'essMarine', 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 never had this error in 3.0. The IDBroker class
> > does
> > >come with the 3.2 jar.
> >
> > >The reference to "essMarine" must be coming from
> > the
> > >peer classes. Each one has the following line:
> > > public static final String DATABASE_NAME =
> > >"essMarine";
> > >So I'm not sure if I have my Torque propereties
> > file
> > >is setup incorrectly or the problem could be else
> > >where..
> >
> > >Thanks!
> > >Jim
> >
> > >--- Thomas Fischer <fi...@seitenbau.net> wrote:
> >
> > >>
> > >>
> > >>
> > >>
> > >> Hi,
> > >>
> > >> you cannot use the DataSourceFactory, as it is
> > only
> > >> an interface which
> > >> cannot be instantiated. Use
> > >> SharedPoolDataSourceFactory instead.
> > >>
> > >> See also the sample configuration in the
> > Tutorial,
> > >>
> > >>
> >
> >http://db.apache.org/torque/releases/torque-3.2-
> rc2/runtime/tutorial/step4.html
> > >>
> > >>     Thomas
> > >>
> > >> Jim Caserta <sm...@yahoo.com> schrieb am
> > >> 04.10.2005 20:26:12:
> > >>
> > >> > Hi,
> > >> >
> > >> > I'm converting from Torque 3.0 to 3.2, and I'm
> > >> > accessing a DB2 database. The Torque
> > >> initialization is
> > >> > throwing the following exception.
> > >> > org.apache.torque.TorqueException:
> > >> > java.lang.InstantiationException
> > >> >
> > >> > I'm attempting to use the DataSourceFactory.
> > Here
> > >> is
> > >> > my properties file..
> > >> >
> > >> > torque.applicationRoot = .
> > >> >
> > >> > log4j.category.org.apache.torque = ALL,
> > >> > org.apache.torque
> > >> > log4j.appender.org.apache.torque =
> > >> > org.apache.log4j.FileAppender
> > >> > log4j.appender.org.apache.torque.file =
> > >> > logs/torque.log
> > >> > log4j.appender.org.apache.torque.layout =
> > >> > org.apache.log4j.PatternLayout
> > >> >
> > >>
> >
> >log4j.appender.org.apache.torque.layout.conversionPattern
> > >> > = %d [%t] %-5p %c - %m%n
> > >> > log4j.appender.org.apache.torque.append = false
> > >> > torque.defaults.pool.maxWait = 10000
> > >> > torque.defaults.pool.maxIdle = 8
> > >> > torque.defaults.pool.maxActive = 10
> > >> >
> > >>
> > torque.defaults.pool.timeBetweenEvictionRunsMillis=
> > >> > 300000
> > >> > torque.defaults.connection.driver =
> > >> > COM.ibm.db2.jdbc.app.DB2Driver
> > >> > torque.defaults.connection.url = jdbc:db2:DB2B
> > >> > torque.defaults.connection.user = itdmegb
> > >> > torque.defaults.connection.password = chubb99
> > >> >
> > >> > torque.database.default=DB2B
> > >> > torque.database.DB2B.adapter=db2app
> > >> >
> > >> > #Using commons-dbcp
> > >> >
> > >>
> >
>
>torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory

> > >> >
> > >> > #torque.dsfactory.DB2B.pool.maxIdle=8
> > >> > #torque.dsfactory.DB2B.pool.maxActive=10
> > >> > #torque.dsfactory.DB2B.pool.testOnBorrow=true
> > >> >
> > >>
> >
> >#torque.dsfactory.DB2B.pool.validationQuery=values(1)
> > >> > torque.dsfactory.DB2B.connection.driver =
> > >> > COM.ibm.db2.jdbc.app.DB2Driver
> > >> > torque.dsfactory.DB2B.connection.url =
> > >> jdbc:db2:DB2B
> > >> > torque.dsfactory.DB2B.connection.user = xxxxxxx
> > >> > torque.dsfactory.DB2B.connection.password =
> > xxxxxx
> > >> > torque.idbroker.clever.quantity=true
> > >> > torque.manager.useCache = true
> > >> >
> > >> > Thank you for any suggestions,
> > >> > m
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > __________________________________
> > >> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > >> > http://mail.yahoo.com
> > >> >
> > >> >
> > >>
> >
> >---------------------------------------------------------------------
> > >> > 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
> > >>
> > >>
> >
> >
> >
> > >
> > >__________________________________
> > >Yahoo! Mail - PC Magazine Editors' Choice 2005
> > >http://mail.yahoo.com
> >
> >
> >---------------------------------------------------------------------
> > >To unsubscribe, e-mail:
> > torque-user-unsubscribe@db.apache.org
> > >For additional commands, e-mail:
> > torque-user-help@db.apache.org
> >
> > --
> > Dipl.-Inf. (Univ.) Henning P. Schmiedehausen
> >  INTERMETA GmbH
> > hps@intermeta.de        +49 9131 50 654 0
> > http://www.intermeta.de/
> >
> > RedHat Certified Engineer -- Jakarta Turbine
> > Development  -- hero for hire
> >    Linux, Java, perl, Solaris -- Consulting,
> > Training, Development
> >
> >             4 - 8 - 15 - 16 - 23 - 42
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> > torque-user-help@db.apache.org
> >
> >
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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: org.apache.torque.TorqueException: java.lang.InstantiationException

Posted by Jim Caserta <sm...@yahoo.com>.
Your right Henning. My apologies.. I received a Null
pointer Exception after receiving that warning, and I
thought they might be connected. 

I'm attempting to do a join using:
rows = BasePeer.doSelect(criteria,conn); and received

java.lang.NullPointerException: There was no
DataSourceFactory configured for the connection
essMarine 

Does that sound like it might be the property file? I
checked it and all seems ok..

Thanks,
Jim 

--- "Henning P. Schmiedehausen" <hp...@intermeta.de>
wrote:

> Jim Caserta <sm...@yahoo.com> writes:
> 
> This is not an error. That is why there is "WARN"
> written in front of
> it. :-)
> 
> The problem mentioned in the message persists,
> however. You are
> probably using MySQL.
> 
> 	Best regards
> 		Henning
> 
> 
> 
> >Thank you,
> 
> >I switched over to the SharedPool and I am getting
> >this error in my WSAD console.
> 
> >IDBroker      W org.apache.torque.oid.IDBroker 
> >IDBroker is being used with db 'essMarine', 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 never had this error in 3.0. The IDBroker class
> does
> >come with the 3.2 jar. 
> 
> >The reference to "essMarine" must be coming from
> the
> >peer classes. Each one has the following line:
> > public static final String DATABASE_NAME =
> >"essMarine"; 
> >So I'm not sure if I have my Torque propereties
> file
> >is setup incorrectly or the problem could be else
> >where..
> 
> >Thanks!
> >Jim 
> 
> >--- Thomas Fischer <fi...@seitenbau.net> wrote:
> 
> >> 
> >> 
> >> 
> >> 
> >> Hi,
> >> 
> >> you cannot use the DataSourceFactory, as it is
> only
> >> an interface which
> >> cannot be instantiated. Use
> >> SharedPoolDataSourceFactory instead.
> >> 
> >> See also the sample configuration in the
> Tutorial,
> >> 
> >>
>
>http://db.apache.org/torque/releases/torque-3.2-rc2/runtime/tutorial/step4.html
> >> 
> >>     Thomas
> >> 
> >> Jim Caserta <sm...@yahoo.com> schrieb am
> >> 04.10.2005 20:26:12:
> >> 
> >> > Hi,
> >> >
> >> > I'm converting from Torque 3.0 to 3.2, and I'm
> >> > accessing a DB2 database. The Torque
> >> initialization is
> >> > throwing the following exception.
> >> > org.apache.torque.TorqueException:
> >> > java.lang.InstantiationException
> >> >
> >> > I'm attempting to use the DataSourceFactory.
> Here
> >> is
> >> > my properties file..
> >> >
> >> > torque.applicationRoot = .
> >> >
> >> > log4j.category.org.apache.torque = ALL,
> >> > org.apache.torque
> >> > log4j.appender.org.apache.torque =
> >> > org.apache.log4j.FileAppender
> >> > log4j.appender.org.apache.torque.file =
> >> > logs/torque.log
> >> > log4j.appender.org.apache.torque.layout =
> >> > org.apache.log4j.PatternLayout
> >> >
> >>
>
>log4j.appender.org.apache.torque.layout.conversionPattern
> >> > = %d [%t] %-5p %c - %m%n
> >> > log4j.appender.org.apache.torque.append = false
> >> > torque.defaults.pool.maxWait = 10000
> >> > torque.defaults.pool.maxIdle = 8
> >> > torque.defaults.pool.maxActive = 10
> >> >
> >>
> torque.defaults.pool.timeBetweenEvictionRunsMillis=
> >> > 300000
> >> > torque.defaults.connection.driver =
> >> > COM.ibm.db2.jdbc.app.DB2Driver
> >> > torque.defaults.connection.url = jdbc:db2:DB2B
> >> > torque.defaults.connection.user = itdmegb
> >> > torque.defaults.connection.password = chubb99
> >> >
> >> > torque.database.default=DB2B
> >> > torque.database.DB2B.adapter=db2app
> >> >
> >> > #Using commons-dbcp
> >> >
> >>
>
>torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory
> >> >
> >> > #torque.dsfactory.DB2B.pool.maxIdle=8
> >> > #torque.dsfactory.DB2B.pool.maxActive=10
> >> > #torque.dsfactory.DB2B.pool.testOnBorrow=true
> >> >
> >>
>
>#torque.dsfactory.DB2B.pool.validationQuery=values(1)
> >> > torque.dsfactory.DB2B.connection.driver =
> >> > COM.ibm.db2.jdbc.app.DB2Driver
> >> > torque.dsfactory.DB2B.connection.url =
> >> jdbc:db2:DB2B
> >> > torque.dsfactory.DB2B.connection.user = xxxxxxx
> >> > torque.dsfactory.DB2B.connection.password =
> xxxxxx
> >> > torque.idbroker.clever.quantity=true
> >> > torque.manager.useCache = true
> >> >
> >> > Thank you for any suggestions,
> >> > m
> >> >
> >> >
> >> >
> >> >
> >> > __________________________________
> >> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> >> > http://mail.yahoo.com
> >> >
> >> >
> >>
>
>---------------------------------------------------------------------
> >> > 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
> >> 
> >> 
> 
> 
> 
> >		
> >__________________________________ 
> >Yahoo! Mail - PC Magazine Editors' Choice 2005 
> >http://mail.yahoo.com
> 
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> >For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> -- 
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen        
>  INTERMETA GmbH
> hps@intermeta.de        +49 9131 50 654 0  
> http://www.intermeta.de/
> 
> RedHat Certified Engineer -- Jakarta Turbine
> Development  -- hero for hire
>    Linux, Java, perl, Solaris -- Consulting,
> Training, Development
> 
> 		      4 - 8 - 15 - 16 - 23 - 42
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


Re: org.apache.torque.TorqueException: java.lang.InstantiationException

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



Hm, I am not so sure about this. I usually get it if I misconfigured
something in the runtime.

   Thomas

"Henning P. Schmiedehausen" <hp...@intermeta.de> schrieb am 05.10.2005
16:08:37:

> Jim Caserta <sm...@yahoo.com> writes:
>
> This is not an error. That is why there is "WARN" written in front of
> it. :-)
>
> The problem mentioned in the message persists, however. You are
> probably using MySQL.
>
>    Best regards
>       Henning
>
>
>
> >Thank you,
>
> >I switched over to the SharedPool and I am getting
> >this error in my WSAD console.
>
> >IDBroker      W org.apache.torque.oid.IDBroker
> >IDBroker is being used with db 'essMarine', 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 never had this error in 3.0. The IDBroker class does
> >come with the 3.2 jar.
>
> >The reference to "essMarine" must be coming from the
> >peer classes. Each one has the following line:
> > public static final String DATABASE_NAME =
> >"essMarine";
> >So I'm not sure if I have my Torque propereties file
> >is setup incorrectly or the problem could be else
> >where..
>
> >Thanks!
> >Jim
>
> >--- Thomas Fischer <fi...@seitenbau.net> wrote:
>
> >>
> >>
> >>
> >>
> >> Hi,
> >>
> >> you cannot use the DataSourceFactory, as it is only
> >> an interface which
> >> cannot be instantiated. Use
> >> SharedPoolDataSourceFactory instead.
> >>
> >> See also the sample configuration in the Tutorial,
> >>
> >>
> >http://db.apache.org/torque/releases/torque-3.2-
> rc2/runtime/tutorial/step4.html
> >>
> >>     Thomas
> >>
> >> Jim Caserta <sm...@yahoo.com> schrieb am
> >> 04.10.2005 20:26:12:
> >>
> >> > Hi,
> >> >
> >> > I'm converting from Torque 3.0 to 3.2, and I'm
> >> > accessing a DB2 database. The Torque
> >> initialization is
> >> > throwing the following exception.
> >> > org.apache.torque.TorqueException:
> >> > java.lang.InstantiationException
> >> >
> >> > I'm attempting to use the DataSourceFactory. Here
> >> is
> >> > my properties file..
> >> >
> >> > torque.applicationRoot = .
> >> >
> >> > log4j.category.org.apache.torque = ALL,
> >> > org.apache.torque
> >> > log4j.appender.org.apache.torque =
> >> > org.apache.log4j.FileAppender
> >> > log4j.appender.org.apache.torque.file =
> >> > logs/torque.log
> >> > log4j.appender.org.apache.torque.layout =
> >> > org.apache.log4j.PatternLayout
> >> >
> >>
> >log4j.appender.org.apache.torque.layout.conversionPattern
> >> > = %d [%t] %-5p %c - %m%n
> >> > log4j.appender.org.apache.torque.append = false
> >> > torque.defaults.pool.maxWait = 10000
> >> > torque.defaults.pool.maxIdle = 8
> >> > torque.defaults.pool.maxActive = 10
> >> >
> >> torque.defaults.pool.timeBetweenEvictionRunsMillis=
> >> > 300000
> >> > torque.defaults.connection.driver =
> >> > COM.ibm.db2.jdbc.app.DB2Driver
> >> > torque.defaults.connection.url = jdbc:db2:DB2B
> >> > torque.defaults.connection.user = itdmegb
> >> > torque.defaults.connection.password = chubb99
> >> >
> >> > torque.database.default=DB2B
> >> > torque.database.DB2B.adapter=db2app
> >> >
> >> > #Using commons-dbcp
> >> >
> >>
>
>torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory

> >> >
> >> > #torque.dsfactory.DB2B.pool.maxIdle=8
> >> > #torque.dsfactory.DB2B.pool.maxActive=10
> >> > #torque.dsfactory.DB2B.pool.testOnBorrow=true
> >> >
> >>
> >#torque.dsfactory.DB2B.pool.validationQuery=values(1)
> >> > torque.dsfactory.DB2B.connection.driver =
> >> > COM.ibm.db2.jdbc.app.DB2Driver
> >> > torque.dsfactory.DB2B.connection.url =
> >> jdbc:db2:DB2B
> >> > torque.dsfactory.DB2B.connection.user = xxxxxxx
> >> > torque.dsfactory.DB2B.connection.password = xxxxxx
> >> > torque.idbroker.clever.quantity=true
> >> > torque.manager.useCache = true
> >> >
> >> > Thank you for any suggestions,
> >> > m
> >> >
> >> >
> >> >
> >> >
> >> > __________________________________
> >> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> >> > http://mail.yahoo.com
> >> >
> >> >
> >>
> >---------------------------------------------------------------------
> >> > 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
> >>
> >>
>
>
>
> >
> >__________________________________
> >Yahoo! Mail - PC Magazine Editors' Choice 2005
> >http://mail.yahoo.com
>
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> >For additional commands, e-mail: torque-user-help@db.apache.org
>
> --
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
> hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/
>
> RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for
hire
>    Linux, Java, perl, Solaris -- Consulting, Training, Development
>
>             4 - 8 - 15 - 16 - 23 - 42
>
> ---------------------------------------------------------------------
> 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: org.apache.torque.TorqueException: java.lang.InstantiationException

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Jim Caserta <sm...@yahoo.com> writes:

This is not an error. That is why there is "WARN" written in front of
it. :-)

The problem mentioned in the message persists, however. You are
probably using MySQL.

	Best regards
		Henning



>Thank you,

>I switched over to the SharedPool and I am getting
>this error in my WSAD console.

>IDBroker      W org.apache.torque.oid.IDBroker 
>IDBroker is being used with db 'essMarine', 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 never had this error in 3.0. The IDBroker class does
>come with the 3.2 jar. 

>The reference to "essMarine" must be coming from the
>peer classes. Each one has the following line:
> public static final String DATABASE_NAME =
>"essMarine"; 
>So I'm not sure if I have my Torque propereties file
>is setup incorrectly or the problem could be else
>where..

>Thanks!
>Jim 

>--- Thomas Fischer <fi...@seitenbau.net> wrote:

>> 
>> 
>> 
>> 
>> Hi,
>> 
>> you cannot use the DataSourceFactory, as it is only
>> an interface which
>> cannot be instantiated. Use
>> SharedPoolDataSourceFactory instead.
>> 
>> See also the sample configuration in the Tutorial,
>> 
>>
>http://db.apache.org/torque/releases/torque-3.2-rc2/runtime/tutorial/step4.html
>> 
>>     Thomas
>> 
>> Jim Caserta <sm...@yahoo.com> schrieb am
>> 04.10.2005 20:26:12:
>> 
>> > Hi,
>> >
>> > I'm converting from Torque 3.0 to 3.2, and I'm
>> > accessing a DB2 database. The Torque
>> initialization is
>> > throwing the following exception.
>> > org.apache.torque.TorqueException:
>> > java.lang.InstantiationException
>> >
>> > I'm attempting to use the DataSourceFactory. Here
>> is
>> > my properties file..
>> >
>> > torque.applicationRoot = .
>> >
>> > log4j.category.org.apache.torque = ALL,
>> > org.apache.torque
>> > log4j.appender.org.apache.torque =
>> > org.apache.log4j.FileAppender
>> > log4j.appender.org.apache.torque.file =
>> > logs/torque.log
>> > log4j.appender.org.apache.torque.layout =
>> > org.apache.log4j.PatternLayout
>> >
>>
>log4j.appender.org.apache.torque.layout.conversionPattern
>> > = %d [%t] %-5p %c - %m%n
>> > log4j.appender.org.apache.torque.append = false
>> > torque.defaults.pool.maxWait = 10000
>> > torque.defaults.pool.maxIdle = 8
>> > torque.defaults.pool.maxActive = 10
>> >
>> torque.defaults.pool.timeBetweenEvictionRunsMillis=
>> > 300000
>> > torque.defaults.connection.driver =
>> > COM.ibm.db2.jdbc.app.DB2Driver
>> > torque.defaults.connection.url = jdbc:db2:DB2B
>> > torque.defaults.connection.user = itdmegb
>> > torque.defaults.connection.password = chubb99
>> >
>> > torque.database.default=DB2B
>> > torque.database.DB2B.adapter=db2app
>> >
>> > #Using commons-dbcp
>> >
>>
>torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory
>> >
>> > #torque.dsfactory.DB2B.pool.maxIdle=8
>> > #torque.dsfactory.DB2B.pool.maxActive=10
>> > #torque.dsfactory.DB2B.pool.testOnBorrow=true
>> >
>>
>#torque.dsfactory.DB2B.pool.validationQuery=values(1)
>> > torque.dsfactory.DB2B.connection.driver =
>> > COM.ibm.db2.jdbc.app.DB2Driver
>> > torque.dsfactory.DB2B.connection.url =
>> jdbc:db2:DB2B
>> > torque.dsfactory.DB2B.connection.user = xxxxxxx
>> > torque.dsfactory.DB2B.connection.password = xxxxxx
>> > torque.idbroker.clever.quantity=true
>> > torque.manager.useCache = true
>> >
>> > Thank you for any suggestions,
>> > m
>> >
>> >
>> >
>> >
>> > __________________________________
>> > Yahoo! Mail - PC Magazine Editors' Choice 2005
>> > http://mail.yahoo.com
>> >
>> >
>>
>---------------------------------------------------------------------
>> > 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
>> 
>> 



>		
>__________________________________ 
>Yahoo! Mail - PC Magazine Editors' Choice 2005 
>http://mail.yahoo.com

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

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

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


RE: org.apache.torque.TorqueException: java.lang.InstantiationException

Posted by Jim Caserta <sm...@yahoo.com>.
Thank you,

I switched over to the SharedPool and I am getting
this error in my WSAD console.

IDBroker      W org.apache.torque.oid.IDBroker 
IDBroker is being used with db 'essMarine', 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 never had this error in 3.0. The IDBroker class does
come with the 3.2 jar. 

The reference to "essMarine" must be coming from the
peer classes. Each one has the following line:
 public static final String DATABASE_NAME =
"essMarine"; 
So I'm not sure if I have my Torque propereties file
is setup incorrectly or the problem could be else
where..

Thanks!
Jim 

--- Thomas Fischer <fi...@seitenbau.net> wrote:

> 
> 
> 
> 
> Hi,
> 
> you cannot use the DataSourceFactory, as it is only
> an interface which
> cannot be instantiated. Use
> SharedPoolDataSourceFactory instead.
> 
> See also the sample configuration in the Tutorial,
> 
>
http://db.apache.org/torque/releases/torque-3.2-rc2/runtime/tutorial/step4.html
> 
>     Thomas
> 
> Jim Caserta <sm...@yahoo.com> schrieb am
> 04.10.2005 20:26:12:
> 
> > Hi,
> >
> > I'm converting from Torque 3.0 to 3.2, and I'm
> > accessing a DB2 database. The Torque
> initialization is
> > throwing the following exception.
> > org.apache.torque.TorqueException:
> > java.lang.InstantiationException
> >
> > I'm attempting to use the DataSourceFactory. Here
> is
> > my properties file..
> >
> > torque.applicationRoot = .
> >
> > log4j.category.org.apache.torque = ALL,
> > org.apache.torque
> > log4j.appender.org.apache.torque =
> > org.apache.log4j.FileAppender
> > log4j.appender.org.apache.torque.file =
> > logs/torque.log
> > log4j.appender.org.apache.torque.layout =
> > org.apache.log4j.PatternLayout
> >
>
log4j.appender.org.apache.torque.layout.conversionPattern
> > = %d [%t] %-5p %c - %m%n
> > log4j.appender.org.apache.torque.append = false
> > torque.defaults.pool.maxWait = 10000
> > torque.defaults.pool.maxIdle = 8
> > torque.defaults.pool.maxActive = 10
> >
> torque.defaults.pool.timeBetweenEvictionRunsMillis=
> > 300000
> > torque.defaults.connection.driver =
> > COM.ibm.db2.jdbc.app.DB2Driver
> > torque.defaults.connection.url = jdbc:db2:DB2B
> > torque.defaults.connection.user = itdmegb
> > torque.defaults.connection.password = chubb99
> >
> > torque.database.default=DB2B
> > torque.database.DB2B.adapter=db2app
> >
> > #Using commons-dbcp
> >
>
torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory
> >
> > #torque.dsfactory.DB2B.pool.maxIdle=8
> > #torque.dsfactory.DB2B.pool.maxActive=10
> > #torque.dsfactory.DB2B.pool.testOnBorrow=true
> >
>
#torque.dsfactory.DB2B.pool.validationQuery=values(1)
> > torque.dsfactory.DB2B.connection.driver =
> > COM.ibm.db2.jdbc.app.DB2Driver
> > torque.dsfactory.DB2B.connection.url =
> jdbc:db2:DB2B
> > torque.dsfactory.DB2B.connection.user = xxxxxxx
> > torque.dsfactory.DB2B.connection.password = xxxxxx
> > torque.idbroker.clever.quantity=true
> > torque.manager.useCache = true
> >
> > Thank you for any suggestions,
> > m
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > 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
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


RE: org.apache.torque.TorqueException: java.lang.InstantiationException

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



Hi,

you cannot use the DataSourceFactory, as it is only an interface which
cannot be instantiated. Use SharedPoolDataSourceFactory instead.

See also the sample configuration in the Tutorial,

http://db.apache.org/torque/releases/torque-3.2-rc2/runtime/tutorial/step4.html

    Thomas

Jim Caserta <sm...@yahoo.com> schrieb am 04.10.2005 20:26:12:

> Hi,
>
> I'm converting from Torque 3.0 to 3.2, and I'm
> accessing a DB2 database. The Torque initialization is
> throwing the following exception.
> org.apache.torque.TorqueException:
> java.lang.InstantiationException
>
> I'm attempting to use the DataSourceFactory. Here is
> my properties file..
>
> torque.applicationRoot = .
>
> log4j.category.org.apache.torque = ALL,
> org.apache.torque
> log4j.appender.org.apache.torque =
> org.apache.log4j.FileAppender
> log4j.appender.org.apache.torque.file =
> logs/torque.log
> log4j.appender.org.apache.torque.layout =
> org.apache.log4j.PatternLayout
> log4j.appender.org.apache.torque.layout.conversionPattern
> = %d [%t] %-5p %c - %m%n
> log4j.appender.org.apache.torque.append = false
> torque.defaults.pool.maxWait = 10000
> torque.defaults.pool.maxIdle = 8
> torque.defaults.pool.maxActive = 10
> torque.defaults.pool.timeBetweenEvictionRunsMillis=
> 300000
> torque.defaults.connection.driver =
> COM.ibm.db2.jdbc.app.DB2Driver
> torque.defaults.connection.url = jdbc:db2:DB2B
> torque.defaults.connection.user = itdmegb
> torque.defaults.connection.password = chubb99
>
> torque.database.default=DB2B
> torque.database.DB2B.adapter=db2app
>
> #Using commons-dbcp
>
torque.dsfactory.DB2B.factory=org.apache.torque.dsfactory.DataSourceFactory
>
> #torque.dsfactory.DB2B.pool.maxIdle=8
> #torque.dsfactory.DB2B.pool.maxActive=10
> #torque.dsfactory.DB2B.pool.testOnBorrow=true
> #torque.dsfactory.DB2B.pool.validationQuery=values(1)
> torque.dsfactory.DB2B.connection.driver =
> COM.ibm.db2.jdbc.app.DB2Driver
> torque.dsfactory.DB2B.connection.url = jdbc:db2:DB2B
> torque.dsfactory.DB2B.connection.user = xxxxxxx
> torque.dsfactory.DB2B.connection.password = xxxxxx
> torque.idbroker.clever.quantity=true
> torque.manager.useCache = true
>
> Thank you for any suggestions,
> m
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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