db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hansen <steve.han...@sinex.com>
Subject RE: Pb with dbcp
Date Thu, 13 Nov 2003 14:53:52 GMT
Please see comments inline...
On Thu, 2003-11-13 at 02:37, Amine Bousta wrote:
> Thank you very much :)
> 
> In fact I had two kind of errors :
> 1. Properties initialisations gave me warnings
> 2. Tomcat cannot instantiate MapBuilder
> 
> For the first problem you solved, I'd be very happy if you could send me
> your Torque.properties or an exemple.
The following is simply comment out the invalid property
#torque.defaults.pool.logInterval = 0

This example is changing the syntax of a property to accommodate
commons-dbcp.  The java-doc I referred to earlier was commons-dbcp NOT
Torque.
#torque.defaults.pool.defaultMaxConnections = 80 	// old syntax 
torque.defaults.pool.maxActive = 80

> I'm surprised that the Torque Properties file given by Torque 3.1 is wrong
> but may be 3.1 is not stable yet.

I have not researched enough to declare this to be a bug. From what the 
java-docs reveal it seems to be an out of date properties file with defaults that do not
work with the 'new' commons-dbcp. I've used Torque 3.0rc1 in a project
for over 8 months and found it quite solid code, my understanding of
however is sometimes unstable ;-)

> For the second problem, I fixed it by moving my dbcp jars from common/lib
> into WEB-INF/lib !
> Then I decided to move all of my jars from common/lib into web-inf/lib.
> And now, even if I get warnings still about properties initialisation,
> everything works! Strange...
> 
> Do you know if there are rules to respect with jars location in Tomcat to
> make Torque work?
> Because now, I have a lot of jars in common/lib, web-inf/lib and Torque/lib
> (for generation). Everything seems unorganized and unstable to me...
I'm about to cover these very areas myself.  My new project is hosted on Tomcat 4.1xx.
There has been much discussion of Tomcat & Torque on this list and I
think we'll be able to sort it out quickly.  I plan on putting my run
time jars for Torque in my Web application lib folder (web-inf/lib). 
There is no need to put the torque-gen jars into your web application.
 
> Thanks
> Amine
> 
> 
> -----Message d'origine-----
> De : Steve Hansen [mailto:steve.hansen@sinex.com]
> Envoyé : jeudi 13 novembre 2003 03:58
> À : Apache Torque Users List
> Objet : Re: Pb with dbcp
> 
> 
> Hello Amine,
> 
> I've been working on a similar error.  I've used Torque 3.0 now I have a
> new project so I'm setting up 3.1.  In the Torque.properties I decided
> to set up the suggested commons-dpcp. I used the Default section, filled
> in my driver, jdbc and login info and came up with the error you
> describe.
> 
> Then I went to the Java-Doc for SharedPoolDataSource and there is no
> property logInterval!  I removed that part of the default and one of the
> errors were removed. I had a error referring to defaultMaxConnections
> and changed it to maxActive (this is in the Java-doc).  I set my Log4j
> level to debug and I can see that the SharedPoolDataSource is happy with
> these changes..
> 
> hth
> 
> On Wed, 2003-11-12 at 08:42, Amine Bousta wrote:
> >
> > Hello
> >
> > I'm trying to make Torque working with Tomcat.
> > It seems I have a pb with the pool manager because I can't do a "save()".
> > When I try to do that, Tomcat logs a lot of debugs.
> > It says :
> > GRAVE: property: logInterval value: 0 is not supported byDataSource:
> > org.apache.commons.dbcp.datasources.SharedUserPoolDataSource
> >
> > I have this error for all of my Torque properties!
> >
> > Then I have a ClassNotFoundException because BasePeer.MapBuilder failed
> > trying to instantiate my torque.map.AgentMapBuilder (Agent is one of my
> > torque objects).
> >
> > It's been hours and hours I try to find a workaround. I didn't find
> anything
> > on the net about it.
> >
> > The strangest thing is that I have another project on the same tomcat and
> > this one works!
> > I put the commons-dbcp jar on common/lib... Does it have a relation
> between
> > this and my pb?
> > Do you think I may have a buggy dbcp jar??
> >
> > If anybody could help I'd be very happy !!
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
> --
> Steve Hansen
> Solutions Engineer
> Sinex Aviation Technologies
> steve.hansen@sinex.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
> 
> 
-- 
Steve Hansen
Solutions Engineer
Sinex Aviation Technologies
steve.hansen@sinex.com


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


Mime
View raw message