10x
it works now !
there was also a small mistake in my code
on .save();
i used
.save("somename");
the "somename" should've been a DB name
and i was using the table name which was wrong !
anyway, 10x again !
Catalin Constantin
Bounce Software
www.bounce-software.com
>
> -----Original Message-----
> From: Ashley Hayes [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 29, 2003 1:32 PM
> To: 'Apache Torque Users List'
>
> your original email stated this was in your web.xml:
> <resource-ref>
> <description>DB Connection</description>
> <res-ref-name>java:comp/env/jdbc/ksi</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
>
> my res-ref-name in the web.xml does not include the
> java:comp/env/ prefix
> e.g.
> <resource-ref>
> <description>PPI datasource</description>
> <res-ref-name>jdbc/ppi</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
>
>
> if this does not fix the problem, I suggest testing that
> tomcat and the web
> app are definitely setup
> correctly by looking up the datasource and doing a query with
> JDBC code,
> then go back and check your
> Torque.properties ....
>
> -----Original Message-----
> From: Catalin Constantin [mailto:[EMAIL PROTECTED]
> Sent: 29 August 2003 11:08
> To: 'Apache Torque Users List'
> Subject: RE: torque webapp dbcp pool
>
>
> k
> did the change but still the same.
>
> after init i get also some warning:
>
> Aug 29, 2003 1:04:17 PM org.apache.torque.oid.IDBroker <init>
> WARNING: IDBroker is being used with db 'default', which does
> not support
> transa
> ctions. IDBroker attempts to use transactions to limit the
> possibility of
> duplic
> ate key generation. Without transactions, duplicate key generation is
> possible
> if multiple JVMs are used or other means are used to write to
> the database.
>
> the, the same !
>
> java.lang.NullPointerException: There was no
> DataSourceFactory configured
> for the connection user_password
> at
> org.apache.torque.TorqueInstance.getConnection(TorqueInstance.
> java:749)
> at org.apache.torque.Torque.getConnection(Torque.java:306)
> at
> org.apache.torque.util.Transaction.beginOptional(Transaction.java:118)
> at
> org.apache.torque.util.Transaction.begin(Transaction.java:100)
> at
> ro.dazoot.ksi.db.torque.BaseUserPassword.save(BaseUserPassword
> .java:1497)
> ......
>
>
> my Torque.properties is now:
> torque.database.default=ksi
>
> torque.database.ksi.adapter=postgresql
>
> # Jndi location
> torque.dsfactory.ksi.jndi.path=java:comp/env/jdbc/ksi
> torque.dsfactory.ksi.factory=org.apache.torque.dsfactory.JndiD
> ataSourceFacto
> ry
> torque.idbroker.clever.quantity=false
> torque.idbroker.prefetch=true
>
> still not working !
>
> any clue ?
>
> Catalin Constantin
> Bounce Software
> www.bounce-software.com
>
>
> >
> > -----Original Message-----
> > From: Ashley Hayes [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 29, 2003 12:53 PM
> > To: 'Apache Torque Users List'
> >
> > this is my jndi path line,
> > torque.dsfactory.ppi.jndi.path=java:comp/env/jdbc/ppi
> >
> > it does not have a "/" before comp
> > java:/comp/env/jdbc/ksi
> >
> > -----Original Message-----
> > From: Catalin Constantin [mailto:[EMAIL PROTECTED]
> > Sent: 29 August 2003 10:47
> > To: 'Apache Torque Users List'
> > Subject: RE: torque webapp dbcp pool
> >
> >
> > i have added it now but still the same error:
> >
> > torque.database.ksi.adapter=postgresql
> >
> > # Jndi location
> > torque.dsfactory.ksi.jndi.path=java:/comp/env/jdbc/ksi
> > torque.dsfactory.ksi.factory=org.apache.torque.dsfactory.JndiD
> > ataSourceFacto
> > ry
> > torque.idbroker.clever.quantity=false
> > torque.idbroker.prefetch=true
> >
> >
> > what else can it be ?
> >
> > btw: do i have to add something that is here:
> > http://db.apache.org/torque/configuration-howto.html
> >
> > in my server.xml file
> > or web.xml file ?
> >
> > eg:
> > something like this:
> > <Resource name="jdbc/ScarabDB" auth="Container"
> > type="org.apache.torque.pool.TorqueClassicDataSource"/>
> > <ResourceParams name="jdbc/bookstore">
> > <parameter>
> > <name>factory</name>
> > <value>org.apache.torque.pool.TorqueClassicDataSource</value>
> > </parameter>
> > <parameter>
> >
> > <name>dataSourceName</name><value>java:comp/env/jdbc/DBbooksto
> > re</value>
> > </parameter>
> > <parameter>
> > <name>defaultMaxConnections</name><value>30</value>
> > </parameter>
> > <parameter>
> > <name>maxExpiryTime</name><value>3600</value>
> > </parameter>
> > <parameter>
> > <name>connectionWaitTimeout</name><value>10</value>
> > </parameter>
> > <parameter>
> > <name>logInterval</name><value>0</value>
> > </parameter>
> >
> > </ResourceParams>
> >
> > in server.xml
> > and
> >
> > <resource-ref>
> > <description>
> > Resource reference to a factory for java.sql.Connection
> > instances that may be used for talking to a particular
> > database that is configured in the server.xml file.
> > </description>
> > <res-ref-name>
> > jdbc/bookstore
> > </res-ref-name>
> > <res-type>
> > org.apache.torque.pool.TorqueClassicDataSource
> > </res-type>
> > <res-auth>
> > Container
> > </res-auth>
> > </resource-ref>
> >
> > in web.xml ?
> >
> > 10x !
> >
> > Catalin Constantin
> > Bounce Software
> > www.bounce-software.com
> >
> >
> > >
> > > -----Original Message-----
> > > From: Ashley Hayes [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, August 29, 2003 12:32 PM
> > > To: 'Apache Torque Users List'
> > >
> > > have you got this line:
> > > torque.dsfactory.ksi.factory=org.apache.torque.dsfactory.JndiD
> > > ataSourceFacto
> > > ry
> > > ?
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]