<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>torque-user@db.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/db-torque-user/"/>
<id>http://mail-archives.apache.org/mod_mbox/db-torque-user/</id>
<updated>2009-12-08T11:26:08Z</updated>
<entry>
<title>Re: no suitable driver</title>
<author><name>Thomas Vandahl &lt;tv@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c4B1A992B.4010509@apache.org%3e"/>
<id>urn:uuid:%3c4B1A992B-4010509@apache-org%3e</id>
<updated>2009-12-05T17:32:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Angela Day wrote:
&gt; Thomas,
&gt; Thank you so much for the tip on the xml syntax.  That got rid of the no suitable driver
and all other errors.  No I just get a 404 in the browser when I try to bring up the application.
 The example tomcat servlets all work.  It is never getting to my application because I put
debug statements into the very first and nothing.  Any ideas for why tomcat would just 404
me without getting to the application?

Well this depends a lot on what your application actually does and not
much on Torque. But let's have a look at your web.xml. Last time it
didn't make it to the list.

Bye, Thomas.


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c754053.33380.qm@web33301.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c754053-33380-qm@web33301-mail-mud-yahoo-com%3e</id>
<updated>2009-12-04T16:21:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thomas,
Thank you so much for the tip on the xml syntax.  That got rid of the no suitable driver and
all other errors.  No I just get a 404 in the browser when I try to bring up the application. 
The example tomcat servlets all work.  It is never getting to my application because I put
debug statements into the very first and nothing.  Any ideas for why tomcat would just 404
me without getting to the application?
Thanks,

 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: Thomas Vandahl &lt;tv@apache.org&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Thu, December 3, 2009 2:18:52 PM
Subject: Re: no suitable driver

Angela Day wrote:
&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM org.apache.catalina.core.StandardContext
loadOnStartup
...
&gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt;          &lt;/parameter&gt;

This doesn't fit. The Tomcat 6.0 configuration uses attributes instead
of ResourceParams elements to configure a data source. See
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
for examples.

The problem usually arises if the web application has no access to the
configured data source. Let's see your Torque.properties and the web.xml
of your application, please.

Bye, Thomas.

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

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c291859.26348.qm@web33301.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c291859-26348-qm@web33301-mail-mud-yahoo-com%3e</id>
<updated>2009-12-03T20:28:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Attached you will find the web.xml and build-torque.properties files.  Thanks so much for your
help.

Thanks,
 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: Thomas Vandahl &lt;tv@apache.org&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Thu, December 3, 2009 2:18:52 PM
Subject: Re: no suitable driver

Angela Day wrote:
&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM org.apache.catalina.core.StandardContext
loadOnStartup
...
&gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt;          &lt;/parameter&gt;

This doesn't fit. The Tomcat 6.0 configuration uses attributes instead
of ResourceParams elements to configure a data source. See
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
for examples.

The problem usually arises if the web application has no access to the
configured data source. Let's see your Torque.properties and the web.xml
of your application, please.

Bye, Thomas.

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

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Thomas Vandahl &lt;tv@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c4B181D2C.9080106@apache.org%3e"/>
<id>urn:uuid:%3c4B181D2C-9080106@apache-org%3e</id>
<updated>2009-12-03T20:18:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Angela Day wrote:
&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM org.apache.catalina.core.StandardContext
loadOnStartup
...
&gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt;          &lt;/parameter&gt;

This doesn't fit. The Tomcat 6.0 configuration uses attributes instead
of ResourceParams elements to configure a data source. See
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
for examples.

The problem usually arises if the web application has no access to the
configured data source. Let's see your Torque.properties and the web.xml
of your application, please.

Bye, Thomas.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Alvaro Coronel &lt;alvarocoronel67@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c53771.1348.qm@web50801.mail.re2.yahoo.com%3e"/>
<id>urn:uuid:%3c53771-1348-qm@web50801-mail-re2-yahoo-com%3e</id>
<updated>2009-12-02T22:56:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Angela, how about trying with other database/driver just to check your config?

I have had "ClassNotFoundException" when a .jar was _twice_ in the classpath. You might want
to check that too.

Troubleshooting this kind of error is like trying to hit a "Piñata", isn't it? Good luck!

Álvaro Coronel.



________________________________
From: Angela Day &lt;akcday@yahoo.com&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Wed, December 2, 2009 8:05:09 PM
Subject: Re: no suitable driver

Yes, there were significant changes.  I had to merge the old server.xml with the new version
of 3.3 server.xml, so I am not sure my new server.xml file is correct.  I do have the gen
jar in place and get the same error.
 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: "wzhao6898@gmail.com" &lt;wzhao6898@gmail.com&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Wed, December 2, 2009 3:38:58 PM
Subject: Re: no suitable driver

There may have been many syntax changes in Torque 3.3 from Torque 1.0, you
may want to look into this.
I think you need to specify database server and user/password information in
the "build.properties" file (at least in our set up).
Try to download the torque-3.3-gen package, and run a ant -f
build-torque.xml jdbc or something similar with you existing
build.properties file in the same directory to see if you can get this task
to run successfully (ant -f build-torque.xml jdbc generates the schema.xml
from your database).
Good luck,

David

On Wed, Dec 2, 2009 at 1:15 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:

&gt; It is an existing database and application that I am upgrading from Torque
&gt; 1.0 and JDK1.4, so I am pretty sure the database is setup right.  Do you
&gt; have something in mind?
&gt;
&gt; Thanks,
&gt;
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt;
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; ________________________________
&gt; From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
&gt; To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
&gt; Sent: Wed, December 2, 2009 2:49:49 PM
&gt; Subject: Re: no suitable driver
&gt;
&gt; What about your build.properties file? I'd try to do a " ant -f
&gt; build-torque.XML jdbc" or some other ant task tomake sure the database is
&gt; set up right.
&gt;
&gt; David
&gt;
&gt; On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:
&gt;
&gt; &gt; I am going crazy with a problem I have had for a few days now.  It seems
&gt; so simple, but I cannot solve the problem.  Any help would be appreciated. I
&gt; have ojdbc14.jar in the classpath for the env variable path and in the
&gt; build-torque.xml file.  I am using java 1.5 and torque 3.3 and eclipse 3.5.1
&gt; and velocity 1.5
&gt; &gt;
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt; &gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt; &gt; INFO: Initialization processed in 1960 ms
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt; &gt; INFO: Starting service Catalina
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt; &gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM
&gt; org.apache.catalina.core.StandardContext loadOnStartup
&gt; &gt; SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
&gt; &gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt; &gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt; &gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt; &gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; &gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; &gt; at org.apache.torque.Torque.getConnection(
&gt; &gt; at tdhca.torque.CurrentConnection.getConnection(
&gt; &gt; at tdhca.maverick.Dispatcher.initTorque(
&gt; &gt; at tdhca.maverick.Dispatcher.init(
&gt; &gt; at javax.servlet.GenericServlet.init(
&gt; &gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt; &gt; at org.apache.catalina.core.StandardWrapper.load(
&gt; &gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt; &gt; at org.apache.catalina.core.StandardContext.start(
&gt; &gt; at org.apache.catalina.core.ContainerBase.start(
&gt; &gt; at org.apache.catalina.core.StandardHost.start(
&gt; &gt; at org.apache.catalina.core.ContainerBase.start(
&gt; &gt; at org.apache.catalina.core.StandardEngine.start(
&gt; &gt; at org.apache.catalina.core.StandardService.start(
&gt; &gt; at org.apache.catalina.core.StandardServer.start(
&gt; &gt; at org.apache.catalina.startup.Catalina.start(
&gt; &gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt; &gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt; &gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt; &gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt; &gt; at org.apache.catalina.startup.Bootstrap.start(
&gt; &gt; at org.apache.catalina.startup.Bootstrap.main(
&gt; &gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: Use of the properties initialization parameter 'properties' has
&gt; been deprecated by 'org.apache.velocity.properties'
&gt; &gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: ContextListener: contextInitialized()
&gt; &gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: SessionListener: contextInitialized()
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt; &gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt; &gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt; &gt; INFO: Jk running ID=0 time=0/125 config=null
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt; &gt; INFO: Server startup in 4885 ms: No suitable
&gt; driverBasicDataSource.java:1143)BasicDataSource.java:880)TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300)CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307)GenericServlet.java:212)StandardWrapper.java:1173)StandardWrapper.java:993)StandardContext.java:4149)StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java:443)StandardService.java:516)StandardServer.java:710)Catalina.java:583)Native
&gt; Method)Bootstrap.java:288)Bootstrap.java:413)
&gt; &gt;
&gt; &gt; Server.xml
&gt; &gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &gt; &lt;!--
&gt; &gt;  Licensed to the Apache Software Foundation (ASF) under one or more
&gt; &gt;  contributor license agreements.  See the NOTICE file distributed with
&gt; &gt;  this work for additional information regarding copyright ownership.
&gt; &gt;  The ASF licenses this file to You under the Apache License, Version 2.0
&gt; &gt;  (the "License"); you may not use this file except in compliance with
&gt; &gt;  the License.  You may obtain a copy of the License at
&gt; &gt;      http://www.apache.org/licenses/LICENSE-2.0
&gt; &gt;  Unless required by applicable law or agreed to in writing, software
&gt; &gt;  distributed under the License is distributed on an "AS IS" BASIS,
&gt; &gt;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
&gt; &gt;  See the License for the specific language governing permissions and
&gt; &gt;  limitations under the License.
&gt; &gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt; &gt;      define subcomponents such as "Valves" at this level.
&gt; &gt;      Documentation at /docs/config/server.html
&gt; &gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt; &gt;  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt; &gt;  &lt;Listener SSLEngine="on"
&gt; className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt; &gt;  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at
&gt; /docs/jasper-howto.html --&gt;
&gt; &gt;  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt; &gt;  &lt;!-- JMX Support for the Tomcat server. Documentation at
&gt; /docs/non-existent.html --&gt;
&gt; &gt;  &lt;Listener
&gt; className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt; &gt;  &lt;Listener
&gt; className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt; &gt;  &lt;!-- Global JNDI resources
&gt; &gt;        Documentation at /docs/jndi-resources-howto.html
&gt; &gt;  --&gt;
&gt; &gt;  &lt;GlobalNamingResources&gt;
&gt; &gt;    &lt;!-- Editable user database that can also be used by
&gt; &gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt; &gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt; &gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String"
&gt; value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt; &gt; &lt;Environment name="cmts-url"            value="
&gt; http://localhost:8080/aims2/aims" type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String"
&gt; value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties"/&gt;
&gt; &gt; &lt;Environment name="cdb-url"              value="
&gt; http://localhost:8080/alligator"  type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="liarRealm"            value="tdhca.liar.ReniRealm"
&gt;        type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="tdhca.liar.useDomain" value="false"
&gt;        type="java.lang.String" /&gt;
&gt; &gt; &lt;Environment name="tdhca.liar.hashSalt"
&gt; value="23049mdx903lzd93jag9845a0gjsscvm" type="java.lang.String"/&gt;
&gt; &gt;
&gt; &gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt; &gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;factory&lt;/name&gt;
&gt; &gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt; &gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;url&lt;/name&gt;
&gt; &gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us:1521
&gt; :dev&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;username&lt;/name&gt;
&gt; &gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;password&lt;/name&gt;
&gt; &gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt; &gt;            &lt;value&gt;10&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt; &gt;            &lt;value&gt;5&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;!-- time to wait for a connection before giving up in
&gt; milliseconds --&gt;
&gt; &gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt; &gt;            &lt;value&gt;10000&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt; &gt;            &lt;value&gt;true&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt; &gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;        &lt;/ResourceParams&gt;
&gt; &gt;    &lt;Resource auth="Container" description="User database that can be
&gt; updated and saved"
&gt; factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
&gt; name="UserDatabase" pathname="conf/tomcat-users.xml"
&gt; type="org.apache.catalina.UserDatabase"/&gt;
&gt; &gt;  &lt;/GlobalNamingResources&gt;
&gt; &gt;  &lt;!-- A "Service" is a collection of one or more "Connectors" that share
&gt; &gt;        a single "Container" Note:  A "Service" is not itself a
&gt; "Container",
&gt; &gt;        so you may not define subcomponents such as "Valves" at this
&gt; level.
&gt; &gt;        Documentation at /docs/config/service.html
&gt; &gt;    --&gt;
&gt; &gt;  &lt;Service name="Catalina"&gt;
&gt; &gt;
&gt; &gt;    &lt;!--The connectors can use a shared executor, you can define one or
&gt; more named thread pools--&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt; &gt;        maxThreads="150" minSpareThreads="4"/&gt;
&gt; &gt;    --&gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;    &lt;!-- A "Connector" represents an endpoint by which requests are
&gt; received
&gt; &gt;          and responses are returned. Documentation at :
&gt; &gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp;
&gt; non-blocking)
&gt; &gt;          Java AJP  Connector: /docs/config/ajp.html
&gt; &gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt; &gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt; &gt;    --&gt;
&gt; &gt;    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
&gt; redirectPort="8443"/&gt;
&gt; &gt;    &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Connector executor="tomcatThreadPool"
&gt; &gt;                port="8080" protocol="HTTP/1.1"
&gt; &gt;                connectionTimeout="20000"
&gt; &gt;                redirectPort="8443" /&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt; &gt;          This connector uses the JSSE configuration, when using APR, the
&gt; &gt;          connector should be using the OpenSSL style configuration
&gt; &gt;          described in the APR documentation --&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt; &gt;                maxThreads="150" scheme="https" secure="true"
&gt; &gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt; &gt;    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt; &gt;
&gt; &gt;    &lt;!-- An Engine represents the entry point (within Catalina) that
&gt; processes
&gt; &gt;          every request.  The Engine implementation for Tomcat stand alone
&gt; &gt;          analyzes the HTTP headers included with the request, and passes
&gt; them
&gt; &gt;          on to the appropriate Host (virtual host).
&gt; &gt;          Documentation at /docs/config/engine.html --&gt;
&gt; &gt;    &lt;!-- You should set jvmRoute to support load-balancing via AJP ie :
&gt; &gt;    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt; &gt;      &lt;!--For clustering, please take a look at documentation at:
&gt; &gt;          /docs/cluster-howto.html  (simple how to)
&gt; &gt;          /docs/config/cluster.html (reference documentation) --&gt;
&gt; &gt;      &lt;!--
&gt; &gt;      &lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt; &gt;      --&gt;
&gt; &gt;      &lt;!-- The request dumper valve dumps useful debugging information
&gt; about
&gt; &gt;            the request and response data received and sent by Tomcat.
&gt; &gt;            Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;      &lt;!--
&gt; &gt;      &lt;Valve className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt; &gt;      --&gt;
&gt; &gt;      &lt;!-- This Realm uses the UserDatabase configured in the global JNDI
&gt; &gt;            resources under the key "UserDatabase".  Any edits
&gt; &gt;            that are performed against this UserDatabase are immediately
&gt; &gt;            available for use by the Realm.  --&gt;
&gt; &gt;      &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm"
&gt; resourceName="UserDatabase"/&gt;
&gt; &gt;      &lt;!-- Define the default virtual host
&gt; &gt;            Note: XML Schema validation will not work with Xerces 2.2.
&gt; &gt;        --&gt;
&gt; &gt;      &lt;Host appBase="webapps" autoDeploy="true" name="localhost"
&gt; unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt; &gt;        &lt;!-- SingleSignOn valve, share authentication between web
&gt; applications
&gt; &gt;              Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;        &lt;!--
&gt; &gt;        &lt;Valve className="org.apache.catalina.authenticator.SingleSignOn"
&gt; /&gt;
&gt; &gt;        --&gt;
&gt; &gt;        &lt;!-- Access log processes all example.
&gt; &gt;              Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;        &lt;!--
&gt; &gt;        &lt;Valve className="org.apache.catalina.valves.AccessLogValve"
&gt; directory="logs"
&gt; &gt;                prefix="localhost_access_log." suffix=".txt"
&gt; pattern="common" resolveHosts="false"/&gt;
&gt; &gt;        --&gt;
&gt; &gt;        &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt; &gt;                  directory="logs"  prefix="localhost_log." suffix=".txt"
&gt; &gt;          timestamp="true"/&gt;
&gt; &gt;
&gt; &gt; &lt;Context path="/alligator" docBase="alligator" debug="0"
&gt; reloadable="true" crossContext="true"&gt;
&gt; &gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt; &gt; &lt;ResourceLink name="tdhca.liar.useDomain" global="tdhca.liar.useDomain"/&gt;
&gt; &gt; &lt;ResourceLink name="tdhca.liar.hashSalt" global="tdhca.liar.hashSalt"/&gt;
&gt; &gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt; &gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt; &gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt; &gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"
&gt; type="javax.sql.DataSource" /&gt;
&gt; &gt; &lt;Environment name="serverName" type="java.lang.String" value="contract"/&gt;
&gt; &gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt; &gt; &lt;ResourceLink name="contractPropertiesFile"
&gt; global="contractPropertiesFile"/&gt;
&gt; &gt; &lt;/Context&gt;
&gt; &gt;
&gt; &gt;      &lt;/Host&gt;
&gt; &gt;    &lt;/Engine&gt;
&gt; &gt;  &lt;/Service&gt;
&gt; &gt; &lt;/Server&gt;
&gt; &gt;
&gt; &gt; Thanks for your help.
&gt; &gt;
&gt; &gt; Angela Day
&gt; &gt; National Autism Association of Central Texas
&gt; &gt;
&gt; &gt; http://www.naacentraltexas.org
&gt; &gt; formally FEAT Austin
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org



      

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c2623.68374.qm@web33304.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c2623-68374-qm@web33304-mail-mud-yahoo-com%3e</id>
<updated>2009-12-02T22:05:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Yes, there were significant changes.  I had to merge the old server.xml with the new version
of 3.3 server.xml, so I am not sure my new server.xml file is correct.  I do have the gen
jar in place and get the same error.
 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: "wzhao6898@gmail.com" &lt;wzhao6898@gmail.com&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Wed, December 2, 2009 3:38:58 PM
Subject: Re: no suitable driver

There may have been many syntax changes in Torque 3.3 from Torque 1.0, you
may want to look into this.
I think you need to specify database server and user/password information in
the "build.properties" file (at least in our set up).
Try to download the torque-3.3-gen package, and run a ant -f
build-torque.xml jdbc or something similar with you existing
build.properties file in the same directory to see if you can get this task
to run successfully (ant -f build-torque.xml jdbc generates the schema.xml
from your database).
Good luck,

David

On Wed, Dec 2, 2009 at 1:15 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:

&gt; It is an existing database and application that I am upgrading from Torque
&gt; 1.0 and JDK1.4, so I am pretty sure the database is setup right.  Do you
&gt; have something in mind?
&gt;
&gt; Thanks,
&gt;
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt;
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; ________________________________
&gt; From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
&gt; To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
&gt; Sent: Wed, December 2, 2009 2:49:49 PM
&gt; Subject: Re: no suitable driver
&gt;
&gt; What about your build.properties file? I'd try to do a " ant -f
&gt; build-torque.XML jdbc" or some other ant task tomake sure the database is
&gt; set up right.
&gt;
&gt; David
&gt;
&gt; On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:
&gt;
&gt; &gt; I am going crazy with a problem I have had for a few days now.  It seems
&gt; so simple, but I cannot solve the problem.  Any help would be appreciated. I
&gt; have ojdbc14.jar in the classpath for the env variable path and in the
&gt; build-torque.xml file.  I am using java 1.5 and torque 3.3 and eclipse 3.5.1
&gt; and velocity 1.5
&gt; &gt;
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt; &gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt; &gt; INFO: Initialization processed in 1960 ms
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt; &gt; INFO: Starting service Catalina
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt; &gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM
&gt; org.apache.catalina.core.StandardContext loadOnStartup
&gt; &gt; SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
&gt; &gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt; &gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt; &gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt; &gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; &gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; &gt; at org.apache.torque.Torque.getConnection(
&gt; &gt; at tdhca.torque.CurrentConnection.getConnection(
&gt; &gt; at tdhca.maverick.Dispatcher.initTorque(
&gt; &gt; at tdhca.maverick.Dispatcher.init(
&gt; &gt; at javax.servlet.GenericServlet.init(
&gt; &gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt; &gt; at org.apache.catalina.core.StandardWrapper.load(
&gt; &gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt; &gt; at org.apache.catalina.core.StandardContext.start(
&gt; &gt; at org.apache.catalina.core.ContainerBase.start(
&gt; &gt; at org.apache.catalina.core.StandardHost.start(
&gt; &gt; at org.apache.catalina.core.ContainerBase.start(
&gt; &gt; at org.apache.catalina.core.StandardEngine.start(
&gt; &gt; at org.apache.catalina.core.StandardService.start(
&gt; &gt; at org.apache.catalina.core.StandardServer.start(
&gt; &gt; at org.apache.catalina.startup.Catalina.start(
&gt; &gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt; &gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt; &gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt; &gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt; &gt; at org.apache.catalina.startup.Bootstrap.start(
&gt; &gt; at org.apache.catalina.startup.Bootstrap.main(
&gt; &gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: Use of the properties initialization parameter 'properties' has
&gt; been deprecated by 'org.apache.velocity.properties'
&gt; &gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: ContextListener: contextInitialized()
&gt; &gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: SessionListener: contextInitialized()
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt; &gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt; &gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt; &gt; INFO: Jk running ID=0 time=0/125 config=null
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt; &gt; INFO: Server startup in 4885 ms: No suitable
&gt; driverBasicDataSource.java:1143)BasicDataSource.java:880)TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300)CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307)GenericServlet.java:212)StandardWrapper.java:1173)StandardWrapper.java:993)StandardContext.java:4149)StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java:443)StandardService.java:516)StandardServer.java:710)Catalina.java:583)Native
&gt; Method)Bootstrap.java:288)Bootstrap.java:413)
&gt; &gt;
&gt; &gt; Server.xml
&gt; &gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &gt; &lt;!--
&gt; &gt;  Licensed to the Apache Software Foundation (ASF) under one or more
&gt; &gt;  contributor license agreements.  See the NOTICE file distributed with
&gt; &gt;  this work for additional information regarding copyright ownership.
&gt; &gt;  The ASF licenses this file to You under the Apache License, Version 2.0
&gt; &gt;  (the "License"); you may not use this file except in compliance with
&gt; &gt;  the License.  You may obtain a copy of the License at
&gt; &gt;      http://www.apache.org/licenses/LICENSE-2.0
&gt; &gt;  Unless required by applicable law or agreed to in writing, software
&gt; &gt;  distributed under the License is distributed on an "AS IS" BASIS,
&gt; &gt;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
&gt; &gt;  See the License for the specific language governing permissions and
&gt; &gt;  limitations under the License.
&gt; &gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt; &gt;      define subcomponents such as "Valves" at this level.
&gt; &gt;      Documentation at /docs/config/server.html
&gt; &gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt; &gt;  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt; &gt;  &lt;Listener SSLEngine="on"
&gt; className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt; &gt;  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at
&gt; /docs/jasper-howto.html --&gt;
&gt; &gt;  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt; &gt;  &lt;!-- JMX Support for the Tomcat server. Documentation at
&gt; /docs/non-existent.html --&gt;
&gt; &gt;  &lt;Listener
&gt; className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt; &gt;  &lt;Listener
&gt; className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt; &gt;  &lt;!-- Global JNDI resources
&gt; &gt;        Documentation at /docs/jndi-resources-howto.html
&gt; &gt;  --&gt;
&gt; &gt;  &lt;GlobalNamingResources&gt;
&gt; &gt;    &lt;!-- Editable user database that can also be used by
&gt; &gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt; &gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt; &gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String"
&gt; value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt; &gt; &lt;Environment name="cmts-url"            value="
&gt; http://localhost:8080/aims2/aims" type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String"
&gt; value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties"/&gt;
&gt; &gt; &lt;Environment name="cdb-url"              value="
&gt; http://localhost:8080/alligator"  type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="liarRealm"            value="tdhca.liar.ReniRealm"
&gt;        type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="tdhca.liar.useDomain" value="false"
&gt;        type="java.lang.String" /&gt;
&gt; &gt; &lt;Environment name="tdhca.liar.hashSalt"
&gt; value="23049mdx903lzd93jag9845a0gjsscvm" type="java.lang.String"/&gt;
&gt; &gt;
&gt; &gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt; &gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;factory&lt;/name&gt;
&gt; &gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt; &gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;url&lt;/name&gt;
&gt; &gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us:1521
&gt; :dev&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;username&lt;/name&gt;
&gt; &gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;password&lt;/name&gt;
&gt; &gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt; &gt;            &lt;value&gt;10&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt; &gt;            &lt;value&gt;5&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;!-- time to wait for a connection before giving up in
&gt; milliseconds --&gt;
&gt; &gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt; &gt;            &lt;value&gt;10000&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt; &gt;            &lt;value&gt;true&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt; &gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;        &lt;/ResourceParams&gt;
&gt; &gt;    &lt;Resource auth="Container" description="User database that can be
&gt; updated and saved"
&gt; factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
&gt; name="UserDatabase" pathname="conf/tomcat-users.xml"
&gt; type="org.apache.catalina.UserDatabase"/&gt;
&gt; &gt;  &lt;/GlobalNamingResources&gt;
&gt; &gt;  &lt;!-- A "Service" is a collection of one or more "Connectors" that share
&gt; &gt;        a single "Container" Note:  A "Service" is not itself a
&gt; "Container",
&gt; &gt;        so you may not define subcomponents such as "Valves" at this
&gt; level.
&gt; &gt;        Documentation at /docs/config/service.html
&gt; &gt;    --&gt;
&gt; &gt;  &lt;Service name="Catalina"&gt;
&gt; &gt;
&gt; &gt;    &lt;!--The connectors can use a shared executor, you can define one or
&gt; more named thread pools--&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt; &gt;        maxThreads="150" minSpareThreads="4"/&gt;
&gt; &gt;    --&gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;    &lt;!-- A "Connector" represents an endpoint by which requests are
&gt; received
&gt; &gt;          and responses are returned. Documentation at :
&gt; &gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp;
&gt; non-blocking)
&gt; &gt;          Java AJP  Connector: /docs/config/ajp.html
&gt; &gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt; &gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt; &gt;    --&gt;
&gt; &gt;    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
&gt; redirectPort="8443"/&gt;
&gt; &gt;    &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Connector executor="tomcatThreadPool"
&gt; &gt;                port="8080" protocol="HTTP/1.1"
&gt; &gt;                connectionTimeout="20000"
&gt; &gt;                redirectPort="8443" /&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt; &gt;          This connector uses the JSSE configuration, when using APR, the
&gt; &gt;          connector should be using the OpenSSL style configuration
&gt; &gt;          described in the APR documentation --&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt; &gt;                maxThreads="150" scheme="https" secure="true"
&gt; &gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt; &gt;    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt; &gt;
&gt; &gt;    &lt;!-- An Engine represents the entry point (within Catalina) that
&gt; processes
&gt; &gt;          every request.  The Engine implementation for Tomcat stand alone
&gt; &gt;          analyzes the HTTP headers included with the request, and passes
&gt; them
&gt; &gt;          on to the appropriate Host (virtual host).
&gt; &gt;          Documentation at /docs/config/engine.html --&gt;
&gt; &gt;    &lt;!-- You should set jvmRoute to support load-balancing via AJP ie :
&gt; &gt;    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt; &gt;      &lt;!--For clustering, please take a look at documentation at:
&gt; &gt;          /docs/cluster-howto.html  (simple how to)
&gt; &gt;          /docs/config/cluster.html (reference documentation) --&gt;
&gt; &gt;      &lt;!--
&gt; &gt;      &lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt; &gt;      --&gt;
&gt; &gt;      &lt;!-- The request dumper valve dumps useful debugging information
&gt; about
&gt; &gt;            the request and response data received and sent by Tomcat.
&gt; &gt;            Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;      &lt;!--
&gt; &gt;      &lt;Valve className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt; &gt;      --&gt;
&gt; &gt;      &lt;!-- This Realm uses the UserDatabase configured in the global JNDI
&gt; &gt;            resources under the key "UserDatabase".  Any edits
&gt; &gt;            that are performed against this UserDatabase are immediately
&gt; &gt;            available for use by the Realm.  --&gt;
&gt; &gt;      &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm"
&gt; resourceName="UserDatabase"/&gt;
&gt; &gt;      &lt;!-- Define the default virtual host
&gt; &gt;            Note: XML Schema validation will not work with Xerces 2.2.
&gt; &gt;        --&gt;
&gt; &gt;      &lt;Host appBase="webapps" autoDeploy="true" name="localhost"
&gt; unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt; &gt;        &lt;!-- SingleSignOn valve, share authentication between web
&gt; applications
&gt; &gt;              Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;        &lt;!--
&gt; &gt;        &lt;Valve className="org.apache.catalina.authenticator.SingleSignOn"
&gt; /&gt;
&gt; &gt;        --&gt;
&gt; &gt;        &lt;!-- Access log processes all example.
&gt; &gt;              Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;        &lt;!--
&gt; &gt;        &lt;Valve className="org.apache.catalina.valves.AccessLogValve"
&gt; directory="logs"
&gt; &gt;                prefix="localhost_access_log." suffix=".txt"
&gt; pattern="common" resolveHosts="false"/&gt;
&gt; &gt;        --&gt;
&gt; &gt;        &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt; &gt;                  directory="logs"  prefix="localhost_log." suffix=".txt"
&gt; &gt;          timestamp="true"/&gt;
&gt; &gt;
&gt; &gt; &lt;Context path="/alligator" docBase="alligator" debug="0"
&gt; reloadable="true" crossContext="true"&gt;
&gt; &gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt; &gt; &lt;ResourceLink name="tdhca.liar.useDomain" global="tdhca.liar.useDomain"/&gt;
&gt; &gt; &lt;ResourceLink name="tdhca.liar.hashSalt" global="tdhca.liar.hashSalt"/&gt;
&gt; &gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt; &gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt; &gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt; &gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"
&gt; type="javax.sql.DataSource" /&gt;
&gt; &gt; &lt;Environment name="serverName" type="java.lang.String" value="contract"/&gt;
&gt; &gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt; &gt; &lt;ResourceLink name="contractPropertiesFile"
&gt; global="contractPropertiesFile"/&gt;
&gt; &gt; &lt;/Context&gt;
&gt; &gt;
&gt; &gt;      &lt;/Host&gt;
&gt; &gt;    &lt;/Engine&gt;
&gt; &gt;  &lt;/Service&gt;
&gt; &gt; &lt;/Server&gt;
&gt; &gt;
&gt; &gt; Thanks for your help.
&gt; &gt;
&gt; &gt; Angela Day
&gt; &gt; National Autism Association of Central Texas
&gt; &gt;
&gt; &gt; http://www.naacentraltexas.org
&gt; &gt; formally FEAT Austin
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>&quot;wzhao6898@gmail.com&quot; &lt;wzhao6898@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c4d036f890912021338j4b69307fifccf511664e9ca44@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4d036f890912021338j4b69307fifccf511664e9ca44@mail-gmail-com%3e</id>
<updated>2009-12-02T21:38:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
There may have been many syntax changes in Torque 3.3 from Torque 1.0, you
may want to look into this.
I think you need to specify database server and user/password information in
the "build.properties" file (at least in our set up).
Try to download the torque-3.3-gen package, and run a ant -f
build-torque.xml jdbc or something similar with you existing
build.properties file in the same directory to see if you can get this task
to run successfully (ant -f build-torque.xml jdbc generates the schema.xml
from your database).
Good luck,

David

On Wed, Dec 2, 2009 at 1:15 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:

&gt; It is an existing database and application that I am upgrading from Torque
&gt; 1.0 and JDK1.4, so I am pretty sure the database is setup right.  Do you
&gt; have something in mind?
&gt;
&gt; Thanks,
&gt;
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt;
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; ________________________________
&gt; From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
&gt; To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
&gt; Sent: Wed, December 2, 2009 2:49:49 PM
&gt; Subject: Re: no suitable driver
&gt;
&gt; What about your build.properties file? I'd try to do a " ant -f
&gt; build-torque.XML jdbc" or some other ant task tomake sure the database is
&gt; set up right.
&gt;
&gt; David
&gt;
&gt; On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:
&gt;
&gt; &gt; I am going crazy with a problem I have had for a few days now.  It seems
&gt; so simple, but I cannot solve the problem.  Any help would be appreciated. I
&gt; have ojdbc14.jar in the classpath for the env variable path and in the
&gt; build-torque.xml file.  I am using java 1.5 and torque 3.3 and eclipse 3.5.1
&gt; and velocity 1.5
&gt; &gt;
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt; &gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt; &gt; INFO: Initialization processed in 1960 ms
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt; &gt; INFO: Starting service Catalina
&gt; &gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt; &gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM
&gt; org.apache.catalina.core.StandardContext loadOnStartup
&gt; &gt; SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
&gt; &gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt; &gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt; &gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt; &gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; &gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; &gt; at org.apache.torque.Torque.getConnection(
&gt; &gt; at tdhca.torque.CurrentConnection.getConnection(
&gt; &gt; at tdhca.maverick.Dispatcher.initTorque(
&gt; &gt; at tdhca.maverick.Dispatcher.init(
&gt; &gt; at javax.servlet.GenericServlet.init(
&gt; &gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt; &gt; at org.apache.catalina.core.StandardWrapper.load(
&gt; &gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt; &gt; at org.apache.catalina.core.StandardContext.start(
&gt; &gt; at org.apache.catalina.core.ContainerBase.start(
&gt; &gt; at org.apache.catalina.core.StandardHost.start(
&gt; &gt; at org.apache.catalina.core.ContainerBase.start(
&gt; &gt; at org.apache.catalina.core.StandardEngine.start(
&gt; &gt; at org.apache.catalina.core.StandardService.start(
&gt; &gt; at org.apache.catalina.core.StandardServer.start(
&gt; &gt; at org.apache.catalina.startup.Catalina.start(
&gt; &gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt; &gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt; &gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt; &gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt; &gt; at org.apache.catalina.startup.Bootstrap.start(
&gt; &gt; at org.apache.catalina.startup.Bootstrap.main(
&gt; &gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: Use of the properties initialization parameter 'properties' has
&gt; been deprecated by 'org.apache.velocity.properties'
&gt; &gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: ContextListener: contextInitialized()
&gt; &gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; &gt; INFO: SessionListener: contextInitialized()
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt; &gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt; &gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt; &gt; INFO: Jk running ID=0 time=0/125 config=null
&gt; &gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt; &gt; INFO: Server startup in 4885 ms: No suitable
&gt; driverBasicDataSource.java:1143)BasicDataSource.java:880)TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300)CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307)GenericServlet.java:212)StandardWrapper.java:1173)StandardWrapper.java:993)StandardContext.java:4149)StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java:443)StandardService.java:516)StandardServer.java:710)Catalina.java:583)Native
&gt; Method)Bootstrap.java:288)Bootstrap.java:413)
&gt; &gt;
&gt; &gt; Server.xml
&gt; &gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &gt; &lt;!--
&gt; &gt;  Licensed to the Apache Software Foundation (ASF) under one or more
&gt; &gt;  contributor license agreements.  See the NOTICE file distributed with
&gt; &gt;  this work for additional information regarding copyright ownership.
&gt; &gt;  The ASF licenses this file to You under the Apache License, Version 2.0
&gt; &gt;  (the "License"); you may not use this file except in compliance with
&gt; &gt;  the License.  You may obtain a copy of the License at
&gt; &gt;      http://www.apache.org/licenses/LICENSE-2.0
&gt; &gt;  Unless required by applicable law or agreed to in writing, software
&gt; &gt;  distributed under the License is distributed on an "AS IS" BASIS,
&gt; &gt;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
&gt; &gt;  See the License for the specific language governing permissions and
&gt; &gt;  limitations under the License.
&gt; &gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt; &gt;      define subcomponents such as "Valves" at this level.
&gt; &gt;      Documentation at /docs/config/server.html
&gt; &gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt; &gt;  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt; &gt;  &lt;Listener SSLEngine="on"
&gt; className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt; &gt;  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at
&gt; /docs/jasper-howto.html --&gt;
&gt; &gt;  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt; &gt;  &lt;!-- JMX Support for the Tomcat server. Documentation at
&gt; /docs/non-existent.html --&gt;
&gt; &gt;  &lt;Listener
&gt; className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt; &gt;  &lt;Listener
&gt; className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt; &gt;  &lt;!-- Global JNDI resources
&gt; &gt;        Documentation at /docs/jndi-resources-howto.html
&gt; &gt;  --&gt;
&gt; &gt;  &lt;GlobalNamingResources&gt;
&gt; &gt;    &lt;!-- Editable user database that can also be used by
&gt; &gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt; &gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt; &gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String"
&gt; value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt; &gt; &lt;Environment name="cmts-url"            value="
&gt; http://localhost:8080/aims2/aims" type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String"
&gt; value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties"/&gt;
&gt; &gt; &lt;Environment name="cdb-url"              value="
&gt; http://localhost:8080/alligator"  type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="liarRealm"            value="tdhca.liar.ReniRealm"
&gt;         type="java.lang.String"/&gt;
&gt; &gt; &lt;Environment name="tdhca.liar.useDomain" value="false"
&gt;         type="java.lang.String" /&gt;
&gt; &gt; &lt;Environment name="tdhca.liar.hashSalt"
&gt; value="23049mdx903lzd93jag9845a0gjsscvm" type="java.lang.String"/&gt;
&gt; &gt;
&gt; &gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt; &gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;factory&lt;/name&gt;
&gt; &gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt; &gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;url&lt;/name&gt;
&gt; &gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us:1521
&gt; :dev&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;username&lt;/name&gt;
&gt; &gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;password&lt;/name&gt;
&gt; &gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt; &gt;            &lt;value&gt;10&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt; &gt;            &lt;value&gt;5&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;!-- time to wait for a connection before giving up in
&gt; milliseconds --&gt;
&gt; &gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt; &gt;            &lt;value&gt;10000&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt; &gt;            &lt;value&gt;true&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;          &lt;parameter&gt;
&gt; &gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt; &gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt; &gt;          &lt;/parameter&gt;
&gt; &gt;        &lt;/ResourceParams&gt;
&gt; &gt;    &lt;Resource auth="Container" description="User database that can be
&gt; updated and saved"
&gt; factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
&gt; name="UserDatabase" pathname="conf/tomcat-users.xml"
&gt; type="org.apache.catalina.UserDatabase"/&gt;
&gt; &gt;  &lt;/GlobalNamingResources&gt;
&gt; &gt;  &lt;!-- A "Service" is a collection of one or more "Connectors" that share
&gt; &gt;        a single "Container" Note:  A "Service" is not itself a
&gt; "Container",
&gt; &gt;        so you may not define subcomponents such as "Valves" at this
&gt; level.
&gt; &gt;        Documentation at /docs/config/service.html
&gt; &gt;    --&gt;
&gt; &gt;  &lt;Service name="Catalina"&gt;
&gt; &gt;
&gt; &gt;    &lt;!--The connectors can use a shared executor, you can define one or
&gt; more named thread pools--&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt; &gt;        maxThreads="150" minSpareThreads="4"/&gt;
&gt; &gt;    --&gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;    &lt;!-- A "Connector" represents an endpoint by which requests are
&gt; received
&gt; &gt;          and responses are returned. Documentation at :
&gt; &gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp;
&gt; non-blocking)
&gt; &gt;          Java AJP  Connector: /docs/config/ajp.html
&gt; &gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt; &gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt; &gt;    --&gt;
&gt; &gt;    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
&gt; redirectPort="8443"/&gt;
&gt; &gt;    &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Connector executor="tomcatThreadPool"
&gt; &gt;                port="8080" protocol="HTTP/1.1"
&gt; &gt;                connectionTimeout="20000"
&gt; &gt;                redirectPort="8443" /&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt; &gt;          This connector uses the JSSE configuration, when using APR, the
&gt; &gt;          connector should be using the OpenSSL style configuration
&gt; &gt;          described in the APR documentation --&gt;
&gt; &gt;    &lt;!--
&gt; &gt;    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt; &gt;                maxThreads="150" scheme="https" secure="true"
&gt; &gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt; &gt;    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt; &gt;
&gt; &gt;    &lt;!-- An Engine represents the entry point (within Catalina) that
&gt; processes
&gt; &gt;          every request.  The Engine implementation for Tomcat stand alone
&gt; &gt;          analyzes the HTTP headers included with the request, and passes
&gt; them
&gt; &gt;          on to the appropriate Host (virtual host).
&gt; &gt;          Documentation at /docs/config/engine.html --&gt;
&gt; &gt;    &lt;!-- You should set jvmRoute to support load-balancing via AJP ie :
&gt; &gt;    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt; &gt;    --&gt;
&gt; &gt;    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt; &gt;      &lt;!--For clustering, please take a look at documentation at:
&gt; &gt;          /docs/cluster-howto.html  (simple how to)
&gt; &gt;          /docs/config/cluster.html (reference documentation) --&gt;
&gt; &gt;      &lt;!--
&gt; &gt;      &lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt; &gt;      --&gt;
&gt; &gt;      &lt;!-- The request dumper valve dumps useful debugging information
&gt; about
&gt; &gt;            the request and response data received and sent by Tomcat.
&gt; &gt;            Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;      &lt;!--
&gt; &gt;      &lt;Valve className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt; &gt;      --&gt;
&gt; &gt;      &lt;!-- This Realm uses the UserDatabase configured in the global JNDI
&gt; &gt;            resources under the key "UserDatabase".  Any edits
&gt; &gt;            that are performed against this UserDatabase are immediately
&gt; &gt;            available for use by the Realm.  --&gt;
&gt; &gt;      &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm"
&gt; resourceName="UserDatabase"/&gt;
&gt; &gt;      &lt;!-- Define the default virtual host
&gt; &gt;            Note: XML Schema validation will not work with Xerces 2.2.
&gt; &gt;        --&gt;
&gt; &gt;      &lt;Host appBase="webapps" autoDeploy="true" name="localhost"
&gt; unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt; &gt;        &lt;!-- SingleSignOn valve, share authentication between web
&gt; applications
&gt; &gt;              Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;        &lt;!--
&gt; &gt;        &lt;Valve className="org.apache.catalina.authenticator.SingleSignOn"
&gt; /&gt;
&gt; &gt;        --&gt;
&gt; &gt;        &lt;!-- Access log processes all example.
&gt; &gt;              Documentation at: /docs/config/valve.html --&gt;
&gt; &gt;        &lt;!--
&gt; &gt;        &lt;Valve className="org.apache.catalina.valves.AccessLogValve"
&gt; directory="logs"
&gt; &gt;                prefix="localhost_access_log." suffix=".txt"
&gt; pattern="common" resolveHosts="false"/&gt;
&gt; &gt;        --&gt;
&gt; &gt;        &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt; &gt;                  directory="logs"  prefix="localhost_log." suffix=".txt"
&gt; &gt;          timestamp="true"/&gt;
&gt; &gt;
&gt; &gt; &lt;Context path="/alligator" docBase="alligator" debug="0"
&gt; reloadable="true" crossContext="true"&gt;
&gt; &gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt; &gt; &lt;ResourceLink name="tdhca.liar.useDomain" global="tdhca.liar.useDomain"/&gt;
&gt; &gt; &lt;ResourceLink name="tdhca.liar.hashSalt" global="tdhca.liar.hashSalt"/&gt;
&gt; &gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt; &gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt; &gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt; &gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"
&gt; type="javax.sql.DataSource" /&gt;
&gt; &gt; &lt;Environment name="serverName" type="java.lang.String" value="contract"/&gt;
&gt; &gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt; &gt; &lt;ResourceLink name="contractPropertiesFile"
&gt; global="contractPropertiesFile"/&gt;
&gt; &gt; &lt;/Context&gt;
&gt; &gt;
&gt; &gt;      &lt;/Host&gt;
&gt; &gt;    &lt;/Engine&gt;
&gt; &gt;  &lt;/Service&gt;
&gt; &gt; &lt;/Server&gt;
&gt; &gt;
&gt; &gt; Thanks for your help.
&gt; &gt;
&gt; &gt; Angela Day
&gt; &gt; National Autism Association of Central Texas
&gt; &gt;
&gt; &gt; http://www.naacentraltexas.org
&gt; &gt; formally FEAT Austin
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c674201.60600.qm@web33308.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c674201-60600-qm@web33308-mail-mud-yahoo-com%3e</id>
<updated>2009-12-02T21:33:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
That is what it seems like, but why?  I haven't a clue.
 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: Apache Lists &lt;apache@rodentia.net&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Wed, December 2, 2009 3:22:50 PM
Subject: Re: no suitable driver

&gt; C:\workspace\contract\build-torque.XML:347: java.lang.ClassNotFoundException: ${torque.database.driver}

This looks a little odd to me - I'd expect to see a classname here. Is the property name not
getting replaced with the value for some reason?

On Dec 2, 2009, at 1:17 PM, Angela Day wrote:

&gt; This is what I got, which is essentially the same error:
&gt; 
&gt; C:\workspace\contract&gt;ant -f build-torque.XML jdbc
&gt; Buildfile: build-torque.XML
&gt; jdbc:
&gt;      [echo] +-----------------------------------------------+
&gt;      [echo] |                                              |
&gt;      [echo] | Generating XML from JDBC connection !        |
&gt;      [echo] | Woo hoo!                                      |
&gt;      [echo] |                                              |
&gt;      [echo] +-----------------------------------------------+
&gt; [torque-jdbc-transform] Torque - JDBCToXMLSchema starting
&gt; [torque-jdbc-transform] Your DB settings are:
&gt; [torque-jdbc-transform] driver : ${torque.database.driver}
&gt; [torque-jdbc-transform] URL : ${torque.database.url}
&gt; [torque-jdbc-transform] user : ${torque.database.user}
&gt; [torque-jdbc-transform] schema : ${torque.database.schema}
&gt; BUILD FAILED
&gt; C:\workspace\contract\build-torque.XML:347: java.lang.ClassNotFoundException: ${
&gt; torque.database.driver}
&gt; 
&gt; Any ideas what this means?
&gt; 
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt; 
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; ________________________________
&gt; From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
&gt; To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
&gt; Sent: Wed, December 2, 2009 2:49:49 PM
&gt; Subject: Re: no suitable driver
&gt; 
&gt; What about your build.properties file? I'd try to do a " ant -f build-torque.XML jdbc"
or some other ant task tomake sure the database is set up right.
&gt; 
&gt; David
&gt; 
&gt; On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:
&gt; 
&gt;&gt; I am going crazy with a problem I have had for a few days now.  It seems so simple,
but I cannot solve the problem.  Any help would be appreciated. I have ojdbc14.jar in the
classpath for the env variable path and in the build-torque.xml file.  I am using java 1.5
and torque 3.3 and eclipse 3.5.1 and velocity 1.5
&gt;&gt; 
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt;&gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt;&gt; INFO: Initialization processed in 1960 ms
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt;&gt; INFO: Starting service Catalina
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt;&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM org.apache.catalina.core.StandardContext
loadOnStartup
&gt;&gt; SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
&gt;&gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt;&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt;&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt;&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt;&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt;&gt; at org.apache.torque.Torque.getConnection(
&gt;&gt; at tdhca.torque.CurrentConnection.getConnection(
&gt;&gt; at tdhca.maverick.Dispatcher.initTorque(
&gt;&gt; at tdhca.maverick.Dispatcher.init(
&gt;&gt; at javax.servlet.GenericServlet.init(
&gt;&gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt;&gt; at org.apache.catalina.core.StandardWrapper.load(
&gt;&gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt;&gt; at org.apache.catalina.core.StandardContext.start(
&gt;&gt; at org.apache.catalina.core.ContainerBase.start(
&gt;&gt; at org.apache.catalina.core.StandardHost.start(
&gt;&gt; at org.apache.catalina.core.ContainerBase.start(
&gt;&gt; at org.apache.catalina.core.StandardEngine.start(
&gt;&gt; at org.apache.catalina.core.StandardService.start(
&gt;&gt; at org.apache.catalina.core.StandardServer.start(
&gt;&gt; at org.apache.catalina.startup.Catalina.start(
&gt;&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt;&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt;&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt;&gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt;&gt; at org.apache.catalina.startup.Bootstrap.start(
&gt;&gt; at org.apache.catalina.startup.Bootstrap.main(
&gt;&gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
&gt;&gt; INFO: Use of the properties initialization parameter 'properties' has been deprecated
by 'org.apache.velocity.properties'
&gt;&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt;&gt; INFO: ContextListener: contextInitialized()
&gt;&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt;&gt; INFO: SessionListener: contextInitialized()
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt;&gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt;&gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt;&gt; INFO: Jk running ID=0 time=0/125 config=null
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt;&gt; INFO: Server startup in 4885 ms: No suitable driverBasicDataSource.java:1143)BasicDataSource.java:880)TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300)CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307)GenericServlet.java:212)StandardWrapper.java:1173)StandardWrapper.java:993)StandardContext.java:4149)StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java:443)StandardService.java:516)StandardServer.java:710)Catalina.java:583)Native
Method)Bootstrap.java:288)Bootstrap.java:413)
&gt;&gt; 
&gt;&gt; Server.xml
&gt;&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt;&gt; &lt;!--
&gt;&gt;  Licensed to the Apache Software Foundation (ASF) under one or more
&gt;&gt;  contributor license agreements.  See the NOTICE file distributed with
&gt;&gt;  this work for additional information regarding copyright ownership.
&gt;&gt;  The ASF licenses this file to You under the Apache License, Version 2.0
&gt;&gt;  (the "License"); you may not use this file except in compliance with
&gt;&gt;  the License.  You may obtain a copy of the License at
&gt;&gt;      http://www.apache.org/licenses/LICENSE-2.0
&gt;&gt;  Unless required by applicable law or agreed to in writing, software
&gt;&gt;  distributed under the License is distributed on an "AS IS" BASIS,
&gt;&gt;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
&gt;&gt;  See the License for the specific language governing permissions and
&gt;&gt;  limitations under the License.
&gt;&gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt;&gt;      define subcomponents such as "Valves" at this level.
&gt;&gt;      Documentation at /docs/config/server.html
&gt;&gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt;&gt;  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt;&gt;  &lt;Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt;&gt;  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html
--&gt;
&gt;&gt;  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt;&gt;  &lt;!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html
--&gt;
&gt;&gt;  &lt;Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt;&gt;  &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt;&gt;  &lt;!-- Global JNDI resources
&gt;&gt;        Documentation at /docs/jndi-resources-howto.html
&gt;&gt;  --&gt;
&gt;&gt;  &lt;GlobalNamingResources&gt;
&gt;&gt;    &lt;!-- Editable user database that can also be used by
&gt;&gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt;&gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt;&gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String" value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt;&gt; &lt;Environment name="cmts-url"            value="http://localhost:8080/aims2/aims"
type="java.lang.String"/&gt;
&gt;&gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String" value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties"/&gt;
&gt;&gt; &lt;Environment name="cdb-url"              value="http://localhost:8080/alligator" 
type="java.lang.String"/&gt;
&gt;&gt; &lt;Environment name="liarRealm"            value="tdhca.liar.ReniRealm"         
  type="java.lang.String"/&gt;
&gt;&gt; &lt;Environment name="tdhca.liar.useDomain" value="false"                       
    type="java.lang.String" /&gt;
&gt;&gt; &lt;Environment name="tdhca.liar.hashSalt"  value="23049mdx903lzd93jag9845a0gjsscvm"
type="java.lang.String"/&gt;
&gt;&gt; 
&gt;&gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt;&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt;&gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;url&lt;/name&gt;
&gt;&gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us:1521:dev&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;username&lt;/name&gt;
&gt;&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;password&lt;/name&gt;
&gt;&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt;&gt;            &lt;value&gt;10&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt;&gt;            &lt;value&gt;5&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;!-- time to wait for a connection before giving up in milliseconds
--&gt;
&gt;&gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt;&gt;            &lt;value&gt;10000&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt;&gt;            &lt;value&gt;true&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;          &lt;parameter&gt;
&gt;&gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt;&gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;        &lt;/ResourceParams&gt;
&gt;&gt;    &lt;Resource auth="Container" description="User database that can be updated and
saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase"/&gt;
&gt;&gt;  &lt;/GlobalNamingResources&gt;
&gt;&gt;  &lt;!-- A "Service" is a collection of one or more "Connectors" that share
&gt;&gt;        a single "Container" Note:  A "Service" is not itself a "Container",
&gt;&gt;        so you may not define subcomponents such as "Valves" at this level.
&gt;&gt;        Documentation at /docs/config/service.html
&gt;&gt;    --&gt;
&gt;&gt;  &lt;Service name="Catalina"&gt;
&gt;&gt; 
&gt;&gt;    &lt;!--The connectors can use a shared executor, you can define one or more named
thread pools--&gt;
&gt;&gt;    &lt;!--
&gt;&gt;    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt;&gt;        maxThreads="150" minSpareThreads="4"/&gt;
&gt;&gt;    --&gt;
&gt;&gt; 
&gt;&gt; 
&gt;&gt;    &lt;!-- A "Connector" represents an endpoint by which requests are received
&gt;&gt;          and responses are returned. Documentation at :
&gt;&gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp; non-blocking)
&gt;&gt;          Java AJP  Connector: /docs/config/ajp.html
&gt;&gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt;&gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt;&gt;    --&gt;
&gt;&gt;    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/&gt;
&gt;&gt;    &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt;&gt;    &lt;!--
&gt;&gt;    &lt;Connector executor="tomcatThreadPool"
&gt;&gt;                port="8080" protocol="HTTP/1.1"
&gt;&gt;                connectionTimeout="20000"
&gt;&gt;                redirectPort="8443" /&gt;
&gt;&gt;    --&gt;
&gt;&gt;    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt;&gt;          This connector uses the JSSE configuration, when using APR, the
&gt;&gt;          connector should be using the OpenSSL style configuration
&gt;&gt;          described in the APR documentation --&gt;
&gt;&gt;    &lt;!--
&gt;&gt;    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt;&gt;                maxThreads="150" scheme="https" secure="true"
&gt;&gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt;&gt;    --&gt;
&gt;&gt;    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt;&gt;    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt;&gt; 
&gt;&gt;    &lt;!-- An Engine represents the entry point (within Catalina) that processes
&gt;&gt;          every request.  The Engine implementation for Tomcat stand alone
&gt;&gt;          analyzes the HTTP headers included with the request, and passes them
&gt;&gt;          on to the appropriate Host (virtual host).
&gt;&gt;          Documentation at /docs/config/engine.html --&gt;
&gt;&gt;    &lt;!-- You should set jvmRoute to support load-balancing via AJP ie :
&gt;&gt;    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt;&gt;    --&gt;
&gt;&gt;    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt;&gt;      &lt;!--For clustering, please take a look at documentation at:
&gt;&gt;          /docs/cluster-howto.html  (simple how to)
&gt;&gt;          /docs/config/cluster.html (reference documentation) --&gt;
&gt;&gt;      &lt;!--
&gt;&gt;      &lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt;&gt;      --&gt;
&gt;&gt;      &lt;!-- The request dumper valve dumps useful debugging information about
&gt;&gt;            the request and response data received and sent by Tomcat.
&gt;&gt;            Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;      &lt;!--
&gt;&gt;      &lt;Valve className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt;&gt;      --&gt;
&gt;&gt;      &lt;!-- This Realm uses the UserDatabase configured in the global JNDI
&gt;&gt;            resources under the key "UserDatabase".  Any edits
&gt;&gt;            that are performed against this UserDatabase are immediately
&gt;&gt;            available for use by the Realm.  --&gt;
&gt;&gt;      &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/&gt;
&gt;&gt;      &lt;!-- Define the default virtual host
&gt;&gt;            Note: XML Schema validation will not work with Xerces 2.2.
&gt;&gt;        --&gt;
&gt;&gt;      &lt;Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"
xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt;&gt;        &lt;!-- SingleSignOn valve, share authentication between web applications
&gt;&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;        &lt;!--
&gt;&gt;        &lt;Valve className="org.apache.catalina.authenticator.SingleSignOn" /&gt;
&gt;&gt;        --&gt;
&gt;&gt;        &lt;!-- Access log processes all example.
&gt;&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;        &lt;!--
&gt;&gt;        &lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
&gt;&gt;                prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/&gt;
&gt;&gt;        --&gt;
&gt;&gt;        &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt;&gt;                  directory="logs"  prefix="localhost_log." suffix=".txt"
&gt;&gt;          timestamp="true"/&gt;
&gt;&gt; 
&gt;&gt; &lt;Context path="/alligator" docBase="alligator" debug="0" reloadable="true" crossContext="true"&gt;
&gt;&gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt;&gt; &lt;ResourceLink name="tdhca.liar.useDomain" global="tdhca.liar.useDomain"/&gt;
&gt;&gt; &lt;ResourceLink name="tdhca.liar.hashSalt" global="tdhca.liar.hashSalt"/&gt;
&gt;&gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt;&gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt;&gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt;&gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"  type="javax.sql.DataSource"
/&gt;
&gt;&gt; &lt;Environment name="serverName" type="java.lang.String" value="contract"/&gt;
&gt;&gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt;&gt; &lt;ResourceLink name="contractPropertiesFile" global="contractPropertiesFile"/&gt;
&gt;&gt; &lt;/Context&gt;
&gt;&gt; 
&gt;&gt;      &lt;/Host&gt;
&gt;&gt;    &lt;/Engine&gt;
&gt;&gt;  &lt;/Service&gt;
&gt;&gt; &lt;/Server&gt;
&gt;&gt; 
&gt;&gt; Thanks for your help.
&gt;&gt; 
&gt;&gt; Angela Day
&gt;&gt; National Autism Association of Central Texas
&gt;&gt; 
&gt;&gt; http://www.naacentraltexas.org
&gt;&gt; formally FEAT Austin
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; 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

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Apache Lists &lt;apache@rodentia.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c84E55F84-7460-410F-B6EC-64443306DBB6@rodentia.net%3e"/>
<id>urn:uuid:%3c84E55F84-7460-410F-B6EC-64443306DBB6@rodentia-net%3e</id>
<updated>2009-12-02T21:26:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
After seeing my own response, I realized that it may look like I am  
claiming to be part of Apache. I am not; I just have an email account  
I use to subscribe to Apache lists. I've changed the real name on the  
account to be less misleading.

I'm not associated with Apache in any way, I'm trying to learn these  
technologies too :)

On Dec 2, 2009, at 1:22 PM, Apache Lists wrote:

&gt;&gt; C:\workspace\contract\build-torque.XML:347:  
&gt;&gt; java.lang.ClassNotFoundException: ${torque.database.driver}
&gt;
&gt; This looks a little odd to me - I'd expect to see a classname here.  
&gt; Is the property name not getting replaced with the value for some  
&gt; reason?
&gt;
&gt; On Dec 2, 2009, at 1:17 PM, Angela Day wrote:
&gt;
&gt;&gt; This is what I got, which is essentially the same error:
&gt;&gt;
&gt;&gt; C:\workspace\contract&gt;ant -f build-torque.XML jdbc
&gt;&gt; Buildfile: build-torque.XML
&gt;&gt; jdbc:
&gt;&gt;     [echo] +-----------------------------------------------+
&gt;&gt;     [echo] |                                               |
&gt;&gt;     [echo] | Generating XML from JDBC connection !         |
&gt;&gt;     [echo] | Woo hoo!                                      |
&gt;&gt;     [echo] |                                               |
&gt;&gt;     [echo] +-----------------------------------------------+
&gt;&gt; [torque-jdbc-transform] Torque - JDBCToXMLSchema starting
&gt;&gt; [torque-jdbc-transform] Your DB settings are:
&gt;&gt; [torque-jdbc-transform] driver : ${torque.database.driver}
&gt;&gt; [torque-jdbc-transform] URL : ${torque.database.url}
&gt;&gt; [torque-jdbc-transform] user : ${torque.database.user}
&gt;&gt; [torque-jdbc-transform] schema : ${torque.database.schema}
&gt;&gt; BUILD FAILED
&gt;&gt; C:\workspace\contract\build-torque.XML:347:  
&gt;&gt; java.lang.ClassNotFoundException: ${
&gt;&gt; torque.database.driver}
&gt;&gt;
&gt;&gt; Any ideas what this means?
&gt;&gt;
&gt;&gt; Angela Day
&gt;&gt; National Autism Association of Central Texas
&gt;&gt;
&gt;&gt; http://www.naacentraltexas.org
&gt;&gt; formally FEAT Austin
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; ________________________________
&gt;&gt; From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
&gt;&gt; To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
&gt;&gt; Sent: Wed, December 2, 2009 2:49:49 PM
&gt;&gt; Subject: Re: no suitable driver
&gt;&gt;
&gt;&gt; What about your build.properties file? I'd try to do a " ant -f  
&gt;&gt; build-torque.XML jdbc" or some other ant task tomake sure the  
&gt;&gt; database is set up right.
&gt;&gt;
&gt;&gt; David
&gt;&gt;
&gt;&gt; On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:
&gt;&gt;
&gt;&gt;&gt; I am going crazy with a problem I have had for a few days now.  It  
&gt;&gt;&gt; seems so simple, but I cannot solve the problem.  Any help would  
&gt;&gt;&gt; be appreciated. I have ojdbc14.jar in the classpath for the env  
&gt;&gt;&gt; variable path and in the build-torque.xml file.  I am using java  
&gt;&gt;&gt; 1.5 and torque 3.3 and eclipse 3.5.1 and velocity 1.5
&gt;&gt;&gt;
&gt;&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt;&gt;&gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt;&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt;&gt;&gt; INFO: Initialization processed in 1960 ms
&gt;&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService  
&gt;&gt;&gt; start
&gt;&gt;&gt; INFO: Starting service Catalina
&gt;&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt;&gt;&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009  
&gt;&gt;&gt; 2:02:47 PM org.apache.catalina.core.StandardContext loadOnStartup
&gt;&gt;&gt; SEVERE: Servlet /alligator threw load()  
&gt;&gt;&gt; exceptionjava.sql.SQLException
&gt;&gt;&gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt;&gt;&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt;&gt;&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt;&gt;&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt;&gt;&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt;&gt;&gt; at org.apache.torque.Torque.getConnection(
&gt;&gt;&gt; at tdhca.torque.CurrentConnection.getConnection(
&gt;&gt;&gt; at tdhca.maverick.Dispatcher.initTorque(
&gt;&gt;&gt; at tdhca.maverick.Dispatcher.init(
&gt;&gt;&gt; at javax.servlet.GenericServlet.init(
&gt;&gt;&gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt;&gt;&gt; at org.apache.catalina.core.StandardWrapper.load(
&gt;&gt;&gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt;&gt;&gt; at org.apache.catalina.core.StandardContext.start(
&gt;&gt;&gt; at org.apache.catalina.core.ContainerBase.start(
&gt;&gt;&gt; at org.apache.catalina.core.StandardHost.start(
&gt;&gt;&gt; at org.apache.catalina.core.ContainerBase.start(
&gt;&gt;&gt; at org.apache.catalina.core.StandardEngine.start(
&gt;&gt;&gt; at org.apache.catalina.core.StandardService.start(
&gt;&gt;&gt; at org.apache.catalina.core.StandardServer.start(
&gt;&gt;&gt; at org.apache.catalina.startup.Catalina.start(
&gt;&gt;&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt;&gt;&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt;&gt;&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt;&gt;&gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt;&gt;&gt; at org.apache.catalina.startup.Bootstrap.start(
&gt;&gt;&gt; at org.apache.catalina.startup.Bootstrap.main(
&gt;&gt;&gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext  
&gt;&gt;&gt; log
&gt;&gt;&gt; INFO: Use of the properties initialization parameter 'properties'  
&gt;&gt;&gt; has been deprecated by 'org.apache.velocity.properties'
&gt;&gt;&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext  
&gt;&gt;&gt; log
&gt;&gt;&gt; INFO: ContextListener: contextInitialized()
&gt;&gt;&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext  
&gt;&gt;&gt; log
&gt;&gt;&gt; INFO: SessionListener: contextInitialized()
&gt;&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt;&gt;&gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt;&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt;&gt;&gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt;&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt;&gt;&gt; INFO: Jk running ID=0 time=0/125 config=null
&gt;&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt;&gt;&gt; INFO: Server startup in 4885 ms: No suitable  
&gt;&gt;&gt; driverBasicDataSource.java:1143)BasicDataSource.java:880) 
&gt;&gt;&gt; TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300) 
&gt;&gt;&gt; CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307) 
&gt;&gt;&gt; GenericServlet.java:212)StandardWrapper.java:1173) 
&gt;&gt;&gt; StandardWrapper.java:993)StandardContext.java:4149) 
&gt;&gt;&gt; StandardContext.java:4458)ContainerBase.java:1045) 
&gt;&gt;&gt; StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java: 
&gt;&gt;&gt; 443)StandardService.java:516)StandardServer.java:710)Catalina.java: 
&gt;&gt;&gt; 583)Native Method)Bootstrap.java:288)Bootstrap.java:413)
&gt;&gt;&gt;
&gt;&gt;&gt; Server.xml
&gt;&gt;&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt;&gt;&gt; &lt;!--
&gt;&gt;&gt;  Licensed to the Apache Software Foundation (ASF) under one or more
&gt;&gt;&gt;  contributor license agreements.  See the NOTICE file distributed  
&gt;&gt;&gt; with
&gt;&gt;&gt;  this work for additional information regarding copyright ownership.
&gt;&gt;&gt;  The ASF licenses this file to You under the Apache License,  
&gt;&gt;&gt; Version 2.0
&gt;&gt;&gt;  (the "License"); you may not use this file except in compliance  
&gt;&gt;&gt; with
&gt;&gt;&gt;  the License.  You may obtain a copy of the License at
&gt;&gt;&gt;      http://www.apache.org/licenses/LICENSE-2.0
&gt;&gt;&gt;  Unless required by applicable law or agreed to in writing, software
&gt;&gt;&gt;  distributed under the License is distributed on an "AS IS" BASIS,
&gt;&gt;&gt;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
&gt;&gt;&gt; implied.
&gt;&gt;&gt;  See the License for the specific language governing permissions and
&gt;&gt;&gt;  limitations under the License.
&gt;&gt;&gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may  
&gt;&gt;&gt; not
&gt;&gt;&gt;      define subcomponents such as "Valves" at this level.
&gt;&gt;&gt;      Documentation at /docs/config/server.html
&gt;&gt;&gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt;&gt;&gt;  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt;&gt;&gt;  &lt;Listener SSLEngine="on"  
&gt;&gt;&gt; className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt;&gt;&gt;  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation  
&gt;&gt;&gt; at /docs/jasper-howto.html --&gt;
&gt;&gt;&gt;  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt;&gt;&gt;  &lt;!-- JMX Support for the Tomcat server. Documentation at /docs/ 
&gt;&gt;&gt; non-existent.html --&gt;
&gt;&gt;&gt;  &lt;Listener  
&gt;&gt;&gt; className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt;&gt;&gt;  &lt;Listener  
&gt;&gt;&gt; className 
&gt;&gt;&gt; ="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt;&gt;&gt;  &lt;!-- Global JNDI resources
&gt;&gt;&gt;        Documentation at /docs/jndi-resources-howto.html
&gt;&gt;&gt;  --&gt;
&gt;&gt;&gt;  &lt;GlobalNamingResources&gt;
&gt;&gt;&gt;    &lt;!-- Editable user database that can also be used by
&gt;&gt;&gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt;&gt;&gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt;&gt;&gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String"  
&gt;&gt;&gt; value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt;&gt;&gt; &lt;Environment name="cmts-url"            value="http://localhost:8080/aims2/aims

&gt;&gt;&gt; " type="java.lang.String"/&gt;
&gt;&gt;&gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String"  
&gt;&gt;&gt; value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties 
&gt;&gt;&gt; "/&gt;
&gt;&gt;&gt; &lt;Environment name="cdb-url"              value="http://localhost:8080/alligator

&gt;&gt;&gt; "  type="java.lang.String"/&gt;
&gt;&gt;&gt; &lt;Environment name="liarRealm"             
&gt;&gt;&gt; value="tdhca.liar.ReniRealm"            type="java.lang.String"/&gt;
&gt;&gt;&gt; &lt;Environment name="tdhca.liar.useDomain"  
&gt;&gt;&gt; value="false"                            type="java.lang.String" /&gt;
&gt;&gt;&gt; &lt;Environment name="tdhca.liar.hashSalt"   
&gt;&gt;&gt; value="23049mdx903lzd93jag9845a0gjsscvm" type="java.lang.String"/&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; &lt;Resource name="jdbc/cmts" auth="Container"  
&gt;&gt;&gt; type="javax.sql.DataSource"/&gt;
&gt;&gt;&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/ 
&gt;&gt;&gt; value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;url&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us: 
&gt;&gt;&gt; 1521:dev&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;username&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;password&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;10&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;5&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;!-- time to wait for a connection before giving up in  
&gt;&gt;&gt; milliseconds --&gt;
&gt;&gt;&gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;10000&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;true&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;          &lt;parameter&gt;
&gt;&gt;&gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt;&gt;&gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt;&gt;&gt;          &lt;/parameter&gt;
&gt;&gt;&gt;        &lt;/ResourceParams&gt;
&gt;&gt;&gt;    &lt;Resource auth="Container" description="User database that can  
&gt;&gt;&gt; be updated and saved"  
&gt;&gt;&gt; factory="org.apache.catalina.users.MemoryUserDatabaseFactory"  
&gt;&gt;&gt; name="UserDatabase" pathname="conf/tomcat-users.xml"  
&gt;&gt;&gt; type="org.apache.catalina.UserDatabase"/&gt;
&gt;&gt;&gt;  &lt;/GlobalNamingResources&gt;
&gt;&gt;&gt;  &lt;!-- A "Service" is a collection of one or more "Connectors" that  
&gt;&gt;&gt; share
&gt;&gt;&gt;        a single "Container" Note:  A "Service" is not itself a  
&gt;&gt;&gt; "Container",
&gt;&gt;&gt;        so you may not define subcomponents such as "Valves" at  
&gt;&gt;&gt; this level.
&gt;&gt;&gt;        Documentation at /docs/config/service.html
&gt;&gt;&gt;    --&gt;
&gt;&gt;&gt;  &lt;Service name="Catalina"&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;    &lt;!--The connectors can use a shared executor, you can define  
&gt;&gt;&gt; one or more named thread pools--&gt;
&gt;&gt;&gt;    &lt;!--
&gt;&gt;&gt;    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt;&gt;&gt;        maxThreads="150" minSpareThreads="4"/&gt;
&gt;&gt;&gt;    --&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;    &lt;!-- A "Connector" represents an endpoint by which requests are  
&gt;&gt;&gt; received
&gt;&gt;&gt;          and responses are returned. Documentation at :
&gt;&gt;&gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp;  
&gt;&gt;&gt; non-blocking)
&gt;&gt;&gt;          Java AJP  Connector: /docs/config/ajp.html
&gt;&gt;&gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt;&gt;&gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt;&gt;&gt;    --&gt;
&gt;&gt;&gt;    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/ 
&gt;&gt;&gt; 1.1" redirectPort="8443"/&gt;
&gt;&gt;&gt;    &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt;&gt;&gt;    &lt;!--
&gt;&gt;&gt;    &lt;Connector executor="tomcatThreadPool"
&gt;&gt;&gt;                port="8080" protocol="HTTP/1.1"
&gt;&gt;&gt;                connectionTimeout="20000"
&gt;&gt;&gt;                redirectPort="8443" /&gt;
&gt;&gt;&gt;    --&gt;
&gt;&gt;&gt;    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt;&gt;&gt;          This connector uses the JSSE configuration, when using  
&gt;&gt;&gt; APR, the
&gt;&gt;&gt;          connector should be using the OpenSSL style configuration
&gt;&gt;&gt;          described in the APR documentation --&gt;
&gt;&gt;&gt;    &lt;!--
&gt;&gt;&gt;    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt;&gt;&gt;                maxThreads="150" scheme="https" secure="true"
&gt;&gt;&gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt;&gt;&gt;    --&gt;
&gt;&gt;&gt;    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt;&gt;&gt;    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;    &lt;!-- An Engine represents the entry point (within Catalina)  
&gt;&gt;&gt; that processes
&gt;&gt;&gt;          every request.  The Engine implementation for Tomcat  
&gt;&gt;&gt; stand alone
&gt;&gt;&gt;          analyzes the HTTP headers included with the request, and  
&gt;&gt;&gt; passes them
&gt;&gt;&gt;          on to the appropriate Host (virtual host).
&gt;&gt;&gt;          Documentation at /docs/config/engine.html --&gt;
&gt;&gt;&gt;    &lt;!-- You should set jvmRoute to support load-balancing via AJP  
&gt;&gt;&gt; ie :
&gt;&gt;&gt;    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt;&gt;&gt;    --&gt;
&gt;&gt;&gt;    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt;&gt;&gt;      &lt;!--For clustering, please take a look at documentation at:
&gt;&gt;&gt;          /docs/cluster-howto.html  (simple how to)
&gt;&gt;&gt;          /docs/config/cluster.html (reference documentation) --&gt;
&gt;&gt;&gt;      &lt;!--
&gt;&gt;&gt;      &lt;Cluster  
&gt;&gt;&gt; className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt;&gt;&gt;      --&gt;
&gt;&gt;&gt;      &lt;!-- The request dumper valve dumps useful debugging  
&gt;&gt;&gt; information about
&gt;&gt;&gt;            the request and response data received and sent by  
&gt;&gt;&gt; Tomcat.
&gt;&gt;&gt;            Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;&gt;      &lt;!--
&gt;&gt;&gt;      &lt;Valve  
&gt;&gt;&gt; className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt;&gt;&gt;      --&gt;
&gt;&gt;&gt;      &lt;!-- This Realm uses the UserDatabase configured in the  
&gt;&gt;&gt; global JNDI
&gt;&gt;&gt;            resources under the key "UserDatabase".  Any edits
&gt;&gt;&gt;            that are performed against this UserDatabase are  
&gt;&gt;&gt; immediately
&gt;&gt;&gt;            available for use by the Realm.  --&gt;
&gt;&gt;&gt;      &lt;Realm  
&gt;&gt;&gt; className="org.apache.catalina.realm.UserDatabaseRealm"  
&gt;&gt;&gt; resourceName="UserDatabase"/&gt;
&gt;&gt;&gt;      &lt;!-- Define the default virtual host
&gt;&gt;&gt;            Note: XML Schema validation will not work with Xerces  
&gt;&gt;&gt; 2.2.
&gt;&gt;&gt;        --&gt;
&gt;&gt;&gt;      &lt;Host appBase="webapps" autoDeploy="true" name="localhost"  
&gt;&gt;&gt; unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt;&gt;&gt;        &lt;!-- SingleSignOn valve, share authentication between web  
&gt;&gt;&gt; applications
&gt;&gt;&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;&gt;        &lt;!--
&gt;&gt;&gt;        &lt;Valve  
&gt;&gt;&gt; className="org.apache.catalina.authenticator.SingleSignOn" /&gt;
&gt;&gt;&gt;        --&gt;
&gt;&gt;&gt;        &lt;!-- Access log processes all example.
&gt;&gt;&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;&gt;        &lt;!--
&gt;&gt;&gt;        &lt;Valve  
&gt;&gt;&gt; className="org.apache.catalina.valves.AccessLogValve"  
&gt;&gt;&gt; directory="logs"
&gt;&gt;&gt;                prefix="localhost_access_log." suffix=".txt"  
&gt;&gt;&gt; pattern="common" resolveHosts="false"/&gt;
&gt;&gt;&gt;        --&gt;
&gt;&gt;&gt;        &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt;&gt;&gt;                  directory="logs"  prefix="localhost_log."  
&gt;&gt;&gt; suffix=".txt"
&gt;&gt;&gt;          timestamp="true"/&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; &lt;Context path="/alligator" docBase="alligator" debug="0"  
&gt;&gt;&gt; reloadable="true" crossContext="true"&gt;
&gt;&gt;&gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="tdhca.liar.useDomain"  
&gt;&gt;&gt; global="tdhca.liar.useDomain"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="tdhca.liar.hashSalt"  
&gt;&gt;&gt; global="tdhca.liar.hashSalt"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"   
&gt;&gt;&gt; type="javax.sql.DataSource" /&gt;
&gt;&gt;&gt; &lt;Environment name="serverName" type="java.lang.String"  
&gt;&gt;&gt; value="contract"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt;&gt;&gt; &lt;ResourceLink name="contractPropertiesFile"  
&gt;&gt;&gt; global="contractPropertiesFile"/&gt;
&gt;&gt;&gt; &lt;/Context&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;      &lt;/Host&gt;
&gt;&gt;&gt;    &lt;/Engine&gt;
&gt;&gt;&gt;  &lt;/Service&gt;
&gt;&gt;&gt; &lt;/Server&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; Thanks for your help.
&gt;&gt;&gt;
&gt;&gt;&gt; Angela Day
&gt;&gt;&gt; National Autism Association of Central Texas
&gt;&gt;&gt;
&gt;&gt;&gt; http://www.naacentraltexas.org
&gt;&gt;&gt; formally FEAT Austin
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Apache Lists &lt;apache@rodentia.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3cBE071041-FD4D-4248-812E-684AD6A7C828@rodentia.net%3e"/>
<id>urn:uuid:%3cBE071041-FD4D-4248-812E-684AD6A7C828@rodentia-net%3e</id>
<updated>2009-12-02T21:22:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; C:\workspace\contract\build-torque.XML:347:  
&gt; java.lang.ClassNotFoundException: ${torque.database.driver}

This looks a little odd to me - I'd expect to see a classname here. Is  
the property name not getting replaced with the value for some reason?

On Dec 2, 2009, at 1:17 PM, Angela Day wrote:

&gt; This is what I got, which is essentially the same error:
&gt;
&gt; C:\workspace\contract&gt;ant -f build-torque.XML jdbc
&gt; Buildfile: build-torque.XML
&gt; jdbc:
&gt;      [echo] +-----------------------------------------------+
&gt;      [echo] |                                               |
&gt;      [echo] | Generating XML from JDBC connection !         |
&gt;      [echo] | Woo hoo!                                      |
&gt;      [echo] |                                               |
&gt;      [echo] +-----------------------------------------------+
&gt; [torque-jdbc-transform] Torque - JDBCToXMLSchema starting
&gt; [torque-jdbc-transform] Your DB settings are:
&gt; [torque-jdbc-transform] driver : ${torque.database.driver}
&gt; [torque-jdbc-transform] URL : ${torque.database.url}
&gt; [torque-jdbc-transform] user : ${torque.database.user}
&gt; [torque-jdbc-transform] schema : ${torque.database.schema}
&gt; BUILD FAILED
&gt; C:\workspace\contract\build-torque.XML:347:  
&gt; java.lang.ClassNotFoundException: ${
&gt; torque.database.driver}
&gt;
&gt; Any ideas what this means?
&gt;
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt;
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; ________________________________
&gt; From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
&gt; To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
&gt; Sent: Wed, December 2, 2009 2:49:49 PM
&gt; Subject: Re: no suitable driver
&gt;
&gt; What about your build.properties file? I'd try to do a " ant -f  
&gt; build-torque.XML jdbc" or some other ant task tomake sure the  
&gt; database is set up right.
&gt;
&gt; David
&gt;
&gt; On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:
&gt;
&gt;&gt; I am going crazy with a problem I have had for a few days now.  It  
&gt;&gt; seems so simple, but I cannot solve the problem.  Any help would be  
&gt;&gt; appreciated. I have ojdbc14.jar in the classpath for the env  
&gt;&gt; variable path and in the build-torque.xml file.  I am using java  
&gt;&gt; 1.5 and torque 3.3 and eclipse 3.5.1 and velocity 1.5
&gt;&gt;
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt;&gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt;&gt; INFO: Initialization processed in 1960 ms
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt;&gt; INFO: Starting service Catalina
&gt;&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt;&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009  
&gt;&gt; 2:02:47 PM org.apache.catalina.core.StandardContext loadOnStartup
&gt;&gt; SEVERE: Servlet /alligator threw load()  
&gt;&gt; exceptionjava.sql.SQLException
&gt;&gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt;&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt;&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt;&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt;&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt;&gt; at org.apache.torque.Torque.getConnection(
&gt;&gt; at tdhca.torque.CurrentConnection.getConnection(
&gt;&gt; at tdhca.maverick.Dispatcher.initTorque(
&gt;&gt; at tdhca.maverick.Dispatcher.init(
&gt;&gt; at javax.servlet.GenericServlet.init(
&gt;&gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt;&gt; at org.apache.catalina.core.StandardWrapper.load(
&gt;&gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt;&gt; at org.apache.catalina.core.StandardContext.start(
&gt;&gt; at org.apache.catalina.core.ContainerBase.start(
&gt;&gt; at org.apache.catalina.core.StandardHost.start(
&gt;&gt; at org.apache.catalina.core.ContainerBase.start(
&gt;&gt; at org.apache.catalina.core.StandardEngine.start(
&gt;&gt; at org.apache.catalina.core.StandardService.start(
&gt;&gt; at org.apache.catalina.core.StandardServer.start(
&gt;&gt; at org.apache.catalina.startup.Catalina.start(
&gt;&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt;&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt;&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt;&gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt;&gt; at org.apache.catalina.startup.Bootstrap.start(
&gt;&gt; at org.apache.catalina.startup.Bootstrap.main(
&gt;&gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext  
&gt;&gt; log
&gt;&gt; INFO: Use of the properties initialization parameter 'properties'  
&gt;&gt; has been deprecated by 'org.apache.velocity.properties'
&gt;&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext  
&gt;&gt; log
&gt;&gt; INFO: ContextListener: contextInitialized()
&gt;&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext  
&gt;&gt; log
&gt;&gt; INFO: SessionListener: contextInitialized()
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt;&gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt;&gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt;&gt; INFO: Jk running ID=0 time=0/125 config=null
&gt;&gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt;&gt; INFO: Server startup in 4885 ms: No suitable  
&gt;&gt; driverBasicDataSource.java:1143)BasicDataSource.java:880) 
&gt;&gt; TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300) 
&gt;&gt; CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307) 
&gt;&gt; GenericServlet.java:212)StandardWrapper.java:1173) 
&gt;&gt; StandardWrapper.java:993)StandardContext.java:4149) 
&gt;&gt; StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java: 
&gt;&gt; 722)ContainerBase.java:1045)StandardEngine.java:443) 
&gt;&gt; StandardService.java:516)StandardServer.java:710)Catalina.java:583) 
&gt;&gt; Native Method)Bootstrap.java:288)Bootstrap.java:413)
&gt;&gt;
&gt;&gt; Server.xml
&gt;&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt;&gt; &lt;!--
&gt;&gt;   Licensed to the Apache Software Foundation (ASF) under one or more
&gt;&gt;   contributor license agreements.  See the NOTICE file distributed  
&gt;&gt; with
&gt;&gt;   this work for additional information regarding copyright ownership.
&gt;&gt;   The ASF licenses this file to You under the Apache License,  
&gt;&gt; Version 2.0
&gt;&gt;   (the "License"); you may not use this file except in compliance  
&gt;&gt; with
&gt;&gt;   the License.  You may obtain a copy of the License at
&gt;&gt;       http://www.apache.org/licenses/LICENSE-2.0
&gt;&gt;   Unless required by applicable law or agreed to in writing, software
&gt;&gt;   distributed under the License is distributed on an "AS IS" BASIS,
&gt;&gt;   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
&gt;&gt; implied.
&gt;&gt;   See the License for the specific language governing permissions and
&gt;&gt;   limitations under the License.
&gt;&gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt;&gt;       define subcomponents such as "Valves" at this level.
&gt;&gt;       Documentation at /docs/config/server.html
&gt;&gt;   --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt;&gt;   &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt;&gt;   &lt;Listener SSLEngine="on"  
&gt;&gt; className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt;&gt;   &lt;!--Initialize Jasper prior to webapps are loaded. Documentation  
&gt;&gt; at /docs/jasper-howto.html --&gt;
&gt;&gt;   &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt;&gt;   &lt;!-- JMX Support for the Tomcat server. Documentation at /docs/ 
&gt;&gt; non-existent.html --&gt;
&gt;&gt;   &lt;Listener  
&gt;&gt; className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt;&gt;   &lt;Listener  
&gt;&gt; className 
&gt;&gt; ="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt;&gt;   &lt;!-- Global JNDI resources
&gt;&gt;         Documentation at /docs/jndi-resources-howto.html
&gt;&gt;   --&gt;
&gt;&gt;   &lt;GlobalNamingResources&gt;
&gt;&gt;     &lt;!-- Editable user database that can also be used by
&gt;&gt;           UserDatabaseRealm to authenticate users  --&gt;
&gt;&gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt;&gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String"  
&gt;&gt; value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt;&gt; &lt;Environment name="cmts-url"            value="http://localhost:8080/aims2/aims

&gt;&gt; " type="java.lang.String"/&gt;
&gt;&gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String"  
&gt;&gt; value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties 
&gt;&gt; "/&gt;
&gt;&gt; &lt;Environment name="cdb-url"              value="http://localhost:8080/alligator

&gt;&gt; "  type="java.lang.String"/&gt;
&gt;&gt; &lt;Environment name="liarRealm"             
&gt;&gt; value="tdhca.liar.ReniRealm"            type="java.lang.String"/&gt;
&gt;&gt; &lt;Environment name="tdhca.liar.useDomain"  
&gt;&gt; value="false"                            type="java.lang.String" /&gt;
&gt;&gt; &lt;Environment name="tdhca.liar.hashSalt"   
&gt;&gt; value="23049mdx903lzd93jag9845a0gjsscvm" type="java.lang.String"/&gt;
&gt;&gt;
&gt;&gt; &lt;Resource name="jdbc/cmts" auth="Container"  
&gt;&gt; type="javax.sql.DataSource"/&gt;
&gt;&gt;         &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;factory&lt;/name&gt;
&gt;&gt;             &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/ 
&gt;&gt; value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;driverClassName&lt;/name&gt;
&gt;&gt;             &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;url&lt;/name&gt;
&gt;&gt;             &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us: 
&gt;&gt; 1521:dev&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;username&lt;/name&gt;
&gt;&gt;             &lt;value&gt;xxx&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;password&lt;/name&gt;
&gt;&gt;             &lt;value&gt;xxx&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;maxActive&lt;/name&gt;
&gt;&gt;             &lt;value&gt;10&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;maxIdle&lt;/name&gt;
&gt;&gt;             &lt;value&gt;5&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;!-- time to wait for a connection before giving up in  
&gt;&gt; milliseconds --&gt;
&gt;&gt;             &lt;name&gt;maxWait&lt;/name&gt;
&gt;&gt;             &lt;value&gt;10000&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt;&gt;             &lt;value&gt;true&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;           &lt;parameter&gt;
&gt;&gt;             &lt;name&gt;validationQuery&lt;/name&gt;
&gt;&gt;             &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt;&gt;           &lt;/parameter&gt;
&gt;&gt;         &lt;/ResourceParams&gt;
&gt;&gt;     &lt;Resource auth="Container" description="User database that can  
&gt;&gt; be updated and saved"  
&gt;&gt; factory="org.apache.catalina.users.MemoryUserDatabaseFactory"  
&gt;&gt; name="UserDatabase" pathname="conf/tomcat-users.xml"  
&gt;&gt; type="org.apache.catalina.UserDatabase"/&gt;
&gt;&gt;   &lt;/GlobalNamingResources&gt;
&gt;&gt;   &lt;!-- A "Service" is a collection of one or more "Connectors" that  
&gt;&gt; share
&gt;&gt;         a single "Container" Note:  A "Service" is not itself a  
&gt;&gt; "Container",
&gt;&gt;         so you may not define subcomponents such as "Valves" at  
&gt;&gt; this level.
&gt;&gt;         Documentation at /docs/config/service.html
&gt;&gt;     --&gt;
&gt;&gt;   &lt;Service name="Catalina"&gt;
&gt;&gt;
&gt;&gt;     &lt;!--The connectors can use a shared executor, you can define  
&gt;&gt; one or more named thread pools--&gt;
&gt;&gt;     &lt;!--
&gt;&gt;     &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt;&gt;         maxThreads="150" minSpareThreads="4"/&gt;
&gt;&gt;     --&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;     &lt;!-- A "Connector" represents an endpoint by which requests are  
&gt;&gt; received
&gt;&gt;           and responses are returned. Documentation at :
&gt;&gt;           Java HTTP Connector: /docs/config/http.html (blocking &amp;  
&gt;&gt; non-blocking)
&gt;&gt;           Java AJP  Connector: /docs/config/ajp.html
&gt;&gt;           APR (HTTP/AJP) Connector: /docs/apr.html
&gt;&gt;           Define a non-SSL HTTP/1.1 Connector on port 8080
&gt;&gt;     --&gt;
&gt;&gt;     &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/ 
&gt;&gt; 1.1" redirectPort="8443"/&gt;
&gt;&gt;     &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt;&gt;     &lt;!--
&gt;&gt;     &lt;Connector executor="tomcatThreadPool"
&gt;&gt;                 port="8080" protocol="HTTP/1.1"
&gt;&gt;                 connectionTimeout="20000"
&gt;&gt;                 redirectPort="8443" /&gt;
&gt;&gt;     --&gt;
&gt;&gt;     &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt;&gt;           This connector uses the JSSE configuration, when using  
&gt;&gt; APR, the
&gt;&gt;           connector should be using the OpenSSL style configuration
&gt;&gt;           described in the APR documentation --&gt;
&gt;&gt;     &lt;!--
&gt;&gt;     &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt;&gt;                 maxThreads="150" scheme="https" secure="true"
&gt;&gt;                 clientAuth="false" sslProtocol="TLS" /&gt;
&gt;&gt;     --&gt;
&gt;&gt;     &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt;&gt;     &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt;&gt;
&gt;&gt;     &lt;!-- An Engine represents the entry point (within Catalina)  
&gt;&gt; that processes
&gt;&gt;           every request.  The Engine implementation for Tomcat  
&gt;&gt; stand alone
&gt;&gt;           analyzes the HTTP headers included with the request, and  
&gt;&gt; passes them
&gt;&gt;           on to the appropriate Host (virtual host).
&gt;&gt;           Documentation at /docs/config/engine.html --&gt;
&gt;&gt;     &lt;!-- You should set jvmRoute to support load-balancing via AJP  
&gt;&gt; ie :
&gt;&gt;     &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt;&gt;     --&gt;
&gt;&gt;     &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt;&gt;       &lt;!--For clustering, please take a look at documentation at:
&gt;&gt;           /docs/cluster-howto.html  (simple how to)
&gt;&gt;           /docs/config/cluster.html (reference documentation) --&gt;
&gt;&gt;       &lt;!--
&gt;&gt;       &lt;Cluster  
&gt;&gt; className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt;&gt;       --&gt;
&gt;&gt;       &lt;!-- The request dumper valve dumps useful debugging  
&gt;&gt; information about
&gt;&gt;             the request and response data received and sent by  
&gt;&gt; Tomcat.
&gt;&gt;             Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;       &lt;!--
&gt;&gt;       &lt;Valve  
&gt;&gt; className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt;&gt;       --&gt;
&gt;&gt;       &lt;!-- This Realm uses the UserDatabase configured in the  
&gt;&gt; global JNDI
&gt;&gt;             resources under the key "UserDatabase".  Any edits
&gt;&gt;             that are performed against this UserDatabase are  
&gt;&gt; immediately
&gt;&gt;             available for use by the Realm.  --&gt;
&gt;&gt;       &lt;Realm  
&gt;&gt; className="org.apache.catalina.realm.UserDatabaseRealm"  
&gt;&gt; resourceName="UserDatabase"/&gt;
&gt;&gt;       &lt;!-- Define the default virtual host
&gt;&gt;             Note: XML Schema validation will not work with Xerces  
&gt;&gt; 2.2.
&gt;&gt;         --&gt;
&gt;&gt;       &lt;Host appBase="webapps" autoDeploy="true" name="localhost"  
&gt;&gt; unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt;&gt;         &lt;!-- SingleSignOn valve, share authentication between web  
&gt;&gt; applications
&gt;&gt;               Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;         &lt;!--
&gt;&gt;         &lt;Valve  
&gt;&gt; className="org.apache.catalina.authenticator.SingleSignOn" /&gt;
&gt;&gt;         --&gt;
&gt;&gt;         &lt;!-- Access log processes all example.
&gt;&gt;               Documentation at: /docs/config/valve.html --&gt;
&gt;&gt;         &lt;!--
&gt;&gt;         &lt;Valve  
&gt;&gt; className="org.apache.catalina.valves.AccessLogValve"  
&gt;&gt; directory="logs"
&gt;&gt;                 prefix="localhost_access_log." suffix=".txt"  
&gt;&gt; pattern="common" resolveHosts="false"/&gt;
&gt;&gt;         --&gt;
&gt;&gt;         &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt;&gt;                   directory="logs"  prefix="localhost_log."  
&gt;&gt; suffix=".txt"
&gt;&gt;           timestamp="true"/&gt;
&gt;&gt;
&gt;&gt; &lt;Context path="/alligator" docBase="alligator" debug="0"  
&gt;&gt; reloadable="true" crossContext="true"&gt;
&gt;&gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt;&gt; &lt;ResourceLink name="tdhca.liar.useDomain"  
&gt;&gt; global="tdhca.liar.useDomain"/&gt;
&gt;&gt; &lt;ResourceLink name="tdhca.liar.hashSalt"  
&gt;&gt; global="tdhca.liar.hashSalt"/&gt;
&gt;&gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt;&gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt;&gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt;&gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"   
&gt;&gt; type="javax.sql.DataSource" /&gt;
&gt;&gt; &lt;Environment name="serverName" type="java.lang.String"  
&gt;&gt; value="contract"/&gt;
&gt;&gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt;&gt; &lt;ResourceLink name="contractPropertiesFile"  
&gt;&gt; global="contractPropertiesFile"/&gt;
&gt;&gt; &lt;/Context&gt;
&gt;&gt;
&gt;&gt;       &lt;/Host&gt;
&gt;&gt;     &lt;/Engine&gt;
&gt;&gt;   &lt;/Service&gt;
&gt;&gt; &lt;/Server&gt;
&gt;&gt;
&gt;&gt; Thanks for your help.
&gt;&gt;
&gt;&gt; Angela Day
&gt;&gt; National Autism Association of Central Texas
&gt;&gt;
&gt;&gt; http://www.naacentraltexas.org
&gt;&gt; formally FEAT Austin
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; 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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c124684.53064.qm@web33308.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c124684-53064-qm@web33308-mail-mud-yahoo-com%3e</id>
<updated>2009-12-02T21:17:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
This is what I got, which is essentially the same error:

C:\workspace\contract&gt;ant -f build-torque.XML jdbc
Buildfile: build-torque.XML
jdbc:
     [echo] +-----------------------------------------------+
     [echo] |                                               |
     [echo] | Generating XML from JDBC connection !         |
     [echo] | Woo hoo!                                      |
     [echo] |                                               |
     [echo] +-----------------------------------------------+
[torque-jdbc-transform] Torque - JDBCToXMLSchema starting
[torque-jdbc-transform] Your DB settings are:
[torque-jdbc-transform] driver : ${torque.database.driver}
[torque-jdbc-transform] URL : ${torque.database.url}
[torque-jdbc-transform] user : ${torque.database.user}
[torque-jdbc-transform] schema : ${torque.database.schema}
BUILD FAILED
C:\workspace\contract\build-torque.XML:347: java.lang.ClassNotFoundException: ${
torque.database.driver}

Any ideas what this means?
 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Wed, December 2, 2009 2:49:49 PM
Subject: Re: no suitable driver

What about your build.properties file? I'd try to do a " ant -f build-torque.XML jdbc" or
some other ant task tomake sure the database is set up right.

David

On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:

&gt; I am going crazy with a problem I have had for a few days now.  It seems so simple, but
I cannot solve the problem.  Any help would be appreciated. I have ojdbc14.jar in the classpath
for the env variable path and in the build-torque.xml file.  I am using java 1.5 and torque
3.3 and eclipse 3.5.1 and velocity 1.5
&gt; 
&gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt; INFO: Initialization processed in 1960 ms
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt; INFO: Starting service Catalina
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM org.apache.catalina.core.StandardContext
loadOnStartup
&gt; SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
&gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; at org.apache.torque.Torque.getConnection(
&gt; at tdhca.torque.CurrentConnection.getConnection(
&gt; at tdhca.maverick.Dispatcher.initTorque(
&gt; at tdhca.maverick.Dispatcher.init(
&gt; at javax.servlet.GenericServlet.init(
&gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt; at org.apache.catalina.core.StandardWrapper.load(
&gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt; at org.apache.catalina.core.StandardContext.start(
&gt; at org.apache.catalina.core.ContainerBase.start(
&gt; at org.apache.catalina.core.StandardHost.start(
&gt; at org.apache.catalina.core.ContainerBase.start(
&gt; at org.apache.catalina.core.StandardEngine.start(
&gt; at org.apache.catalina.core.StandardService.start(
&gt; at org.apache.catalina.core.StandardServer.start(
&gt; at org.apache.catalina.startup.Catalina.start(
&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt; at org.apache.catalina.startup.Bootstrap.start(
&gt; at org.apache.catalina.startup.Bootstrap.main(
&gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: Use of the properties initialization parameter 'properties' has been deprecated
by 'org.apache.velocity.properties'
&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: ContextListener: contextInitialized()
&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: SessionListener: contextInitialized()
&gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt; INFO: Jk running ID=0 time=0/125 config=null
&gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt; INFO: Server startup in 4885 ms: No suitable driverBasicDataSource.java:1143)BasicDataSource.java:880)TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300)CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307)GenericServlet.java:212)StandardWrapper.java:1173)StandardWrapper.java:993)StandardContext.java:4149)StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java:443)StandardService.java:516)StandardServer.java:710)Catalina.java:583)Native
Method)Bootstrap.java:288)Bootstrap.java:413)
&gt; 
&gt; Server.xml
&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &lt;!--
&gt;  Licensed to the Apache Software Foundation (ASF) under one or more
&gt;  contributor license agreements.  See the NOTICE file distributed with
&gt;  this work for additional information regarding copyright ownership.
&gt;  The ASF licenses this file to You under the Apache License, Version 2.0
&gt;  (the "License"); you may not use this file except in compliance with
&gt;  the License.  You may obtain a copy of the License at
&gt;      http://www.apache.org/licenses/LICENSE-2.0
&gt;  Unless required by applicable law or agreed to in writing, software
&gt;  distributed under the License is distributed on an "AS IS" BASIS,
&gt;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
&gt;  See the License for the specific language governing permissions and
&gt;  limitations under the License.
&gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt;      define subcomponents such as "Valves" at this level.
&gt;      Documentation at /docs/config/server.html
&gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt;  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt;  &lt;Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt;  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html
--&gt;
&gt;  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt;  &lt;!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html
--&gt;
&gt;  &lt;Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt;  &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt;  &lt;!-- Global JNDI resources
&gt;        Documentation at /docs/jndi-resources-howto.html
&gt;  --&gt;
&gt;  &lt;GlobalNamingResources&gt;
&gt;    &lt;!-- Editable user database that can also be used by
&gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String" value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt; &lt;Environment name="cmts-url"            value="http://localhost:8080/aims2/aims" type="java.lang.String"/&gt;
&gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String" value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties"/&gt;
&gt; &lt;Environment name="cdb-url"              value="http://localhost:8080/alligator" 
type="java.lang.String"/&gt;
&gt; &lt;Environment name="liarRealm"            value="tdhca.liar.ReniRealm"            type="java.lang.String"/&gt;
&gt; &lt;Environment name="tdhca.liar.useDomain" value="false"                           
type="java.lang.String" /&gt;
&gt; &lt;Environment name="tdhca.liar.hashSalt"  value="23049mdx903lzd93jag9845a0gjsscvm"
type="java.lang.String"/&gt;
&gt; 
&gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;url&lt;/name&gt;
&gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us:1521:dev&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;username&lt;/name&gt;
&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;password&lt;/name&gt;
&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt;            &lt;value&gt;10&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt;            &lt;value&gt;5&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;!-- time to wait for a connection before giving up in milliseconds --&gt;
&gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt;            &lt;value&gt;10000&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt;            &lt;value&gt;true&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;        &lt;/ResourceParams&gt;
&gt;    &lt;Resource auth="Container" description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase"/&gt;
&gt;  &lt;/GlobalNamingResources&gt;
&gt;  &lt;!-- A "Service" is a collection of one or more "Connectors" that share
&gt;        a single "Container" Note:  A "Service" is not itself a "Container",
&gt;        so you may not define subcomponents such as "Valves" at this level.
&gt;        Documentation at /docs/config/service.html
&gt;    --&gt;
&gt;  &lt;Service name="Catalina"&gt;
&gt; 
&gt;    &lt;!--The connectors can use a shared executor, you can define one or more named
thread pools--&gt;
&gt;    &lt;!--
&gt;    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt;        maxThreads="150" minSpareThreads="4"/&gt;
&gt;    --&gt;
&gt; 
&gt; 
&gt;    &lt;!-- A "Connector" represents an endpoint by which requests are received
&gt;          and responses are returned. Documentation at :
&gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp; non-blocking)
&gt;          Java AJP  Connector: /docs/config/ajp.html
&gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt;    --&gt;
&gt;    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/&gt;
&gt;    &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt;    &lt;!--
&gt;    &lt;Connector executor="tomcatThreadPool"
&gt;                port="8080" protocol="HTTP/1.1"
&gt;                connectionTimeout="20000"
&gt;                redirectPort="8443" /&gt;
&gt;    --&gt;
&gt;    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt;          This connector uses the JSSE configuration, when using APR, the
&gt;          connector should be using the OpenSSL style configuration
&gt;          described in the APR documentation --&gt;
&gt;    &lt;!--
&gt;    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt;                maxThreads="150" scheme="https" secure="true"
&gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt;    --&gt;
&gt;    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt;    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt; 
&gt;    &lt;!-- An Engine represents the entry point (within Catalina) that processes
&gt;          every request.  The Engine implementation for Tomcat stand alone
&gt;          analyzes the HTTP headers included with the request, and passes them
&gt;          on to the appropriate Host (virtual host).
&gt;          Documentation at /docs/config/engine.html --&gt;
&gt;    &lt;!-- You should set jvmRoute to support load-balancing via AJP ie :
&gt;    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt;    --&gt;
&gt;    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt;      &lt;!--For clustering, please take a look at documentation at:
&gt;          /docs/cluster-howto.html  (simple how to)
&gt;          /docs/config/cluster.html (reference documentation) --&gt;
&gt;      &lt;!--
&gt;      &lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt;      --&gt;
&gt;      &lt;!-- The request dumper valve dumps useful debugging information about
&gt;            the request and response data received and sent by Tomcat.
&gt;            Documentation at: /docs/config/valve.html --&gt;
&gt;      &lt;!--
&gt;      &lt;Valve className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt;      --&gt;
&gt;      &lt;!-- This Realm uses the UserDatabase configured in the global JNDI
&gt;            resources under the key "UserDatabase".  Any edits
&gt;            that are performed against this UserDatabase are immediately
&gt;            available for use by the Realm.  --&gt;
&gt;      &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/&gt;
&gt;      &lt;!-- Define the default virtual host
&gt;            Note: XML Schema validation will not work with Xerces 2.2.
&gt;        --&gt;
&gt;      &lt;Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"
xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt;        &lt;!-- SingleSignOn valve, share authentication between web applications
&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;        &lt;!--
&gt;        &lt;Valve className="org.apache.catalina.authenticator.SingleSignOn" /&gt;
&gt;        --&gt;
&gt;        &lt;!-- Access log processes all example.
&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;        &lt;!--
&gt;        &lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
&gt;                prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/&gt;
&gt;        --&gt;
&gt;        &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt;                  directory="logs"  prefix="localhost_log." suffix=".txt"
&gt;          timestamp="true"/&gt;
&gt; 
&gt; &lt;Context path="/alligator" docBase="alligator" debug="0" reloadable="true" crossContext="true"&gt;
&gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt; &lt;ResourceLink name="tdhca.liar.useDomain" global="tdhca.liar.useDomain"/&gt;
&gt; &lt;ResourceLink name="tdhca.liar.hashSalt" global="tdhca.liar.hashSalt"/&gt;
&gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"  type="javax.sql.DataSource" /&gt;
&gt; &lt;Environment name="serverName" type="java.lang.String" value="contract"/&gt;
&gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt; &lt;ResourceLink name="contractPropertiesFile" global="contractPropertiesFile"/&gt;
&gt; &lt;/Context&gt;
&gt; 
&gt;      &lt;/Host&gt;
&gt;    &lt;/Engine&gt;
&gt;  &lt;/Service&gt;
&gt; &lt;/Server&gt;
&gt; 
&gt; Thanks for your help.
&gt; 
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt; 
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin

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

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c905025.48588.qm@web33308.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c905025-48588-qm@web33308-mail-mud-yahoo-com%3e</id>
<updated>2009-12-02T21:15:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
It is an existing database and application that I am upgrading from Torque 1.0 and JDK1.4,
so I am pretty sure the database is setup right.  Do you have something in mind?

Thanks,
 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: Wei Zhao &lt;weizhao6898@gmail.com&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Wed, December 2, 2009 2:49:49 PM
Subject: Re: no suitable driver

What about your build.properties file? I'd try to do a " ant -f build-torque.XML jdbc" or
some other ant task tomake sure the database is set up right.

David

On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:

&gt; I am going crazy with a problem I have had for a few days now.  It seems so simple, but
I cannot solve the problem.  Any help would be appreciated. I have ojdbc14.jar in the classpath
for the env variable path and in the build-torque.xml file.  I am using java 1.5 and torque
3.3 and eclipse 3.5.1 and velocity 1.5
&gt; 
&gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt; INFO: Initialization processed in 1960 ms
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt; INFO: Starting service Catalina
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM org.apache.catalina.core.StandardContext
loadOnStartup
&gt; SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
&gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; at org.apache.torque.Torque.getConnection(
&gt; at tdhca.torque.CurrentConnection.getConnection(
&gt; at tdhca.maverick.Dispatcher.initTorque(
&gt; at tdhca.maverick.Dispatcher.init(
&gt; at javax.servlet.GenericServlet.init(
&gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt; at org.apache.catalina.core.StandardWrapper.load(
&gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt; at org.apache.catalina.core.StandardContext.start(
&gt; at org.apache.catalina.core.ContainerBase.start(
&gt; at org.apache.catalina.core.StandardHost.start(
&gt; at org.apache.catalina.core.ContainerBase.start(
&gt; at org.apache.catalina.core.StandardEngine.start(
&gt; at org.apache.catalina.core.StandardService.start(
&gt; at org.apache.catalina.core.StandardServer.start(
&gt; at org.apache.catalina.startup.Catalina.start(
&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt; at org.apache.catalina.startup.Bootstrap.start(
&gt; at org.apache.catalina.startup.Bootstrap.main(
&gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: Use of the properties initialization parameter 'properties' has been deprecated
by 'org.apache.velocity.properties'
&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: ContextListener: contextInitialized()
&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: SessionListener: contextInitialized()
&gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt; INFO: Jk running ID=0 time=0/125 config=null
&gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt; INFO: Server startup in 4885 ms: No suitable driverBasicDataSource.java:1143)BasicDataSource.java:880)TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300)CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307)GenericServlet.java:212)StandardWrapper.java:1173)StandardWrapper.java:993)StandardContext.java:4149)StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java:443)StandardService.java:516)StandardServer.java:710)Catalina.java:583)Native
Method)Bootstrap.java:288)Bootstrap.java:413)
&gt; 
&gt; Server.xml
&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &lt;!--
&gt;  Licensed to the Apache Software Foundation (ASF) under one or more
&gt;  contributor license agreements.  See the NOTICE file distributed with
&gt;  this work for additional information regarding copyright ownership.
&gt;  The ASF licenses this file to You under the Apache License, Version 2.0
&gt;  (the "License"); you may not use this file except in compliance with
&gt;  the License.  You may obtain a copy of the License at
&gt;      http://www.apache.org/licenses/LICENSE-2.0
&gt;  Unless required by applicable law or agreed to in writing, software
&gt;  distributed under the License is distributed on an "AS IS" BASIS,
&gt;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
&gt;  See the License for the specific language governing permissions and
&gt;  limitations under the License.
&gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt;      define subcomponents such as "Valves" at this level.
&gt;      Documentation at /docs/config/server.html
&gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt;  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt;  &lt;Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt;  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html
--&gt;
&gt;  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt;  &lt;!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html
--&gt;
&gt;  &lt;Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt;  &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt;  &lt;!-- Global JNDI resources
&gt;        Documentation at /docs/jndi-resources-howto.html
&gt;  --&gt;
&gt;  &lt;GlobalNamingResources&gt;
&gt;    &lt;!-- Editable user database that can also be used by
&gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String" value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt; &lt;Environment name="cmts-url"            value="http://localhost:8080/aims2/aims" type="java.lang.String"/&gt;
&gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String" value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties"/&gt;
&gt; &lt;Environment name="cdb-url"              value="http://localhost:8080/alligator" 
type="java.lang.String"/&gt;
&gt; &lt;Environment name="liarRealm"            value="tdhca.liar.ReniRealm"            type="java.lang.String"/&gt;
&gt; &lt;Environment name="tdhca.liar.useDomain" value="false"                           
type="java.lang.String" /&gt;
&gt; &lt;Environment name="tdhca.liar.hashSalt"  value="23049mdx903lzd93jag9845a0gjsscvm"
type="java.lang.String"/&gt;
&gt; 
&gt; &lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;url&lt;/name&gt;
&gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us:1521:dev&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;username&lt;/name&gt;
&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;password&lt;/name&gt;
&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt;            &lt;value&gt;10&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt;            &lt;value&gt;5&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;!-- time to wait for a connection before giving up in milliseconds --&gt;
&gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt;            &lt;value&gt;10000&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt;            &lt;value&gt;true&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;        &lt;/ResourceParams&gt;
&gt;    &lt;Resource auth="Container" description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase"/&gt;
&gt;  &lt;/GlobalNamingResources&gt;
&gt;  &lt;!-- A "Service" is a collection of one or more "Connectors" that share
&gt;        a single "Container" Note:  A "Service" is not itself a "Container",
&gt;        so you may not define subcomponents such as "Valves" at this level.
&gt;        Documentation at /docs/config/service.html
&gt;    --&gt;
&gt;  &lt;Service name="Catalina"&gt;
&gt; 
&gt;    &lt;!--The connectors can use a shared executor, you can define one or more named
thread pools--&gt;
&gt;    &lt;!--
&gt;    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt;        maxThreads="150" minSpareThreads="4"/&gt;
&gt;    --&gt;
&gt; 
&gt; 
&gt;    &lt;!-- A "Connector" represents an endpoint by which requests are received
&gt;          and responses are returned. Documentation at :
&gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp; non-blocking)
&gt;          Java AJP  Connector: /docs/config/ajp.html
&gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt;    --&gt;
&gt;    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/&gt;
&gt;    &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt;    &lt;!--
&gt;    &lt;Connector executor="tomcatThreadPool"
&gt;                port="8080" protocol="HTTP/1.1"
&gt;                connectionTimeout="20000"
&gt;                redirectPort="8443" /&gt;
&gt;    --&gt;
&gt;    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt;          This connector uses the JSSE configuration, when using APR, the
&gt;          connector should be using the OpenSSL style configuration
&gt;          described in the APR documentation --&gt;
&gt;    &lt;!--
&gt;    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt;                maxThreads="150" scheme="https" secure="true"
&gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt;    --&gt;
&gt;    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt;    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt; 
&gt;    &lt;!-- An Engine represents the entry point (within Catalina) that processes
&gt;          every request.  The Engine implementation for Tomcat stand alone
&gt;          analyzes the HTTP headers included with the request, and passes them
&gt;          on to the appropriate Host (virtual host).
&gt;          Documentation at /docs/config/engine.html --&gt;
&gt;    &lt;!-- You should set jvmRoute to support load-balancing via AJP ie :
&gt;    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt;    --&gt;
&gt;    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt;      &lt;!--For clustering, please take a look at documentation at:
&gt;          /docs/cluster-howto.html  (simple how to)
&gt;          /docs/config/cluster.html (reference documentation) --&gt;
&gt;      &lt;!--
&gt;      &lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt;      --&gt;
&gt;      &lt;!-- The request dumper valve dumps useful debugging information about
&gt;            the request and response data received and sent by Tomcat.
&gt;            Documentation at: /docs/config/valve.html --&gt;
&gt;      &lt;!--
&gt;      &lt;Valve className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt;      --&gt;
&gt;      &lt;!-- This Realm uses the UserDatabase configured in the global JNDI
&gt;            resources under the key "UserDatabase".  Any edits
&gt;            that are performed against this UserDatabase are immediately
&gt;            available for use by the Realm.  --&gt;
&gt;      &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/&gt;
&gt;      &lt;!-- Define the default virtual host
&gt;            Note: XML Schema validation will not work with Xerces 2.2.
&gt;        --&gt;
&gt;      &lt;Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"
xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt;        &lt;!-- SingleSignOn valve, share authentication between web applications
&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;        &lt;!--
&gt;        &lt;Valve className="org.apache.catalina.authenticator.SingleSignOn" /&gt;
&gt;        --&gt;
&gt;        &lt;!-- Access log processes all example.
&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;        &lt;!--
&gt;        &lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
&gt;                prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/&gt;
&gt;        --&gt;
&gt;        &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt;                  directory="logs"  prefix="localhost_log." suffix=".txt"
&gt;          timestamp="true"/&gt;
&gt; 
&gt; &lt;Context path="/alligator" docBase="alligator" debug="0" reloadable="true" crossContext="true"&gt;
&gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt; &lt;ResourceLink name="tdhca.liar.useDomain" global="tdhca.liar.useDomain"/&gt;
&gt; &lt;ResourceLink name="tdhca.liar.hashSalt" global="tdhca.liar.hashSalt"/&gt;
&gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"  type="javax.sql.DataSource" /&gt;
&gt; &lt;Environment name="serverName" type="java.lang.String" value="contract"/&gt;
&gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt; &lt;ResourceLink name="contractPropertiesFile" global="contractPropertiesFile"/&gt;
&gt; &lt;/Context&gt;
&gt; 
&gt;      &lt;/Host&gt;
&gt;    &lt;/Engine&gt;
&gt;  &lt;/Service&gt;
&gt; &lt;/Server&gt;
&gt; 
&gt; Thanks for your help.
&gt; 
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt; 
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin

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

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: no suitable driver</title>
<author><name>Wei Zhao &lt;weizhao6898@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c9161C81B-47A4-40EB-BF28-2527B7CB48E4@gmail.com%3e"/>
<id>urn:uuid:%3c9161C81B-47A4-40EB-BF28-2527B7CB48E4@gmail-com%3e</id>
<updated>2009-12-02T20:49:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
What about your build.properties file? I'd try to do a " ant -f build- 
torque.XML jdbc" or some other ant task tomake sure the database is  
set up right.

David

On Dec 2, 2009, at 12:33 PM, Angela Day &lt;akcday@yahoo.com&gt; wrote:

&gt; I am going crazy with a problem I have had for a few days now.  It  
&gt; seems so simple, but I cannot solve the problem.  Any help would be  
&gt; appreciated. I have ojdbc14.jar in the classpath for the env  
&gt; variable path and in the build-torque.xml file.  I am using java 1.5  
&gt; and torque 3.3 and eclipse 3.5.1 and velocity 1.5
&gt;
&gt; Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
&gt; INFO: Initializing Coyote HTTP/1.1 on http-8080
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
&gt; INFO: Initialization processed in 1960 ms
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
&gt; INFO: Starting service Catalina
&gt; Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
&gt; INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009  
&gt; 2:02:47 PM org.apache.catalina.core.StandardContext loadOnStartup
&gt; SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
&gt; at java.sql.DriverManager.getDriver(Unknown Source)
&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
&gt; at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; at org.apache.torque.TorqueInstance.getConnection(
&gt; at org.apache.torque.Torque.getConnection(
&gt; at tdhca.torque.CurrentConnection.getConnection(
&gt; at tdhca.maverick.Dispatcher.initTorque(
&gt; at tdhca.maverick.Dispatcher.init(
&gt; at javax.servlet.GenericServlet.init(
&gt; at org.apache.catalina.core.StandardWrapper.loadServlet(
&gt; at org.apache.catalina.core.StandardWrapper.load(
&gt; at org.apache.catalina.core.StandardContext.loadOnStartup(
&gt; at org.apache.catalina.core.StandardContext.start(
&gt; at org.apache.catalina.core.ContainerBase.start(
&gt; at org.apache.catalina.core.StandardHost.start(
&gt; at org.apache.catalina.core.ContainerBase.start(
&gt; at org.apache.catalina.core.StandardEngine.start(
&gt; at org.apache.catalina.core.StandardService.start(
&gt; at org.apache.catalina.core.StandardServer.start(
&gt; at org.apache.catalina.startup.Catalina.start(
&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(
&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&gt; at java.lang.reflect.Method.invoke(Unknown Source)
&gt; at org.apache.catalina.startup.Bootstrap.start(
&gt; at org.apache.catalina.startup.Bootstrap.main(
&gt; Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: Use of the properties initialization parameter 'properties'  
&gt; has been deprecated by 'org.apache.velocity.properties'
&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: ContextListener: contextInitialized()
&gt; Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
&gt; INFO: SessionListener: contextInitialized()
&gt; Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
&gt; INFO: Starting Coyote HTTP/1.1 on http-8080
&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
&gt; INFO: JK: ajp13 listening on /0.0.0.0:8009
&gt; Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
&gt; INFO: Jk running ID=0 time=0/125 config=null
&gt; Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
&gt; INFO: Server startup in 4885 ms: No suitable  
&gt; driverBasicDataSource.java:1143)BasicDataSource.java:880) 
&gt; TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300) 
&gt; CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307) 
&gt; GenericServlet.java:212)StandardWrapper.java:1173) 
&gt; StandardWrapper.java:993)StandardContext.java:4149) 
&gt; StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java: 
&gt; 722)ContainerBase.java:1045)StandardEngine.java:443) 
&gt; StandardService.java:516)StandardServer.java:710)Catalina.java:583) 
&gt; Native Method)Bootstrap.java:288)Bootstrap.java:413)
&gt;
&gt; Server.xml
&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &lt;!--
&gt;   Licensed to the Apache Software Foundation (ASF) under one or more
&gt;   contributor license agreements.  See the NOTICE file distributed  
&gt; with
&gt;   this work for additional information regarding copyright ownership.
&gt;   The ASF licenses this file to You under the Apache License,  
&gt; Version 2.0
&gt;   (the "License"); you may not use this file except in compliance with
&gt;   the License.  You may obtain a copy of the License at
&gt;       http://www.apache.org/licenses/LICENSE-2.0
&gt;   Unless required by applicable law or agreed to in writing, software
&gt;   distributed under the License is distributed on an "AS IS" BASIS,
&gt;   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
&gt; implied.
&gt;   See the License for the specific language governing permissions and
&gt;   limitations under the License.
&gt; --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
&gt;      define subcomponents such as "Valves" at this level.
&gt;      Documentation at /docs/config/server.html
&gt;  --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
&gt;   &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
&gt;   &lt;Listener SSLEngine="on"  
&gt; className="org.apache.catalina.core.AprLifecycleListener"/&gt;
&gt;   &lt;!--Initialize Jasper prior to webapps are loaded. Documentation  
&gt; at /docs/jasper-howto.html --&gt;
&gt;   &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
&gt;   &lt;!-- JMX Support for the Tomcat server. Documentation at /docs/non- 
&gt; existent.html --&gt;
&gt;   &lt;Listener  
&gt; className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
&gt;   &lt;Listener  
&gt; className= 
&gt; "org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
&gt;   &lt;!-- Global JNDI resources
&gt;        Documentation at /docs/jndi-resources-howto.html
&gt;   --&gt;
&gt;   &lt;GlobalNamingResources&gt;
&gt;     &lt;!-- Editable user database that can also be used by
&gt;          UserDatabaseRealm to authenticate users  --&gt;
&gt; &lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&gt; &lt;Environment name="contractPropertiesFile" type="java.lang.String"  
&gt; value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&gt; &lt;Environment name="cmts-url"             value="http://localhost:8080/aims2/aims 
&gt; " type="java.lang.String"/&gt;
&gt; &lt;Environment name="cseaPropertiesFile" type="java.lang.String"  
&gt; value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\ 
&gt; \csea.properties"/&gt;
&gt; &lt;Environment name="cdb-url"              value="http://localhost:8080/alligator 
&gt; "  type="java.lang.String"/&gt;
&gt; &lt;Environment name="liarRealm"             
&gt; value="tdhca.liar.ReniRealm"             type="java.lang.String"/&gt;
&gt; &lt;Environment name="tdhca.liar.useDomain"  
&gt; value="false"                            type="java.lang.String" /&gt;
&gt; &lt;Environment name="tdhca.liar.hashSalt"   
&gt; value="23049mdx903lzd93jag9845a0gjsscvm" type="java.lang.String"/&gt;
&gt;
&gt; &lt;Resource name="jdbc/cmts" auth="Container"  
&gt; type="javax.sql.DataSource"/&gt;
&gt;        &lt;ResourceParams name="jdbc/cmts"&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;factory&lt;/name&gt;
&gt;            &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/ 
&gt; value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;driverClassName&lt;/name&gt;
&gt;            &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;url&lt;/name&gt;
&gt;            &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us: 
&gt; 1521:dev&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;username&lt;/name&gt;
&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;password&lt;/name&gt;
&gt;            &lt;value&gt;xxx&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;maxActive&lt;/name&gt;
&gt;            &lt;value&gt;10&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;maxIdle&lt;/name&gt;
&gt;            &lt;value&gt;5&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;!-- time to wait for a connection before giving up in  
&gt; milliseconds --&gt;
&gt;            &lt;name&gt;maxWait&lt;/name&gt;
&gt;            &lt;value&gt;10000&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;testWhileIdle&lt;/name&gt;
&gt;            &lt;value&gt;true&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;          &lt;parameter&gt;
&gt;            &lt;name&gt;validationQuery&lt;/name&gt;
&gt;            &lt;value&gt;select 1 from dual&lt;/value&gt;
&gt;          &lt;/parameter&gt;
&gt;        &lt;/ResourceParams&gt;
&gt;     &lt;Resource auth="Container" description="User database that can  
&gt; be updated and saved"  
&gt; factory="org.apache.catalina.users.MemoryUserDatabaseFactory"  
&gt; name="UserDatabase" pathname="conf/tomcat-users.xml"  
&gt; type="org.apache.catalina.UserDatabase"/&gt;
&gt;   &lt;/GlobalNamingResources&gt;
&gt;   &lt;!-- A "Service" is a collection of one or more "Connectors" that  
&gt; share
&gt;        a single "Container" Note:  A "Service" is not itself a  
&gt; "Container",
&gt;        so you may not define subcomponents such as "Valves" at this  
&gt; level.
&gt;        Documentation at /docs/config/service.html
&gt;    --&gt;
&gt;   &lt;Service name="Catalina"&gt;
&gt;
&gt;     &lt;!--The connectors can use a shared executor, you can define one  
&gt; or more named thread pools--&gt;
&gt;     &lt;!--
&gt;     &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
&gt;         maxThreads="150" minSpareThreads="4"/&gt;
&gt;     --&gt;
&gt;
&gt;
&gt;     &lt;!-- A "Connector" represents an endpoint by which requests are  
&gt; received
&gt;          and responses are returned. Documentation at :
&gt;          Java HTTP Connector: /docs/config/http.html (blocking &amp; non- 
&gt; blocking)
&gt;          Java AJP  Connector: /docs/config/ajp.html
&gt;          APR (HTTP/AJP) Connector: /docs/apr.html
&gt;          Define a non-SSL HTTP/1.1 Connector on port 8080
&gt;     --&gt;
&gt;     &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/ 
&gt; 1.1" redirectPort="8443"/&gt;
&gt;     &lt;!-- A "Connector" using the shared thread pool--&gt;
&gt;     &lt;!--
&gt;     &lt;Connector executor="tomcatThreadPool"
&gt;                port="8080" protocol="HTTP/1.1"
&gt;                connectionTimeout="20000"
&gt;                redirectPort="8443" /&gt;
&gt;     --&gt;
&gt;     &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
&gt;          This connector uses the JSSE configuration, when using APR,  
&gt; the
&gt;          connector should be using the OpenSSL style configuration
&gt;          described in the APR documentation --&gt;
&gt;     &lt;!--
&gt;     &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
&gt;                maxThreads="150" scheme="https" secure="true"
&gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt;     --&gt;
&gt;     &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
&gt;     &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
&gt;
&gt;     &lt;!-- An Engine represents the entry point (within Catalina) that  
&gt; processes
&gt;          every request.  The Engine implementation for Tomcat stand  
&gt; alone
&gt;          analyzes the HTTP headers included with the request, and  
&gt; passes them
&gt;          on to the appropriate Host (virtual host).
&gt;          Documentation at /docs/config/engine.html --&gt;
&gt;     &lt;!-- You should set jvmRoute to support load-balancing via AJP  
&gt; ie :
&gt;     &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;
&gt;     --&gt;
&gt;     &lt;Engine defaultHost="localhost" name="Catalina"&gt;
&gt;       &lt;!--For clustering, please take a look at documentation at:
&gt;           /docs/cluster-howto.html  (simple how to)
&gt;           /docs/config/cluster.html (reference documentation) --&gt;
&gt;       &lt;!--
&gt;       &lt;Cluster  
&gt; className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
&gt;       --&gt;
&gt;       &lt;!-- The request dumper valve dumps useful debugging  
&gt; information about
&gt;            the request and response data received and sent by Tomcat.
&gt;            Documentation at: /docs/config/valve.html --&gt;
&gt;       &lt;!--
&gt;       &lt;Valve  
&gt; className="org.apache.catalina.valves.RequestDumperValve"/&gt;
&gt;       --&gt;
&gt;       &lt;!-- This Realm uses the UserDatabase configured in the global  
&gt; JNDI
&gt;            resources under the key "UserDatabase".  Any edits
&gt;            that are performed against this UserDatabase are  
&gt; immediately
&gt;            available for use by the Realm.  --&gt;
&gt;       &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm"  
&gt; resourceName="UserDatabase"/&gt;
&gt;       &lt;!-- Define the default virtual host
&gt;            Note: XML Schema validation will not work with Xerces 2.2.
&gt;        --&gt;
&gt;       &lt;Host appBase="webapps" autoDeploy="true" name="localhost"  
&gt; unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"&gt;
&gt;         &lt;!-- SingleSignOn valve, share authentication between web  
&gt; applications
&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;         &lt;!--
&gt;         &lt;Valve  
&gt; className="org.apache.catalina.authenticator.SingleSignOn" /&gt;
&gt;         --&gt;
&gt;         &lt;!-- Access log processes all example.
&gt;              Documentation at: /docs/config/valve.html --&gt;
&gt;         &lt;!--
&gt;         &lt;Valve className="org.apache.catalina.valves.AccessLogValve"  
&gt; directory="logs"
&gt;                prefix="localhost_access_log." suffix=".txt"  
&gt; pattern="common" resolveHosts="false"/&gt;
&gt;         --&gt;
&gt;         &lt;Logger className="org.apache.catalina.logger.FileLogger"
&gt;                  directory="logs"  prefix="localhost_log."  
&gt; suffix=".txt"
&gt;          timestamp="true"/&gt;
&gt;
&gt; &lt;Context path="/alligator" docBase="alligator" debug="0"  
&gt; reloadable="true" crossContext="true"&gt;
&gt; &lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&gt; &lt;ResourceLink name="tdhca.liar.useDomain"  
&gt; global="tdhca.liar.useDomain"/&gt;
&gt; &lt;ResourceLink name="tdhca.liar.hashSalt"  
&gt; global="tdhca.liar.hashSalt"/&gt;
&gt; &lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&gt; &lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&gt; &lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&gt; &lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"   
&gt; type="javax.sql.DataSource" /&gt;
&gt; &lt;Environment name="serverName" type="java.lang.String"  
&gt; value="contract"/&gt;
&gt; &lt;ResourceLink name="envName" global="envName"/&gt;
&gt; &lt;ResourceLink name="contractPropertiesFile"  
&gt; global="contractPropertiesFile"/&gt;
&gt; &lt;/Context&gt;
&gt;
&gt;       &lt;/Host&gt;
&gt;     &lt;/Engine&gt;
&gt;   &lt;/Service&gt;
&gt; &lt;/Server&gt;
&gt;
&gt; Thanks for your help.
&gt;
&gt; Angela Day
&gt; National Autism Association of Central Texas
&gt;
&gt; http://www.naacentraltexas.org
&gt; formally FEAT Austin

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



</pre>
</div>
</content>
</entry>
<entry>
<title>no suitable driver</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200912.mbox/%3c755835.25575.qm@web33308.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c755835-25575-qm@web33308-mail-mud-yahoo-com%3e</id>
<updated>2009-12-02T20:33:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I am going crazy with a problem I have had for a few days now.  It seems so simple, but I cannot
solve the problem.  Any help would be appreciated. I have ojdbc14.jar in the classpath for
the env variable path and in the build-torque.xml file.  I am using java 1.5 and torque 3.3
and eclipse 3.5.1 and velocity 1.5

Dec 2, 2009 2:02:45 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 2, 2009 2:02:45 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1960 ms
Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 2, 2009 2:02:45 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20Dec 2, 2009 2:02:47 PM org.apache.catalina.core.StandardContext
loadOnStartup
SEVERE: Servlet /alligator threw load() exceptionjava.sql.SQLException
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
at org.apache.torque.TorqueInstance.getConnection(
at org.apache.torque.TorqueInstance.getConnection(
at org.apache.torque.Torque.getConnection(
at tdhca.torque.CurrentConnection.getConnection(
at tdhca.maverick.Dispatcher.initTorque(
at tdhca.maverick.Dispatcher.init(
at javax.servlet.GenericServlet.init(
at org.apache.catalina.core.StandardWrapper.loadServlet(
at org.apache.catalina.core.StandardWrapper.load(
at org.apache.catalina.core.StandardContext.loadOnStartup(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(
Dec 2, 2009 2:02:47 PM org.apache.catalina.core.ApplicationContext log
INFO: Use of the properties initialization parameter 'properties' has been deprecated by 'org.apache.velocity.properties'
Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 2, 2009 2:02:49 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 2, 2009 2:02:50 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 2, 2009 2:02:50 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 2, 2009 2:02:50 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/125 config=null
Dec 2, 2009 2:02:50 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4885 ms: No suitable driverBasicDataSource.java:1143)BasicDataSource.java:880)TorqueInstance.java:912)TorqueInstance.java:891)Torque.java:300)CurrentConnection.java:32)Dispatcher.java:375)Dispatcher.java:307)GenericServlet.java:212)StandardWrapper.java:1173)StandardWrapper.java:993)StandardContext.java:4149)StandardContext.java:4458)ContainerBase.java:1045)StandardHost.java:722)ContainerBase.java:1045)StandardEngine.java:443)StandardService.java:516)StandardServer.java:710)Catalina.java:583)Native
Method)Bootstrap.java:288)Bootstrap.java:413)

Server.xml
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
  &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
  &lt;Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/&gt;
  &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html
--&gt;
  &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
  &lt;!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html --&gt;
  &lt;Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/&gt;
  &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
  &lt;!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  --&gt;
  &lt;GlobalNamingResources&gt;
    &lt;!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users  --&gt;
&lt;Environment name="envName" type="java.lang.String" value="DEV"/&gt;
&lt;Environment name="contractPropertiesFile" type="java.lang.String" value="C:\\workspace\\contract\\conf\\contract.properties"/&gt;
&lt;Environment name="cmts-url"             value="http://localhost:8080/aims2/aims" type="java.lang.String"/&gt;
&lt;Environment name="cseaPropertiesFile" type="java.lang.String" value="C:\\apache-tomcat-6.0.20\\webapps\\csea\\WEB-INF\\csea.properties"/&gt;
&lt;Environment name="cdb-url"              value="http://localhost:8080/alligator"  type="java.lang.String"/&gt;
&lt;Environment name="liarRealm"            value="tdhca.liar.ReniRealm"             type="java.lang.String"/&gt;
&lt;Environment name="tdhca.liar.useDomain" value="false"                            type="java.lang.String"
/&gt;
&lt;Environment name="tdhca.liar.hashSalt"  value="23049mdx903lzd93jag9845a0gjsscvm" type="java.lang.String"/&gt;

&lt;Resource name="jdbc/cmts" auth="Container" type="javax.sql.DataSource"/&gt;
       &lt;ResourceParams name="jdbc/cmts"&gt;
         &lt;parameter&gt;
           &lt;name&gt;factory&lt;/name&gt;
           &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;driverClassName&lt;/name&gt;
           &lt;value&gt;oracle.jdbc.driver.OracleDriver&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;url&lt;/name&gt;
           &lt;value&gt;jdbc:oracle:thin:sysadm2@atlow.tdhca.state.tx.us:1521:dev&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;username&lt;/name&gt;
           &lt;value&gt;xxx&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;password&lt;/name&gt;
           &lt;value&gt;xxx&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;maxActive&lt;/name&gt;
           &lt;value&gt;10&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;maxIdle&lt;/name&gt;
           &lt;value&gt;5&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;!-- time to wait for a connection before giving up in milliseconds --&gt;
           &lt;name&gt;maxWait&lt;/name&gt;
           &lt;value&gt;10000&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;testWhileIdle&lt;/name&gt;
           &lt;value&gt;true&lt;/value&gt;
         &lt;/parameter&gt;
         &lt;parameter&gt;
           &lt;name&gt;validationQuery&lt;/name&gt;
           &lt;value&gt;select 1 from dual&lt;/value&gt;
         &lt;/parameter&gt;
       &lt;/ResourceParams&gt;
    &lt;Resource auth="Container" description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase"/&gt;
  &lt;/GlobalNamingResources&gt;
  &lt;!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container", 
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   --&gt;
  &lt;Service name="Catalina"&gt;
  
    &lt;!--The connectors can use a shared executor, you can define one or more named thread
pools--&gt;
    &lt;!--
    &lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
        maxThreads="150" minSpareThreads="4"/&gt;
    --&gt;
    
    
    &lt;!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking &amp; non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    --&gt;
    &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/&gt;
    &lt;!-- A "Connector" using the shared thread pool--&gt;
    &lt;!--
    &lt;Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" /&gt;
    --&gt;           
    &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the 
         connector should be using the OpenSSL style configuration
         described in the APR documentation --&gt;
    &lt;!--
    &lt;Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" /&gt;
    --&gt;
    &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
    &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;

    &lt;!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html --&gt;
    &lt;!-- You should set jvmRoute to support load-balancing via AJP ie :
    &lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"&gt;         
    --&gt; 
    &lt;Engine defaultHost="localhost" name="Catalina"&gt;
      &lt;!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) --&gt;
      &lt;!--
      &lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/&gt;
      --&gt;        
      &lt;!-- The request dumper valve dumps useful debugging information about
           the request and response data received and sent by Tomcat.
           Documentation at: /docs/config/valve.html --&gt;
      &lt;!--
      &lt;Valve className="org.apache.catalina.valves.RequestDumperValve"/&gt;
      --&gt;
      &lt;!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  --&gt;
      &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/&gt;
      &lt;!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       --&gt;
      &lt;Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false"
xmlValidation="false"&gt;
        &lt;!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html --&gt;
        &lt;!--
        &lt;Valve className="org.apache.catalina.authenticator.SingleSignOn" /&gt;
        --&gt;
        &lt;!-- Access log processes all example.
             Documentation at: /docs/config/valve.html --&gt;
        &lt;!--
        &lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 

               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/&gt;
        --&gt;
        &lt;Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
         timestamp="true"/&gt;

&lt;Context path="/alligator" docBase="alligator" debug="0" reloadable="true" crossContext="true"&gt;
&lt;ResourceLink name="liarRealm" global="liarRealm"/&gt;
&lt;ResourceLink name="tdhca.liar.useDomain" global="tdhca.liar.useDomain"/&gt;
&lt;ResourceLink name="tdhca.liar.hashSalt" global="tdhca.liar.hashSalt"/&gt;
&lt;ResourceLink name="cmts-url" global="cmts-url"/&gt;
&lt;ResourceLink name="mf-url" global="mf-url"/&gt;
&lt;ResourceLink name="cdb-url" global="cdb-url"/&gt;
&lt;ResourceLink name="jdbc/cdb" global="jdbc/cmts"  type="javax.sql.DataSource" /&gt;
&lt;Environment name="serverName" type="java.lang.String" value="contract"/&gt;
&lt;ResourceLink name="envName" global="envName"/&gt;
&lt;ResourceLink name="contractPropertiesFile" global="contractPropertiesFile"/&gt;
&lt;/Context&gt;

      &lt;/Host&gt;
    &lt;/Engine&gt;
  &lt;/Service&gt;
&lt;/Server&gt;
 
Thanks for your help.

Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Not Generating Base Classes</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c482199.43817.qm@web33308.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c482199-43817-qm@web33308-mail-mud-yahoo-com%3e</id>
<updated>2009-11-24T15:20:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I am getting this error in the velocity log:
RHS of #set statement is null. Context will not be modified. om/Control.vm [line 105, column
1], one for each table.  line 105 is 

        #set ($retVar = $builderArray.add("${packagePeer}.${tbl.JavaName}Peer") )


I started over when the templates and still have the same problem.  If I move the code from
the BaseControl.vm to the Control.vm then it generates the base classes, but that is not the
ultimate answer. 

Also, another problem, I cannot get the base classes to build into a separate directory. 
I used the torque.subpackage.base in the default.properties, but it does not work.

Thanks for your help.

 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: Thomas Fischer &lt;fischer@seitenbau.net&gt;
To: Apache Torque Users List &lt;torque-user@db.apache.org&gt;
Sent: Tue, November 24, 2009 1:22:31 AM
Subject: Re: Not Generating Base Classes

&gt; Upgraded to Torque 3.3 and now not generating Base Classes.  All
&gt; other classes created.  No errors generating.  What am I doing wrong?

In the standard setup out of the box, Torque generates base classes. So
either there should be an error message in the velocity.log, or you have
changed the setup such that base classes are no longer created. In the
latter case, it would be helpful to know in which ways your setup differs
from the standard setup.

I'd recommend downloading the torque generator anew, runnung it on your
schema and then figure out the differences between your setup and the
standard setup. Maybe it is apparent which change it is, or otherwise you
need to apply the changes one after another and check which has this
effect.

        Thomas


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

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Not Generating Base Classes</title>
<author><name>Thomas Fischer &lt;fischer@seitenbau.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3cOF9423894D.F607D2F3-ONC1257678.00233DBE-C1257678.00288506@seitenbau.net%3e"/>
<id>urn:uuid:%3cOF9423894D-F607D2F3-ONC1257678-00233DBE-C1257678-00288506@seitenbau-net%3e</id>
<updated>2009-11-24T07:22:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; Upgraded to Torque 3.3 and now not generating Base Classes.  All
&gt; other classes created.  No errors generating.  What am I doing wrong?

In the standard setup out of the box, Torque generates base classes. So
either there should be an error message in the velocity.log, or you have
changed the setup such that base classes are no longer created. In the
latter case, it would be helpful to know in which ways your setup differs
from the standard setup.

I'd recommend downloading the torque generator anew, runnung it on your
schema and then figure out the differences between your setup and the
standard setup. Maybe it is apparent which change it is, or otherwise you
need to apply the changes one after another and check which has this
effect.

        Thomas


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Not Generating Base Classes</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c344717.65992.qm@web33306.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c344717-65992-qm@web33306-mail-mud-yahoo-com%3e</id>
<updated>2009-11-23T19:30:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Upgraded to Torque 3.3 and now not generating Base Classes.  All other classes created.  No
errors generating.  What am I doing wrong?

Thanks,

 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin


</pre>
</div>
</content>
</entry>
<entry>
<title>Problem with goal datasql</title>
<author><name>&quot;Ludwig Magnusson&quot; &lt;ludwig@itcatapult.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c000001ca693d$72f01a60$58d04f20$@com%3e"/>
<id>urn:uuid:%3c000001ca693d$72f01a60$58d04f20$@com%3e</id>
<updated>2009-11-19T17:26:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi!

I have a problem with the maven 2 plugin and the goal datasql.

When I run mvn torque:datasql, maven prints:

 

[INFO] XmlToAppData - Parsing file: 'schema.xml'

[INFO] XmlToData - Resolver: used
file:///c:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webap
ps/myproject/torque/schema/torque-data.dtd
&lt;file:///c:\Program%20Files\Apache%20Software%20Foundation\Tomcat%206.0\weba
pps\myproject\torque\schema\torque-data.dtd&gt; 

 

After that, nothing prints and a while later I get a OutOfMemoryError. 

I have specified my data.xml file in &lt;dataXmlFile&gt;

Is there something I am missing or doing wrong?

/Ludwig



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Thomas Vandahl &lt;tv@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4B02F4A3.5040308@apache.org%3e"/>
<id>urn:uuid:%3c4B02F4A3-5040308@apache-org%3e</id>
<updated>2009-11-17T19:08:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Greg Monroe wrote:
&gt; Connection srcConn = Torque.getConnection("databaseA");
&gt; Connection destConn = Torque.getConnection("databaseB");

Don't want to be picky, but the recommended method is

	Connection srcConn = Transaction.begin("databaseA");

&gt; } finally {
&gt; 	Torque.closeConnection(srcConn);

and Transaction.commit(srcConn), respectively.

BTW: The limitations with your described approach look serious to me.
You would need a lot of comments to explain what you're about to do,
wouldn't you?

Bye, Thomas.


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Criteria needs write permissions?</title>
<author><name>Greg Monroe &lt;Greg.Monroe@dukece.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C76A@durham-e2k7mb1.dukece.com%3e"/>
<id>urn:uuid:%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C76A@durham-e2k7mb1-dukece-com%3e</id>
<updated>2009-11-17T14:23:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The schema databasemap name (e.g. defaultDB) will always be hard coded to the
name in the XML file.  So, it will never be found in another "Database" object.

Your code snippet doesn't connect the "nondefaultDB" pool name to anything
the criteria/SQLBuilder uses.  But your debugging showed it was looking for 
this name. I suspect this is because your runtime torque.database.default 
property set to "nondefaultDB".

This property is the "name" that Torque uses for the default if none is specified.

Try either changing your runtime settings to use "defaultDB" or specify the 
"defaultDB" name on your criteria constructor, e.g. new Criteria("defaultDB").
This will make sure that the "name" used will match the schema name.

&gt; -----Original Message-----
&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt; Sent: Monday, November 16, 2009 5:19 PM
&gt; To: Apache Torque Users List
&gt; Subject: Re: Criteria needs write permissions?
&gt; 
&gt; "Second, create all criteria element using the *Peer objects.  The
&gt; DatabaseMap is populated when a *Peer class is loaded (static init).
&gt; So, all tables "Maps" you will be referencing will exist in a Database
&gt; object keyed to the DB Schema Name."
&gt; 
&gt; This seems to be where I'm failing. Yes some queries will work. But I
&gt; don't think
&gt; the metadata areas will work. If this is what you meant, then I
&gt; apologize.
&gt; 
&gt; For example. Use an OrderBy clause for selecting from a database
&gt; connection pool
&gt; that is not from the default schema for that object.
&gt; 
&gt; Connection srcConn = Torque.getConnection("nondefaultDB");
&gt; Criteria critera = new Criteria();
&gt; criteria.addAscendingOrderByColumn(TableAPeer.COLA);
&gt; TableAPeer.doSelect(criteria,srcConn);
&gt; 
&gt; This doesn't work for me because TableA does not exist in the dbMap
&gt; for "nondefaultDB". It does exist in the dbMap for "defaultDB" because
&gt; that's
&gt; what's coded via the schema name.
&gt; 
&gt; SQLBuilder succeeds at building the query for
&gt; 
&gt; c.add(TableAPeer.COLA, 4);
&gt; 
&gt; because it doesn't reference any metadata.
&gt; 
&gt; It fails on the processOrderBy(db, dbMap, crit, query);
&gt; because this function assumes the metadata is there.
&gt; 
&gt; 
&gt; Ross
&gt; 
&gt; 
DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Sheldon Ross &lt;sross@simmgene.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4B01CFD7.9000108@simmgene.com%3e"/>
<id>urn:uuid:%3c4B01CFD7-9000108@simmgene-com%3e</id>
<updated>2009-11-16T22:19:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
"Second, create all criteria element using the *Peer objects.  The
DatabaseMap is populated when a *Peer class is loaded (static init).
So, all tables "Maps" you will be referencing will exist in a Database 
object keyed to the DB Schema Name."

This seems to be where I'm failing. Yes some queries will work. But I don't think
the metadata areas will work. If this is what you meant, then I apologize.

For example. Use an OrderBy clause for selecting from a database connection pool
that is not from the default schema for that object.

Connection srcConn = Torque.getConnection("nondefaultDB");
Criteria critera = new Criteria();
criteria.addAscendingOrderByColumn(TableAPeer.COLA);
TableAPeer.doSelect(criteria,srcConn);

This doesn't work for me because TableA does not exist in the dbMap
for "nondefaultDB". It does exist in the dbMap for "defaultDB" because that's
what's coded via the schema name.

SQLBuilder succeeds at building the query for 

c.add(TableAPeer.COLA, 4); 

because it doesn't reference any metadata.

It fails on the processOrderBy(db, dbMap, crit, query);
because this function assumes the metadata is there.


Ross


Greg Monroe wrote:
&gt; Sorry for the delay, out for a long weekend (gotta stay in bed on Fri 13th!).
&gt;
&gt; Simple Torque Objects CAN be used with two different connection pools.  
&gt; I have done this myself.  However, there are some special limitations. I 
&gt; spent some time wandering the code and refreshing my memory and here's 
&gt; what I found.
&gt;
&gt; First, you need to understand some definitions:
&gt;
&gt; Simple Torque Objects - Just the core record information methods. The methods 
&gt; generated by the complexObjectModel build property (e.g. the ones which 
&gt; generate the methods to get the related foreign key and children objects) 
&gt; do not work. The autogenerated code assumes a lot about which connection
&gt; to use.
&gt;
&gt; DBSchema Name - This is a string key defined via the XML schema database 
&gt; name attribute. It is used internally by Torque to tie together all the
&gt; schema "metadata" in a "DatabaseMap".  This is used by Torque to determine
&gt; things like table names, column attributes, and the like.  
&gt;
&gt; DatabaseMap - This is the object that contains all the meta data *Map 
&gt; objects related to a specific DBSchema name.
&gt;
&gt; DB Connection Pool Name - This is a string key that is defined in the 
&gt; Torque runtime properties, e.g. the torque.dsfactory.&lt;DB Connection Name&gt;.*
&gt; properties.  This is eventually stored in a Database object in the 
&gt; TorqueInstance.
&gt;
&gt; Database Object - This is a container for information relating to a 
&gt; database, e.g. the connection pool info, the dbmap, the idbroker info,
&gt; and the like.  However, you can have a Database Object that does not
&gt; contain all this info (e.g. a Database object with just connection 
&gt; info).
&gt;
&gt; Because of historical design purposes lost in antiquity, the DB Schema
&gt; name and the DB Connection Name tend to be considered to be the same.
&gt; Many of the references to "DBName" are not clearly labeled as to which
&gt; name is meant. This has lead to some poor internal coding and a lot of 
&gt; confusion.  One of the goals of Torque 4.0 is to try to correct this.
&gt;
&gt; So, how do you use Simple Torque objects with multiple DBs...
&gt;
&gt; First, set up your connection pools in the runtime properties.  E.g.
&gt; torque.dsfactory.databaseA.* and torque.dsfactory.databaseB.
&gt;
&gt; Second, create all criteria element using the *Peer objects.  The
&gt; DatabaseMap is populated when a *Peer class is loaded (static init).
&gt; So, all tables "Maps" you will be referencing will exist in a Database 
&gt; object keyed to the DB Schema Name.  
&gt;
&gt; NOTE: The dbName parameter on the Criteria constructor refers to the
&gt; DB Schema Name and NOT directly to a DB Connection Pool Name.  If there
&gt; is a DB Connection Pool defined with the same name, this will be used.
&gt;
&gt; You need to write your code to use the methods that have a connection 
&gt; parameter.  E.g., TablePeer.doSelect(Criteria, Connection).
&gt;
&gt; You get the connection object to use with this via the 
&gt; Toque.getConnection(String name) static method.  The name here is the
&gt; DB Connection Pool name.
&gt;
&gt; To tie this all together with some sample code that will move data
&gt; from one DB to another one:
&gt;
&gt; Criteria c = new Criteria();  
&gt; c.add(TableAPeer.COLA, 4);
&gt; Connection srcConn = Torque.getConnection("databaseA");
&gt; Connection destConn = Torque.getConnection("databaseB");
&gt; try {
&gt;     List results = TableAPeer.doSelect(c,srcConn);
&gt;     Iterator rIt = results.iterator();
&gt;     while( rIt.hasNext() ) {
&gt;         TableA rec = (TableA) rIt.next();
&gt;         rec.save(destConn);      
&gt;     }
&gt;       
&gt; } finally {
&gt; 	Torque.closeConnection(srcConn);
&gt;       Torque.closeConnection(destConn);
&gt; }
&gt;
&gt;
&gt;
&gt;   
&gt;&gt; -----Original Message-----
&gt;&gt; From: Alvaro Coronel [mailto:alvarocoronel67@yahoo.com]
&gt;&gt; Sent: Friday, November 13, 2009 10:50 AM
&gt;&gt; To: Apache Torque Users List
&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt;&gt;
&gt;&gt; Does that mean that a Torque object can be used with two different
&gt;&gt; connections as long as no pool is involved?
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; ________________________________
&gt;&gt; From: Thomas Vandahl &lt;tv@apache.org&gt;
&gt;&gt; To: torque-user@db.apache.org
&gt;&gt; Sent: Fri, November 13, 2009 1:27:26 PM
&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt;&gt;
&gt;&gt; On 13.11.09 08:12, Thomas Fischer wrote:
&gt;&gt;     
&gt;&gt;&gt; I'm not sure whether this is a bug or not, I need to think about it. If
&gt;&gt;&gt;       
&gt;&gt; i
&gt;&gt;     
&gt;&gt;&gt; remember correctly, the database name is used for the database
&gt;&gt;&gt;       
&gt;&gt; connection
&gt;&gt;     
&gt;&gt;&gt; (including credentials) and the table layout. Probably there are some
&gt;&gt;&gt;       
&gt;&gt; cases
&gt;&gt;     
&gt;&gt;&gt; where this wants to be treated differently.
&gt;&gt;&gt;       
&gt;&gt; As I see it, the limitation is that a Torque object can only be used
&gt;&gt; with one database connection pool. This might or might not be considered
&gt;&gt; a bug, however, the given application type does not look typical to me.
&gt;&gt;
&gt;&gt; Bye, Thomas.
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;     
&gt; DukeCE Privacy Statement:
&gt; Please be advised that this e-mail and any files transmitted with
&gt; it are confidential communication or may otherwise be privileged or
&gt; confidential and are intended solely for the individual or entity
&gt; to whom they are addressed. If you are not the intended recipient
&gt; you may not rely on the contents of this email or any attachments,
&gt; and we ask that you please not read, copy or retransmit this
&gt; communication, but reply to the sender and destroy the email, its
&gt; contents, and all copies thereof immediately. Any unauthorized
&gt; dissemination, distribution or copying of this communication is
&gt; strictly prohibited.
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;
&gt;
&gt;   

-- 
Sheldon Ross
Software Development
American Simmental Association
sross@simmgene.com
(406)587-4531 ext 102 


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Criteria needs write permissions?</title>
<author><name>Greg Monroe &lt;Greg.Monroe@dukece.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C767@durham-e2k7mb1.dukece.com%3e"/>
<id>urn:uuid:%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C767@durham-e2k7mb1-dukece-com%3e</id>
<updated>2009-11-16T16:03:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Sorry for the delay, out for a long weekend (gotta stay in bed on Fri 13th!).

Simple Torque Objects CAN be used with two different connection pools.  
I have done this myself.  However, there are some special limitations. I 
spent some time wandering the code and refreshing my memory and here's 
what I found.

First, you need to understand some definitions:

Simple Torque Objects - Just the core record information methods. The methods 
generated by the complexObjectModel build property (e.g. the ones which 
generate the methods to get the related foreign key and children objects) 
do not work. The autogenerated code assumes a lot about which connection
to use.

DBSchema Name - This is a string key defined via the XML schema database 
name attribute. It is used internally by Torque to tie together all the
schema "metadata" in a "DatabaseMap".  This is used by Torque to determine
things like table names, column attributes, and the like.  

DatabaseMap - This is the object that contains all the meta data *Map 
objects related to a specific DBSchema name.

DB Connection Pool Name - This is a string key that is defined in the 
Torque runtime properties, e.g. the torque.dsfactory.&lt;DB Connection Name&gt;.*
properties.  This is eventually stored in a Database object in the 
TorqueInstance.

Database Object - This is a container for information relating to a 
database, e.g. the connection pool info, the dbmap, the idbroker info,
and the like.  However, you can have a Database Object that does not
contain all this info (e.g. a Database object with just connection 
info).

Because of historical design purposes lost in antiquity, the DB Schema
name and the DB Connection Name tend to be considered to be the same.
Many of the references to "DBName" are not clearly labeled as to which
name is meant. This has lead to some poor internal coding and a lot of 
confusion.  One of the goals of Torque 4.0 is to try to correct this.

So, how do you use Simple Torque objects with multiple DBs...

First, set up your connection pools in the runtime properties.  E.g.
torque.dsfactory.databaseA.* and torque.dsfactory.databaseB.

Second, create all criteria element using the *Peer objects.  The
DatabaseMap is populated when a *Peer class is loaded (static init).
So, all tables "Maps" you will be referencing will exist in a Database 
object keyed to the DB Schema Name.  

NOTE: The dbName parameter on the Criteria constructor refers to the
DB Schema Name and NOT directly to a DB Connection Pool Name.  If there
is a DB Connection Pool defined with the same name, this will be used.

You need to write your code to use the methods that have a connection 
parameter.  E.g., TablePeer.doSelect(Criteria, Connection).

You get the connection object to use with this via the 
Toque.getConnection(String name) static method.  The name here is the
DB Connection Pool name.

To tie this all together with some sample code that will move data
from one DB to another one:

Criteria c = new Criteria();  
c.add(TableAPeer.COLA, 4);
Connection srcConn = Torque.getConnection("databaseA");
Connection destConn = Torque.getConnection("databaseB");
try {
    List results = TableAPeer.doSelect(c,srcConn);
    Iterator rIt = results.iterator();
    while( rIt.hasNext() ) {
        TableA rec = (TableA) rIt.next();
        rec.save(destConn);      
    }
      
} finally {
	Torque.closeConnection(srcConn);
      Torque.closeConnection(destConn);
}



&gt; -----Original Message-----
&gt; From: Alvaro Coronel [mailto:alvarocoronel67@yahoo.com]
&gt; Sent: Friday, November 13, 2009 10:50 AM
&gt; To: Apache Torque Users List
&gt; Subject: Re: Criteria needs write permissions?
&gt; 
&gt; Does that mean that a Torque object can be used with two different
&gt; connections as long as no pool is involved?
&gt; 
&gt; 
&gt; 
&gt; ________________________________
&gt; From: Thomas Vandahl &lt;tv@apache.org&gt;
&gt; To: torque-user@db.apache.org
&gt; Sent: Fri, November 13, 2009 1:27:26 PM
&gt; Subject: Re: Criteria needs write permissions?
&gt; 
&gt; On 13.11.09 08:12, Thomas Fischer wrote:
&gt; &gt; I'm not sure whether this is a bug or not, I need to think about it. If
&gt; i
&gt; &gt; remember correctly, the database name is used for the database
&gt; connection
&gt; &gt; (including credentials) and the table layout. Probably there are some
&gt; cases
&gt; &gt; where this wants to be treated differently.
&gt; 
&gt; As I see it, the limitation is that a Torque object can only be used
&gt; with one database connection pool. This might or might not be considered
&gt; a bug, however, the given application type does not look typical to me.
&gt; 
&gt; Bye, Thomas.
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; 
&gt; 
&gt; 
DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Alvaro Coronel &lt;alvarocoronel67@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c67020.35310.qm@web50801.mail.re2.yahoo.com%3e"/>
<id>urn:uuid:%3c67020-35310-qm@web50801-mail-re2-yahoo-com%3e</id>
<updated>2009-11-13T15:50:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Does that mean that a Torque object can be used with two different connections as long as no
pool is involved?



________________________________
From: Thomas Vandahl &lt;tv@apache.org&gt;
To: torque-user@db.apache.org
Sent: Fri, November 13, 2009 1:27:26 PM
Subject: Re: Criteria needs write permissions?

On 13.11.09 08:12, Thomas Fischer wrote:
&gt; I'm not sure whether this is a bug or not, I need to think about it. If i
&gt; remember correctly, the database name is used for the database connection
&gt; (including credentials) and the table layout. Probably there are some cases
&gt; where this wants to be treated differently.

As I see it, the limitation is that a Torque object can only be used
with one database connection pool. This might or might not be considered
a bug, however, the given application type does not look typical to me.

Bye, Thomas.

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


      

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Thomas Vandahl &lt;tv@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFD7ADE.5020201@apache.org%3e"/>
<id>urn:uuid:%3c4AFD7ADE-5020201@apache-org%3e</id>
<updated>2009-11-13T15:27:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 13.11.09 08:12, Thomas Fischer wrote:
&gt; I'm not sure whether this is a bug or not, I need to think about it. If i
&gt; remember correctly, the database name is used for the database connection
&gt; (including credentials) and the table layout. Probably there are some cases
&gt; where this wants to be treated differently.

As I see it, the limitation is that a Torque object can only be used
with one database connection pool. This might or might not be considered
a bug, however, the given application type does not look typical to me.

Bye, Thomas.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Thomas Fischer &lt;fischer@seitenbau.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3cOF3F043174.D2719177-ONC125766D.0026D957-C125766D.002797DE@seitenbau.net%3e"/>
<id>urn:uuid:%3cOF3F043174-D2719177-ONC125766D-0026D957-C125766D-002797DE@seitenbau-net%3e</id>
<updated>2009-11-13T07:12:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; Ok, I apologize for the traffic.

No reason to apologize for anything. This is a perfectly valid question.

&gt; Here goes, when you build the database objects, it hardcodes in the
&gt; database name that exists in your schema.xml. The code is in the
&gt; doBuild() method of the  ${Table}MapBuild.java
&gt;
&gt; public void doBuild() throws TorqueException
&gt;     {
&gt;         dbMap = Torque.getDatabaseMap("defaultdb");
&gt;
&gt; Therefore when you query against a different database, the table names
&gt; never get added to the tables hash for that database.
&gt;
&gt; I would consider this a bug as I don't think this would affect only me.
&gt; Should I report it to the dev mailing list or something. Not sure of the
&gt; etiquette there.

I'm not sure whether this is a bug or not, I need to think about it. If i
remember correctly, the database name is used for the database connection
(including credentials) and the table layout. Probably there are some cases
where this wants to be treated differently.

But please open a jira issue on this (
https://issues.apache.org/jira/secure/Dashboard.jspa), so it will not be
forgotten.

    Thomas


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Sheldon Ross &lt;sross@simmgene.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFC8D82.3070306@simmgene.com%3e"/>
<id>urn:uuid:%3c4AFC8D82-3070306@simmgene-com%3e</id>
<updated>2009-11-12T22:34:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
"So, people get confused when it seems like you can't use the DB objects
with more than one database connection.  But that's not true.  To use
more than one connection pool, you need to use the methods that take a
connection object."

In this case the query still fails even if you specify the connection.

The SqlBuilder assumes that the table name has been added to the dbMap at
the point where its crashing. But the table names only get added to the 
default dbMap.



Greg Monroe wrote:
&gt; OK, I think I understand what's going on here.  It's really a semi-bug
&gt; part but part a definitional issue.  This is because the term database 
&gt; name/dbname actually has two meaning in Torque.  
&gt;
&gt; The first is the "schema database name", i.e. the name in your schema 
&gt; XML.  This is used to group all the database schema's Metadata in the
&gt; Database structure. 
&gt;
&gt; The second meaning for this is the "database connection pool name".  This
&gt; is the name used in the runtime config to define the DB connection info.
&gt;
&gt; Unfortunately, for historical reasons, these two names are "tied" 
&gt; together.  Mostly for convenience reasons... but there are a few cases 
&gt; in the utility classes where a subquery or something needs to be done
&gt; and the default DB name is used.
&gt;
&gt; So, people get confused when it seems like you can't use the DB objects
&gt; with more than one database connection.  But that's not true.  To use
&gt; more than one connection pool, you need to use the methods that take a
&gt; connection object. 
&gt;
&gt; To get an alternate connection, you define this in your runtime with 
&gt; a different name.  E.g. set up a different set of torque.dsfactory.
&gt; properties.
&gt;
&gt; Then use the Torque.getConnection(String) to get a connection from this
&gt; pool. 
&gt;
&gt; FWIW, I put forth a plan for Torque 4 to separate the connection pool
&gt; name from the schema name.  This would require objects and criteria
&gt; to track which pool they came from.
&gt;   
&gt;
&gt;   
&gt;&gt; -----Original Message-----
&gt;&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt;&gt; Sent: Thursday, November 12, 2009 4:28 PM
&gt;&gt; To: Apache Torque Users List
&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt;&gt;
&gt;&gt; Ok, I think this maybe a bug. After watching the addTable method in
&gt;&gt; DatabaseMap, It appears to add the table to the default database dbMap
&gt;&gt; even if the criteria is querying against a different database.
&gt;&gt;
&gt;&gt;
&gt;&gt; Sheldon Ross wrote:
&gt;&gt;     
&gt;&gt;&gt; That would probably work, but It seems a little overkill. Do you know
&gt;&gt;&gt; where the lazy loading happens?
&gt;&gt;&gt; When I run with r/w connection, the dbmap tables hash does appear to
&gt;&gt;&gt; load that way.
&gt;&gt;&gt; However when I run the readonly connection, it just stays empty.
&gt;&gt;&gt;
&gt;&gt;&gt; Thanks
&gt;&gt;&gt;
&gt;&gt;&gt; Greg Monroe wrote:
&gt;&gt;&gt;       
&gt;&gt;&gt;&gt; FWIW, the dbMap object get populated in a "lazy" manner by default.
&gt;&gt;&gt;&gt; However,
&gt;&gt;&gt;&gt; there is a way to force it to be fully loaded via a code call.  You
&gt;&gt;&gt;&gt; do this by calling:
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; org.apache.torque.linkage.DefaultMapInit.init();
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Not that this class actually exists in the generated classes and not
&gt;&gt;&gt;&gt; in the Torque package.  This is because it provided a "known" class
&gt;&gt;&gt;&gt; that "knows" (via extension) the "user settable" om package.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt;&gt; -----Original Message-----
&gt;&gt;&gt;&gt;&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt;&gt;&gt;&gt;&gt; Sent: Thursday, November 12, 2009 3:25 PM
&gt;&gt;&gt;&gt;&gt; To: Apache Torque Users List
&gt;&gt;&gt;&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; The why is a good question, the table is not found. The tables
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt; hashmap
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt; in the dbMap appears to be empty.
&gt;&gt;&gt;&gt;&gt; It of course is found when using the other db connection. It looks
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt; like
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt; I'm gonna have to dig for awhile.
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; Thanks.
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; Thomas Fischer wrote:
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt;&gt;&gt;&gt;&gt; The null ointer exception seems to come from reading the table or
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;             
&gt;&gt;&gt;&gt;&gt; column
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt;&gt;&gt;&gt;&gt; map. Can you put a breakpoint in SQLBuilder.java:497 and see whether
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;             
&gt;&gt;&gt;&gt;&gt; the
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt;&gt;&gt;&gt;&gt; table or the column cannot be found (and why it is not found)?
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;     Thomas
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;             
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Ok so I was trying to make our site a little safer from sql
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt;&gt;&gt;&gt; injections,
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt;&gt;&gt;&gt;&gt;&gt; so I made a database connection that connects with a user that
only
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt;&gt;&gt;&gt; has
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt;&gt;&gt;&gt;&gt;&gt; SELECT permissions. And edited Criteria like such
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; public Criteria()
&gt;&gt;&gt;&gt;&gt;&gt;&gt;     {
&gt;&gt;&gt;&gt;&gt;&gt;&gt;         this(DEFAULT_CAPACITY);
&gt;&gt;&gt;&gt;&gt;&gt;&gt;         this.setDbName("readonlydatabase");
&gt;&gt;&gt;&gt;&gt;&gt;&gt;     }
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Now it seems to work for must things, but a couple queries fail
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt; with
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt;&gt; throws java.lang.Exception java.lang.NullPointerException
&gt;&gt;&gt;&gt;&gt;&gt;&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt;&gt;&gt;&gt;&gt; (SQLBuilder.java:497)
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;             
&gt;&gt;&gt;&gt;&gt;&gt;&gt;     at
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt;&gt;     at
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt; org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt;&gt; This error disappears as soon as I let the criteria use a database
&gt;&gt;&gt;&gt;&gt;&gt;&gt; connection with write privileges.
&gt;&gt;&gt;&gt;&gt;&gt;&gt; I know the user that it connects with has select privileges on
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt; every
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt;&gt; public table in the database.
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Does criteria need update privileges to work or something?
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; The query the criteria constructs work fine when I connect as
the
&gt;&gt;&gt;&gt;&gt;&gt;&gt; readonly user and run it manually.
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Any thoughts?
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Thanks
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; --
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Sheldon Ross
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; -------------------------------------------------------------------
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt; --
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt;               
&gt;&gt;&gt;&gt;&gt;&gt; --------------------------------------------------------------------
&gt;&gt;&gt;&gt;&gt;&gt;             
&gt;&gt; -
&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;             
&gt;&gt;&gt;&gt;&gt; --
&gt;&gt;&gt;&gt;&gt; Sheldon Ross
&gt;&gt;&gt;&gt;&gt; Software Development
&gt;&gt;&gt;&gt;&gt; American Simmental Association
&gt;&gt;&gt;&gt;&gt; sross@simmgene.com
&gt;&gt;&gt;&gt;&gt; (406)587-4531 ext 102
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;           
&gt;&gt;&gt;&gt; DukeCE Privacy Statement:
&gt;&gt;&gt;&gt; Please be advised that this e-mail and any files transmitted with
&gt;&gt;&gt;&gt; it are confidential communication or may otherwise be privileged or
&gt;&gt;&gt;&gt; confidential and are intended solely for the individual or entity
&gt;&gt;&gt;&gt; to whom they are addressed. If you are not the intended recipient
&gt;&gt;&gt;&gt; you may not rely on the contents of this email or any attachments,
&gt;&gt;&gt;&gt; and we ask that you please not read, copy or retransmit this
&gt;&gt;&gt;&gt; communication, but reply to the sender and destroy the email, its
&gt;&gt;&gt;&gt; contents, and all copies thereof immediately. Any unauthorized
&gt;&gt;&gt;&gt; dissemination, distribution or copying of this communication is
&gt;&gt;&gt;&gt; strictly prohibited.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;         
&gt;&gt; --
&gt;&gt; Sheldon Ross
&gt;&gt; Software Development
&gt;&gt; American Simmental Association
&gt;&gt; sross@simmgene.com
&gt;&gt; (406)587-4531 ext 102
&gt;&gt;
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;     
&gt;
&gt; DukeCE Privacy Statement:
&gt; Please be advised that this e-mail and any files transmitted with
&gt; it are confidential communication or may otherwise be privileged or
&gt; confidential and are intended solely for the individual or entity
&gt; to whom they are addressed. If you are not the intended recipient
&gt; you may not rely on the contents of this email or any attachments,
&gt; and we ask that you please not read, copy or retransmit this
&gt; communication, but reply to the sender and destroy the email, its
&gt; contents, and all copies thereof immediately. Any unauthorized
&gt; dissemination, distribution or copying of this communication is
&gt; strictly prohibited.
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;
&gt;
&gt;   

-- 
Sheldon Ross
Software Development
American Simmental Association
sross@simmgene.com
(406)587-4531 ext 102 


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Criteria needs write permissions?</title>
<author><name>Greg Monroe &lt;Greg.Monroe@dukece.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C765@durham-e2k7mb1.dukece.com%3e"/>
<id>urn:uuid:%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C765@durham-e2k7mb1-dukece-com%3e</id>
<updated>2009-11-12T22:10:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
OK, I think I understand what's going on here.  It's really a semi-bug
part but part a definitional issue.  This is because the term database 
name/dbname actually has two meaning in Torque.  

The first is the "schema database name", i.e. the name in your schema 
XML.  This is used to group all the database schema's Metadata in the
Database structure. 

The second meaning for this is the "database connection pool name".  This
is the name used in the runtime config to define the DB connection info.

Unfortunately, for historical reasons, these two names are "tied" 
together.  Mostly for convenience reasons... but there are a few cases 
in the utility classes where a subquery or something needs to be done
and the default DB name is used.

So, people get confused when it seems like you can't use the DB objects
with more than one database connection.  But that's not true.  To use
more than one connection pool, you need to use the methods that take a
connection object. 

To get an alternate connection, you define this in your runtime with 
a different name.  E.g. set up a different set of torque.dsfactory.
properties.

Then use the Torque.getConnection(String) to get a connection from this
pool. 

FWIW, I put forth a plan for Torque 4 to separate the connection pool
name from the schema name.  This would require objects and criteria
to track which pool they came from.
  

&gt; -----Original Message-----
&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt; Sent: Thursday, November 12, 2009 4:28 PM
&gt; To: Apache Torque Users List
&gt; Subject: Re: Criteria needs write permissions?
&gt; 
&gt; Ok, I think this maybe a bug. After watching the addTable method in
&gt; DatabaseMap, It appears to add the table to the default database dbMap
&gt; even if the criteria is querying against a different database.
&gt; 
&gt; 
&gt; Sheldon Ross wrote:
&gt; &gt; That would probably work, but It seems a little overkill. Do you know
&gt; &gt; where the lazy loading happens?
&gt; &gt; When I run with r/w connection, the dbmap tables hash does appear to
&gt; &gt; load that way.
&gt; &gt; However when I run the readonly connection, it just stays empty.
&gt; &gt;
&gt; &gt; Thanks
&gt; &gt;
&gt; &gt; Greg Monroe wrote:
&gt; &gt;&gt; FWIW, the dbMap object get populated in a "lazy" manner by default.
&gt; &gt;&gt; However,
&gt; &gt;&gt; there is a way to force it to be fully loaded via a code call.  You
&gt; &gt;&gt; do this by calling:
&gt; &gt;&gt;
&gt; &gt;&gt; org.apache.torque.linkage.DefaultMapInit.init();
&gt; &gt;&gt;
&gt; &gt;&gt; Not that this class actually exists in the generated classes and not
&gt; &gt;&gt; in the Torque package.  This is because it provided a "known" class
&gt; &gt;&gt; that "knows" (via extension) the "user settable" om package.
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt;&gt; -----Original Message-----
&gt; &gt;&gt;&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt; &gt;&gt;&gt; Sent: Thursday, November 12, 2009 3:25 PM
&gt; &gt;&gt;&gt; To: Apache Torque Users List
&gt; &gt;&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; The why is a good question, the table is not found. The tables
&gt; hashmap
&gt; &gt;&gt;&gt; in the dbMap appears to be empty.
&gt; &gt;&gt;&gt; It of course is found when using the other db connection. It looks
&gt; like
&gt; &gt;&gt;&gt; I'm gonna have to dig for awhile.
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; Thanks.
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; Thomas Fischer wrote:
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt; The null ointer exception seems to come from reading the table or
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt; column
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt; map. Can you put a breakpoint in SQLBuilder.java:497 and see whether
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt; the
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt; table or the column cannot be found (and why it is not found)?
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;     Thomas
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; Ok so I was trying to make our site a little safer from sql
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt; injections,
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; so I made a database connection that connects with a user that only
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt; has
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; SELECT permissions. And edited Criteria like such
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; public Criteria()
&gt; &gt;&gt;&gt;&gt;&gt;     {
&gt; &gt;&gt;&gt;&gt;&gt;         this(DEFAULT_CAPACITY);
&gt; &gt;&gt;&gt;&gt;&gt;         this.setDbName("readonlydatabase");
&gt; &gt;&gt;&gt;&gt;&gt;     }
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; Now it seems to work for must things, but a couple queries fail
&gt; with
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; throws java.lang.Exception java.lang.NullPointerException
&gt; &gt;&gt;&gt;&gt;&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt; (SQLBuilder.java:497)
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;     at
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;
&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;     at
&gt; org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; This error disappears as soon as I let the criteria use a database
&gt; &gt;&gt;&gt;&gt;&gt; connection with write privileges.
&gt; &gt;&gt;&gt;&gt;&gt; I know the user that it connects with has select privileges on
&gt; every
&gt; &gt;&gt;&gt;&gt;&gt; public table in the database.
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; Does criteria need update privileges to work or something?
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; The query the criteria constructs work fine when I connect as the
&gt; &gt;&gt;&gt;&gt;&gt; readonly user and run it manually.
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; Any thoughts?
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; Thanks
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; --
&gt; &gt;&gt;&gt;&gt;&gt; Sheldon Ross
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt; -------------------------------------------------------------------
&gt; --
&gt; &gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; &gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt; --------------------------------------------------------------------
&gt; -
&gt; &gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; &gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt;&gt;
&gt; &gt;&gt;&gt; --
&gt; &gt;&gt;&gt; Sheldon Ross
&gt; &gt;&gt;&gt; Software Development
&gt; &gt;&gt;&gt; American Simmental Association
&gt; &gt;&gt;&gt; sross@simmgene.com
&gt; &gt;&gt;&gt; (406)587-4531 ext 102
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; ---------------------------------------------------------------------
&gt; &gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; &gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt; DukeCE Privacy Statement:
&gt; &gt;&gt; Please be advised that this e-mail and any files transmitted with
&gt; &gt;&gt; it are confidential communication or may otherwise be privileged or
&gt; &gt;&gt; confidential and are intended solely for the individual or entity
&gt; &gt;&gt; to whom they are addressed. If you are not the intended recipient
&gt; &gt;&gt; you may not rely on the contents of this email or any attachments,
&gt; &gt;&gt; and we ask that you please not read, copy or retransmit this
&gt; &gt;&gt; communication, but reply to the sender and destroy the email, its
&gt; &gt;&gt; contents, and all copies thereof immediately. Any unauthorized
&gt; &gt;&gt; dissemination, distribution or copying of this communication is
&gt; &gt;&gt; strictly prohibited.
&gt; &gt;&gt;
&gt; &gt;&gt; ---------------------------------------------------------------------
&gt; &gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; &gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;
&gt; 
&gt; --
&gt; Sheldon Ross
&gt; Software Development
&gt; American Simmental Association
&gt; sross@simmgene.com
&gt; (406)587-4531 ext 102
&gt; 
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org

DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Sheldon Ross &lt;sross@simmgene.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFC8289.7020701@simmgene.com%3e"/>
<id>urn:uuid:%3c4AFC8289-7020701@simmgene-com%3e</id>
<updated>2009-11-12T21:47:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ok, I apologize for the traffic.

Here goes, when you build the database objects, it hardcodes in the 
database name that exists in your schema.xml. The code is in the 
doBuild() method of the  ${Table}MapBuild.java

public void doBuild() throws TorqueException
    {
        dbMap = Torque.getDatabaseMap("defaultdb");

Therefore when you query against a different database, the table names 
never get added to the tables hash for that database.

I would consider this a bug as I don't think this would affect only me. 
Should I report it to the dev mailing list or something. Not sure of the 
etiquette there.

Anyway thanks all.

Sheldon Ross wrote:
&gt; Ok, I think this maybe a bug. After watching the addTable method in 
&gt; DatabaseMap, It appears to add the table to the default database dbMap 
&gt; even if the criteria is querying against a different database.
&gt;
&gt;
&gt; Sheldon Ross wrote:
&gt;&gt; That would probably work, but It seems a little overkill. Do you know 
&gt;&gt; where the lazy loading happens?
&gt;&gt; When I run with r/w connection, the dbmap tables hash does appear to 
&gt;&gt; load that way.
&gt;&gt; However when I run the readonly connection, it just stays empty.
&gt;&gt;
&gt;&gt; Thanks
&gt;&gt;
&gt;&gt; Greg Monroe wrote:
&gt;&gt;&gt; FWIW, the dbMap object get populated in a "lazy" manner by default.  
&gt;&gt;&gt; However,
&gt;&gt;&gt; there is a way to force it to be fully loaded via a code call.  You 
&gt;&gt;&gt; do this by calling:
&gt;&gt;&gt;
&gt;&gt;&gt; org.apache.torque.linkage.DefaultMapInit.init();
&gt;&gt;&gt;
&gt;&gt;&gt; Not that this class actually exists in the generated classes and not
&gt;&gt;&gt; in the Torque package.  This is because it provided a "known" class
&gt;&gt;&gt; that "knows" (via extension) the "user settable" om package.
&gt;&gt;&gt;
&gt;&gt;&gt;  
&gt;&gt;&gt;&gt; -----Original Message-----
&gt;&gt;&gt;&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt;&gt;&gt;&gt; Sent: Thursday, November 12, 2009 3:25 PM
&gt;&gt;&gt;&gt; To: Apache Torque Users List
&gt;&gt;&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; The why is a good question, the table is not found. The tables hashmap
&gt;&gt;&gt;&gt; in the dbMap appears to be empty.
&gt;&gt;&gt;&gt; It of course is found when using the other db connection. It looks 
&gt;&gt;&gt;&gt; like
&gt;&gt;&gt;&gt; I'm gonna have to dig for awhile.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Thanks.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Thomas Fischer wrote:
&gt;&gt;&gt;&gt;   
&gt;&gt;&gt;&gt;&gt; The null ointer exception seems to come from reading the table or
&gt;&gt;&gt;&gt;&gt;       
&gt;&gt;&gt;&gt; column
&gt;&gt;&gt;&gt;   
&gt;&gt;&gt;&gt;&gt; map. Can you put a breakpoint in SQLBuilder.java:497 and see whether
&gt;&gt;&gt;&gt;&gt;       
&gt;&gt;&gt;&gt; the
&gt;&gt;&gt;&gt;   
&gt;&gt;&gt;&gt;&gt; table or the column cannot be found (and why it is not found)?
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;     Thomas
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt; Ok so I was trying to make our site a little safer from sql
&gt;&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt; injections,
&gt;&gt;&gt;&gt;   
&gt;&gt;&gt;&gt;&gt;&gt; so I made a database connection that connects with a user that only
&gt;&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt; has
&gt;&gt;&gt;&gt;   
&gt;&gt;&gt;&gt;&gt;&gt; SELECT permissions. And edited Criteria like such
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; public Criteria()
&gt;&gt;&gt;&gt;&gt;&gt;     {
&gt;&gt;&gt;&gt;&gt;&gt;         this(DEFAULT_CAPACITY);
&gt;&gt;&gt;&gt;&gt;&gt;         this.setDbName("readonlydatabase");
&gt;&gt;&gt;&gt;&gt;&gt;     }
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; Now it seems to work for must things, but a couple queries fail with
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; throws java.lang.Exception java.lang.NullPointerException
&gt;&gt;&gt;&gt;&gt;&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt;&gt; (SQLBuilder.java:497)
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;     
&gt;&gt;&gt;&gt;&gt;&gt;     at
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302) 
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;   
&gt;&gt;&gt;&gt;&gt;&gt;     at 
&gt;&gt;&gt;&gt;&gt;&gt; org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; This error disappears as soon as I let the criteria use a database
&gt;&gt;&gt;&gt;&gt;&gt; connection with write privileges.
&gt;&gt;&gt;&gt;&gt;&gt; I know the user that it connects with has select privileges on every
&gt;&gt;&gt;&gt;&gt;&gt; public table in the database.
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; Does criteria need update privileges to work or something?
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; The query the criteria constructs work fine when I connect as the
&gt;&gt;&gt;&gt;&gt;&gt; readonly user and run it manually.
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; Any thoughts?
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; Thanks
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; -- 
&gt;&gt;&gt;&gt;&gt;&gt; Sheldon Ross
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; ---------------------------------------------------------------------

&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;       
&gt;&gt;&gt;&gt; -- 
&gt;&gt;&gt;&gt; Sheldon Ross
&gt;&gt;&gt;&gt; Software Development
&gt;&gt;&gt;&gt; American Simmental Association
&gt;&gt;&gt;&gt; sross@simmgene.com
&gt;&gt;&gt;&gt; (406)587-4531 ext 102
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;     
&gt;&gt;&gt;
&gt;&gt;&gt; DukeCE Privacy Statement:
&gt;&gt;&gt; Please be advised that this e-mail and any files transmitted with
&gt;&gt;&gt; it are confidential communication or may otherwise be privileged or
&gt;&gt;&gt; confidential and are intended solely for the individual or entity
&gt;&gt;&gt; to whom they are addressed. If you are not the intended recipient
&gt;&gt;&gt; you may not rely on the contents of this email or any attachments,
&gt;&gt;&gt; and we ask that you please not read, copy or retransmit this
&gt;&gt;&gt; communication, but reply to the sender and destroy the email, its
&gt;&gt;&gt; contents, and all copies thereof immediately. Any unauthorized
&gt;&gt;&gt; dissemination, distribution or copying of this communication is
&gt;&gt;&gt; strictly prohibited.
&gt;&gt;&gt;
&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;   
&gt;&gt;
&gt;

-- 
Sheldon Ross
Software Development
American Simmental Association
sross@simmgene.com
(406)587-4531 ext 102 


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Sheldon Ross &lt;sross@simmgene.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFC7DF1.6050806@simmgene.com%3e"/>
<id>urn:uuid:%3c4AFC7DF1-6050806@simmgene-com%3e</id>
<updated>2009-11-12T21:28:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ok, I think this maybe a bug. After watching the addTable method in 
DatabaseMap, It appears to add the table to the default database dbMap 
even if the criteria is querying against a different database.


Sheldon Ross wrote:
&gt; That would probably work, but It seems a little overkill. Do you know 
&gt; where the lazy loading happens?
&gt; When I run with r/w connection, the dbmap tables hash does appear to 
&gt; load that way.
&gt; However when I run the readonly connection, it just stays empty.
&gt;
&gt; Thanks
&gt;
&gt; Greg Monroe wrote:
&gt;&gt; FWIW, the dbMap object get populated in a "lazy" manner by default.  
&gt;&gt; However,
&gt;&gt; there is a way to force it to be fully loaded via a code call.  You 
&gt;&gt; do this by calling:
&gt;&gt;
&gt;&gt; org.apache.torque.linkage.DefaultMapInit.init();
&gt;&gt;
&gt;&gt; Not that this class actually exists in the generated classes and not
&gt;&gt; in the Torque package.  This is because it provided a "known" class
&gt;&gt; that "knows" (via extension) the "user settable" om package.
&gt;&gt;
&gt;&gt;  
&gt;&gt;&gt; -----Original Message-----
&gt;&gt;&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt;&gt;&gt; Sent: Thursday, November 12, 2009 3:25 PM
&gt;&gt;&gt; To: Apache Torque Users List
&gt;&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt;&gt;&gt;
&gt;&gt;&gt; The why is a good question, the table is not found. The tables hashmap
&gt;&gt;&gt; in the dbMap appears to be empty.
&gt;&gt;&gt; It of course is found when using the other db connection. It looks like
&gt;&gt;&gt; I'm gonna have to dig for awhile.
&gt;&gt;&gt;
&gt;&gt;&gt; Thanks.
&gt;&gt;&gt;
&gt;&gt;&gt; Thomas Fischer wrote:
&gt;&gt;&gt;    
&gt;&gt;&gt;&gt; The null ointer exception seems to come from reading the table or
&gt;&gt;&gt;&gt;       
&gt;&gt;&gt; column
&gt;&gt;&gt;    
&gt;&gt;&gt;&gt; map. Can you put a breakpoint in SQLBuilder.java:497 and see whether
&gt;&gt;&gt;&gt;       
&gt;&gt;&gt; the
&gt;&gt;&gt;    
&gt;&gt;&gt;&gt; table or the column cannot be found (and why it is not found)?
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;     Thomas
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;      
&gt;&gt;&gt;&gt;&gt; Ok so I was trying to make our site a little safer from sql
&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt; injections,
&gt;&gt;&gt;    
&gt;&gt;&gt;&gt;&gt; so I made a database connection that connects with a user that only
&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt; has
&gt;&gt;&gt;    
&gt;&gt;&gt;&gt;&gt; SELECT permissions. And edited Criteria like such
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; public Criteria()
&gt;&gt;&gt;&gt;&gt;     {
&gt;&gt;&gt;&gt;&gt;         this(DEFAULT_CAPACITY);
&gt;&gt;&gt;&gt;&gt;         this.setDbName("readonlydatabase");
&gt;&gt;&gt;&gt;&gt;     }
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; Now it seems to work for must things, but a couple queries fail with
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; throws java.lang.Exception java.lang.NullPointerException
&gt;&gt;&gt;&gt;&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt; (SQLBuilder.java:497)
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;      
&gt;&gt;&gt;&gt;&gt;     at
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
&gt;&gt;&gt;    
&gt;&gt;&gt;&gt;&gt;     at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; This error disappears as soon as I let the criteria use a database
&gt;&gt;&gt;&gt;&gt; connection with write privileges.
&gt;&gt;&gt;&gt;&gt; I know the user that it connects with has select privileges on every
&gt;&gt;&gt;&gt;&gt; public table in the database.
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; Does criteria need update privileges to work or something?
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; The query the criteria constructs work fine when I connect as the
&gt;&gt;&gt;&gt;&gt; readonly user and run it manually.
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; Any thoughts?
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; Thanks
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; -- 
&gt;&gt;&gt;&gt;&gt; Sheldon Ross
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;       
&gt;&gt;&gt; -- 
&gt;&gt;&gt; Sheldon Ross
&gt;&gt;&gt; Software Development
&gt;&gt;&gt; American Simmental Association
&gt;&gt;&gt; sross@simmgene.com
&gt;&gt;&gt; (406)587-4531 ext 102
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;     
&gt;&gt;
&gt;&gt; DukeCE Privacy Statement:
&gt;&gt; Please be advised that this e-mail and any files transmitted with
&gt;&gt; it are confidential communication or may otherwise be privileged or
&gt;&gt; confidential and are intended solely for the individual or entity
&gt;&gt; to whom they are addressed. If you are not the intended recipient
&gt;&gt; you may not rely on the contents of this email or any attachments,
&gt;&gt; and we ask that you please not read, copy or retransmit this
&gt;&gt; communication, but reply to the sender and destroy the email, its
&gt;&gt; contents, and all copies thereof immediately. Any unauthorized
&gt;&gt; dissemination, distribution or copying of this communication is
&gt;&gt; strictly prohibited.
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;
&gt;&gt;
&gt;&gt;   
&gt;

-- 
Sheldon Ross
Software Development
American Simmental Association
sross@simmgene.com
(406)587-4531 ext 102 


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Sheldon Ross &lt;sross@simmgene.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFC7C2A.5070102@simmgene.com%3e"/>
<id>urn:uuid:%3c4AFC7C2A-5070102@simmgene-com%3e</id>
<updated>2009-11-12T21:20:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
That would probably work, but It seems a little overkill. Do you know 
where the lazy loading happens?
When I run with r/w connection, the dbmap tables hash does appear to 
load that way.
However when I run the readonly connection, it just stays empty.

Thanks

Greg Monroe wrote:
&gt; FWIW, the dbMap object get populated in a "lazy" manner by default.  However,
&gt; there is a way to force it to be fully loaded via a code call.  You 
&gt; do this by calling:
&gt;
&gt; org.apache.torque.linkage.DefaultMapInit.init();
&gt;
&gt; Not that this class actually exists in the generated classes and not
&gt; in the Torque package.  This is because it provided a "known" class
&gt; that "knows" (via extension) the "user settable" om package.
&gt;
&gt;   
&gt;&gt; -----Original Message-----
&gt;&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt;&gt; Sent: Thursday, November 12, 2009 3:25 PM
&gt;&gt; To: Apache Torque Users List
&gt;&gt; Subject: Re: Criteria needs write permissions?
&gt;&gt;
&gt;&gt; The why is a good question, the table is not found. The tables hashmap
&gt;&gt; in the dbMap appears to be empty.
&gt;&gt; It of course is found when using the other db connection. It looks like
&gt;&gt; I'm gonna have to dig for awhile.
&gt;&gt;
&gt;&gt; Thanks.
&gt;&gt;
&gt;&gt; Thomas Fischer wrote:
&gt;&gt;     
&gt;&gt;&gt; The null ointer exception seems to come from reading the table or
&gt;&gt;&gt;       
&gt;&gt; column
&gt;&gt;     
&gt;&gt;&gt; map. Can you put a breakpoint in SQLBuilder.java:497 and see whether
&gt;&gt;&gt;       
&gt;&gt; the
&gt;&gt;     
&gt;&gt;&gt; table or the column cannot be found (and why it is not found)?
&gt;&gt;&gt;
&gt;&gt;&gt;     Thomas
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;       
&gt;&gt;&gt;&gt; Ok so I was trying to make our site a little safer from sql
&gt;&gt;&gt;&gt;         
&gt;&gt; injections,
&gt;&gt;     
&gt;&gt;&gt;&gt; so I made a database connection that connects with a user that only
&gt;&gt;&gt;&gt;         
&gt;&gt; has
&gt;&gt;     
&gt;&gt;&gt;&gt; SELECT permissions. And edited Criteria like such
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; public Criteria()
&gt;&gt;&gt;&gt;     {
&gt;&gt;&gt;&gt;         this(DEFAULT_CAPACITY);
&gt;&gt;&gt;&gt;         this.setDbName("readonlydatabase");
&gt;&gt;&gt;&gt;     }
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Now it seems to work for must things, but a couple queries fail with
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; throws java.lang.Exception java.lang.NullPointerException
&gt;&gt;&gt;&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;         
&gt;&gt;&gt; (SQLBuilder.java:497)
&gt;&gt;&gt;
&gt;&gt;&gt;       
&gt;&gt;&gt;&gt;     at
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;         
&gt;&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
&gt;&gt;     
&gt;&gt;&gt;&gt;     at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; This error disappears as soon as I let the criteria use a database
&gt;&gt;&gt;&gt; connection with write privileges.
&gt;&gt;&gt;&gt; I know the user that it connects with has select privileges on every
&gt;&gt;&gt;&gt; public table in the database.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Does criteria need update privileges to work or something?
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; The query the criteria constructs work fine when I connect as the
&gt;&gt;&gt;&gt; readonly user and run it manually.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Any thoughts?
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Thanks
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; --
&gt;&gt;&gt;&gt; Sheldon Ross
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;         
&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;       
&gt;&gt; --
&gt;&gt; Sheldon Ross
&gt;&gt; Software Development
&gt;&gt; American Simmental Association
&gt;&gt; sross@simmgene.com
&gt;&gt; (406)587-4531 ext 102
&gt;&gt;
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;     
&gt;
&gt; DukeCE Privacy Statement:
&gt; Please be advised that this e-mail and any files transmitted with
&gt; it are confidential communication or may otherwise be privileged or
&gt; confidential and are intended solely for the individual or entity
&gt; to whom they are addressed. If you are not the intended recipient
&gt; you may not rely on the contents of this email or any attachments,
&gt; and we ask that you please not read, copy or retransmit this
&gt; communication, but reply to the sender and destroy the email, its
&gt; contents, and all copies thereof immediately. Any unauthorized
&gt; dissemination, distribution or copying of this communication is
&gt; strictly prohibited.
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;
&gt;
&gt;   

-- 
Sheldon Ross
Software Development
American Simmental Association
sross@simmgene.com
(406)587-4531 ext 102 


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Criteria needs write permissions?</title>
<author><name>Greg Monroe &lt;Greg.Monroe@dukece.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C764@durham-e2k7mb1.dukece.com%3e"/>
<id>urn:uuid:%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C764@durham-e2k7mb1-dukece-com%3e</id>
<updated>2009-11-12T21:10:43Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
FWIW, the dbMap object get populated in a "lazy" manner by default.  However,
there is a way to force it to be fully loaded via a code call.  You 
do this by calling:

org.apache.torque.linkage.DefaultMapInit.init();

Not that this class actually exists in the generated classes and not
in the Torque package.  This is because it provided a "known" class
that "knows" (via extension) the "user settable" om package.

&gt; -----Original Message-----
&gt; From: Sheldon Ross [mailto:sross@simmgene.com]
&gt; Sent: Thursday, November 12, 2009 3:25 PM
&gt; To: Apache Torque Users List
&gt; Subject: Re: Criteria needs write permissions?
&gt; 
&gt; The why is a good question, the table is not found. The tables hashmap
&gt; in the dbMap appears to be empty.
&gt; It of course is found when using the other db connection. It looks like
&gt; I'm gonna have to dig for awhile.
&gt; 
&gt; Thanks.
&gt; 
&gt; Thomas Fischer wrote:
&gt; &gt; The null ointer exception seems to come from reading the table or
&gt; column
&gt; &gt; map. Can you put a breakpoint in SQLBuilder.java:497 and see whether
&gt; the
&gt; &gt; table or the column cannot be found (and why it is not found)?
&gt; &gt;
&gt; &gt;     Thomas
&gt; &gt;
&gt; &gt;
&gt; &gt;&gt; Ok so I was trying to make our site a little safer from sql
&gt; injections,
&gt; &gt;&gt; so I made a database connection that connects with a user that only
&gt; has
&gt; &gt;&gt; SELECT permissions. And edited Criteria like such
&gt; &gt;&gt;
&gt; &gt;&gt; public Criteria()
&gt; &gt;&gt;     {
&gt; &gt;&gt;         this(DEFAULT_CAPACITY);
&gt; &gt;&gt;         this.setDbName("readonlydatabase");
&gt; &gt;&gt;     }
&gt; &gt;&gt;
&gt; &gt;&gt; Now it seems to work for must things, but a couple queries fail with
&gt; &gt;&gt;
&gt; &gt;&gt; throws java.lang.Exception java.lang.NullPointerException
&gt; &gt;&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
&gt; &gt;&gt;
&gt; &gt; (SQLBuilder.java:497)
&gt; &gt;
&gt; &gt;&gt;     at
&gt; &gt;&gt;
&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
&gt; &gt;&gt;     at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt; &gt;&gt;
&gt; &gt;&gt; This error disappears as soon as I let the criteria use a database
&gt; &gt;&gt; connection with write privileges.
&gt; &gt;&gt; I know the user that it connects with has select privileges on every
&gt; &gt;&gt; public table in the database.
&gt; &gt;&gt;
&gt; &gt;&gt; Does criteria need update privileges to work or something?
&gt; &gt;&gt;
&gt; &gt;&gt; The query the criteria constructs work fine when I connect as the
&gt; &gt;&gt; readonly user and run it manually.
&gt; &gt;&gt;
&gt; &gt;&gt; Any thoughts?
&gt; &gt;&gt;
&gt; &gt;&gt; Thanks
&gt; &gt;&gt;
&gt; &gt;&gt; --
&gt; &gt;&gt; Sheldon Ross
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt; ---------------------------------------------------------------------
&gt; &gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; &gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; ---------------------------------------------------------------------
&gt; &gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; &gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; 
&gt; --
&gt; Sheldon Ross
&gt; Software Development
&gt; American Simmental Association
&gt; sross@simmgene.com
&gt; (406)587-4531 ext 102
&gt; 
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org

DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Sheldon Ross &lt;sross@simmgene.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFC6F14.4070807@simmgene.com%3e"/>
<id>urn:uuid:%3c4AFC6F14-4070807@simmgene-com%3e</id>
<updated>2009-11-12T20:24:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The why is a good question, the table is not found. The tables hashmap 
in the dbMap appears to be empty.
It of course is found when using the other db connection. It looks like 
I'm gonna have to dig for awhile.

Thanks.

Thomas Fischer wrote:
&gt; The null ointer exception seems to come from reading the table or column
&gt; map. Can you put a breakpoint in SQLBuilder.java:497 and see whether the
&gt; table or the column cannot be found (and why it is not found)?
&gt;
&gt;     Thomas
&gt;
&gt;   
&gt;&gt; Ok so I was trying to make our site a little safer from sql injections,
&gt;&gt; so I made a database connection that connects with a user that only has
&gt;&gt; SELECT permissions. And edited Criteria like such
&gt;&gt;
&gt;&gt; public Criteria()
&gt;&gt;     {
&gt;&gt;         this(DEFAULT_CAPACITY);
&gt;&gt;         this.setDbName("readonlydatabase");
&gt;&gt;     }
&gt;&gt;
&gt;&gt; Now it seems to work for must things, but a couple queries fail with
&gt;&gt;
&gt;&gt; throws java.lang.Exception java.lang.NullPointerException
&gt;&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
&gt;&gt;     
&gt; (SQLBuilder.java:497)
&gt;   
&gt;&gt;     at
&gt;&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
&gt;&gt;     at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt;&gt;
&gt;&gt; This error disappears as soon as I let the criteria use a database
&gt;&gt; connection with write privileges.
&gt;&gt; I know the user that it connects with has select privileges on every
&gt;&gt; public table in the database.
&gt;&gt;
&gt;&gt; Does criteria need update privileges to work or something?
&gt;&gt;
&gt;&gt; The query the criteria constructs work fine when I connect as the
&gt;&gt; readonly user and run it manually.
&gt;&gt;
&gt;&gt; Any thoughts?
&gt;&gt;
&gt;&gt; Thanks
&gt;&gt;
&gt;&gt; --
&gt;&gt; Sheldon Ross
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt;&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;&gt;
&gt;&gt;     
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;
&gt;
&gt;   

-- 
Sheldon Ross
Software Development
American Simmental Association
sross@simmgene.com
(406)587-4531 ext 102 


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Postgresql table aliases</title>
<author><name>Andrea Bertucci &lt;abertucci@aitek.it&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFC39BD.6070005@aitek.it%3e"/>
<id>urn:uuid:%3c4AFC39BD-6070005@aitek-it%3e</id>
<updated>2009-11-12T16:37:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Greg Monroe wrote:
&gt; I also wonder if this isn't a PostGres version issue.  If I remember the 
&gt; SQL standards correctly, the query that PostGres is choking on is perfectly
&gt; valid SQL.  PostGres, like MySQL and the like, have all been working to 
&gt; follow the SQL Standard more closely.  This could be a standards bug in
&gt; your version of PostGres.
&gt;   
Thank you!
Few minutes ago I understand that the problem was a mistake in my code.

In some cases I'm composing the update query using column names defined 
in OM Peer (for some reason I can't use Criteria) and execute query with
executeStatement function.
In this classes, automatically generated by torque using my schema 
definition, each column has a prefix
that is table name. This has generated the query error, because I obtain 
query of the form:
update a set a.b=c
that it's not a right syntax for postgres

I correct the problem deleting table prefix in the query generated by hand.

Andrea.

-- 

Andrea Bertucci
Aitek S.p.A. - Via della Crocetta, 15 - I-16122 Genova
tel.: +39 010 846731 
fax: +39 010 8467350 - e-mail: abertucci@aitek.it

---
Questo  messaggio di posta elettronica e gli allegati sono riservati e destinati esclusivamente
alle persone cui sono indirizzati. Se avete ricevuto questo messaggio per errore, Vi preghiamo
di rispedirlo al mittente o cancellarlo dal Vostro sistema. La pubblicazione, l'uso, la diffusione,
l'inoltro, la stampa o la copia non autorizzati di questo messaggio e degli allegati sono
vietati.

This e-mail and any files transmitted with it are confidential and intended solely for the
use of the individual to whom it is addressed. If you have received this email in error please
send it back. Unauthorized publication, use, disclosure, forwarding, printing or copying of
this email and its associated attachments is strictly prohibited.


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Postgresql table aliases</title>
<author><name>Thomas Fischer &lt;fischer@seitenbau.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3cOF3183BB46.6C5B4B31-ONC125766C.00541670-C125766C.00544934@seitenbau.net%3e"/>
<id>urn:uuid:%3cOF3183BB46-6C5B4B31-ONC125766C-00541670-C125766C-00544934@seitenbau-net%3e</id>
<updated>2009-11-12T15:20:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; I also wonder if this isn't a PostGres version issue.  If I remember the
&gt; SQL standards correctly, the query that PostGres is choking on is
perfectly
&gt; valid SQL.  PostGres, like MySQL and the like, have all been working to
&gt; follow the SQL Standard more closely.  This could be a standards bug in
&gt; your version of PostGres.

I checked that postgres 8.4 indeed chokes on updates with fully qualified
column names. Dunno about earlier versions.

&gt; &gt; ...
&gt; &gt; &gt; ...
&gt; &gt; &gt; Now I'm trying to migrate everything for Postgresql but the main
&gt; &gt; problem
&gt; &gt; &gt; is that when
&gt; &gt; &gt; I execute an UPDATE query I receive an error from torque, because the
&gt; &gt; &gt; update query automatically
&gt; &gt; &gt; generated are of the form
&gt; &gt; &gt;     update a set a.b = c;
&gt; &gt; &gt; that in PostgreSQL it's an error because table name can't be a prefix
&gt; &gt; &gt; for a column in set statement.


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Postgresql table aliases</title>
<author><name>Greg Monroe &lt;Greg.Monroe@dukece.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C760@durham-e2k7mb1.dukece.com%3e"/>
<id>urn:uuid:%3c55B8568AFA5F144F886F18186BAD5B2C05FA44C760@durham-e2k7mb1-dukece-com%3e</id>
<updated>2009-11-12T14:55:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I also wonder if this isn't a PostGres version issue.  If I remember the 
SQL standards correctly, the query that PostGres is choking on is perfectly
valid SQL.  PostGres, like MySQL and the like, have all been working to 
follow the SQL Standard more closely.  This could be a standards bug in
your version of PostGres.

&gt; -----Original Message-----
&gt; From: Thomas Fischer [mailto:fischer@seitenbau.net]
&gt; Sent: Thursday, November 12, 2009 3:22 AM
&gt; To: Apache Torque Users List
&gt; Subject: RE: Postgresql table aliases
&gt; 
&gt; I cannot reproduce this. When I run the DataTest.testUpdate in the test
&gt; project I see the following update statement in the save() method of an
&gt; updated author:
&gt; 
&gt; UPDATE author SET name = ? WHERE author_id = ?
&gt; 
&gt; Could you provide more detail how the update clause is produced ?
&gt; 
&gt;    Thomas
&gt; 
&gt; &gt; ...
&gt; &gt; Now I'm trying to migrate everything for Postgresql but the main
&gt; problem
&gt; &gt; is that when
&gt; &gt; I execute an UPDATE query I receive an error from torque, because the
&gt; &gt; update query automatically
&gt; &gt; generated are of the form
&gt; &gt;     update a set a.b = c;
&gt; &gt; that in PostgreSQL it's an error because table name can't be a prefix
&gt; &gt; for a column in set statement.
&gt; &gt;
&gt; &gt; Do you know how it's possible to say torque to avoid column prefix in
&gt; &gt; this case?
&gt; &gt;
&gt; &gt; Thanks in advance,
&gt; &gt; Andrea.
&gt; &gt;
&gt; &gt;
&gt; &gt; ---------------------------------------------------------------------
&gt; &gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; &gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt; &gt;
&gt; 
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org

DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Postgresql table aliases</title>
<author><name>Thomas Fischer &lt;fischer@seitenbau.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3cOFFB150BDC.ED9A30A5-ONC125766C.002DC356-C125766C.002DF9BC@seitenbau.net%3e"/>
<id>urn:uuid:%3cOFFB150BDC-ED9A30A5-ONC125766C-002DC356-C125766C-002DF9BC@seitenbau-net%3e</id>
<updated>2009-11-12T08:22:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I cannot reproduce this. When I run the DataTest.testUpdate in the test
project I see the following update statement in the save() method of an
updated author:

UPDATE author SET name = ? WHERE author_id = ?

Could you provide more detail how the update clause is produced ?

   Thomas

&gt; ...
&gt; Now I'm trying to migrate everything for Postgresql but the main problem
&gt; is that when
&gt; I execute an UPDATE query I receive an error from torque, because the
&gt; update query automatically
&gt; generated are of the form
&gt;     update a set a.b = c;
&gt; that in PostgreSQL it's an error because table name can't be a prefix
&gt; for a column in set statement.
&gt;
&gt; Do you know how it's possible to say torque to avoid column prefix in
&gt; this case?
&gt;
&gt; Thanks in advance,
&gt; Andrea.
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Criteria needs write permissions?</title>
<author><name>Thomas Fischer &lt;fischer@seitenbau.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3cOF22405C1D.22F7FA12-ONC125766C.0025E21A-C125766C.0026553F@seitenbau.net%3e"/>
<id>urn:uuid:%3cOF22405C1D-22F7FA12-ONC125766C-0025E21A-C125766C-0026553F@seitenbau-net%3e</id>
<updated>2009-11-12T06:58:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The null ointer exception seems to come from reading the table or column
map. Can you put a breakpoint in SQLBuilder.java:497 and see whether the
table or the column cannot be found (and why it is not found)?

    Thomas

&gt; Ok so I was trying to make our site a little safer from sql injections,
&gt; so I made a database connection that connects with a user that only has
&gt; SELECT permissions. And edited Criteria like such
&gt;
&gt; public Criteria()
&gt;     {
&gt;         this(DEFAULT_CAPACITY);
&gt;         this.setDbName("readonlydatabase");
&gt;     }
&gt;
&gt; Now it seems to work for must things, but a couple queries fail with
&gt;
&gt; throws java.lang.Exception java.lang.NullPointerException
&gt;     at org.apache.torque.util.SQLBuilder.processOrderBy
(SQLBuilder.java:497)
&gt;     at
&gt; org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
&gt;     at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)
&gt;
&gt; This error disappears as soon as I let the criteria use a database
&gt; connection with write privileges.
&gt; I know the user that it connects with has select privileges on every
&gt; public table in the database.
&gt;
&gt; Does criteria need update privileges to work or something?
&gt;
&gt; The query the criteria constructs work fine when I connect as the
&gt; readonly user and run it manually.
&gt;
&gt; Any thoughts?
&gt;
&gt; Thanks
&gt;
&gt; --
&gt; Sheldon Ross
&gt;
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Criteria needs write permissions?</title>
<author><name>Sheldon Ross &lt;sross@simmgene.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c4AFB4EC8.4040005@simmgene.com%3e"/>
<id>urn:uuid:%3c4AFB4EC8-4040005@simmgene-com%3e</id>
<updated>2009-11-11T23:54:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ok so I was trying to make our site a little safer from sql injections, 
so I made a database connection that connects with a user that only has 
SELECT permissions. And edited Criteria like such

public Criteria()
    {
        this(DEFAULT_CAPACITY);
        this.setDbName("readonlydatabase");
    }

Now it seems to work for must things, but a couple queries fail with

throws java.lang.Exception java.lang.NullPointerException
    at org.apache.torque.util.SQLBuilder.processOrderBy(SQLBuilder.java:497)
    at 
org.apache.torque.util.SQLBuilder.buildQueryClause(SQLBuilder.java:302)
    at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:730)

This error disappears as soon as I let the criteria use a database 
connection with write privileges.
I know the user that it connects with has select privileges on every 
public table in the database.

Does criteria need update privileges to work or something?

The query the criteria constructs work fine when I connect as the 
readonly user and run it manually.

Any thoughts?

Thanks

-- 
Sheldon Ross



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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: [torrque-maven-plugin] Colliding parameters for different goals.</title>
<author><name>&quot;Ludwig Magnusson&quot; &lt;ludwig@itcatapult.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c003d01ca62f6$f1cbc2a0$d56347e0$@com%3e"/>
<id>urn:uuid:%3c003d01ca62f6$f1cbc2a0$d56347e0$@com%3e</id>
<updated>2009-11-11T17:46:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thank you for the link.
It cleared up a lot for me.
The project now works as I want.
/Ludwig

-----Original Message-----
From: Thomas Fischer [mailto:fischer@seitenbau.net] 
Sent: den 10 november 2009 11:40
To: Apache Torque Users List
Subject: RE: [torrque-maven-plugin] Colliding parameters for different
goals.

Oops- sorry. My example was wrong, did not look careful enough. These tags
were meant to be &lt;id /&gt;tags. The phase should be generate-sources. So it
should read:

           &lt;execution&gt;
             &lt;id&gt;generate-om&lt;/id&gt;
             &lt;phase&gt;generate-sources&lt;/id&gt;
             &lt;goals&gt;
               &lt;goal&gt;om&lt;/goal&gt;
               &lt;goal&gt;sql&lt;/goal&gt;
             &lt;/goals&gt;
           &lt;/execution&gt;

and the same for the following execution definitions.

There are more phases than you think. See the list at the bottom of
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.ht
ml
for the available phases.

    Thomas

&gt; RE: [torrque-maven-plugin] Colliding parameters for different goals.
&gt;
&gt; Then I was mislead by the maven documentation.
&gt; I thought the only valid values for &lt;phase/&gt; were clean, compile, test,
&gt; build, install, verify.
&gt;
&gt; But the phases generate-om and generate-sql are defined in torque?
&gt; Are there any documentation on what phases there are in torque?
&gt; I can't find it on the plugin page.
&gt; /Ludwig
&gt;
&gt;
&gt; -----Original Message-----
&gt; From: Thomas Fischer [mailto:fischer@seitenbau.net]
&gt; Sent: den 10 november 2009 11:06
&gt; To: Apache Torque Users List
&gt; Subject: RE: [torrque-maven-plugin] Colliding parameters for different
&gt; goals.
&gt;
&gt; &gt; I have encountered a problem running the M2 plugin for torque. The
goals
&gt; I
&gt; &gt; run are basically om, sql and sqlExec. There are a lot of parameters
that
&gt; &gt; can be specified for these goals so I do it in my projects pom.xml.
&gt; However,
&gt; &gt; all these three goals have some parameters that have the same name, e.g
&gt; the
&gt; &gt; outputDir parameter. For om, I want this to point to my source
directory,
&gt; &gt; for sql I want another directory where the sql-file will be generated.
&gt; But
&gt; &gt; Maven2 is limited here and it is not possible to map different values
for
&gt; &gt; the same parameter to different goals.
&gt;
&gt; This is not true. You need to define more than one execution.
&gt; In principle, you have the following options:
&gt;
&gt; 1) use the same configuration for all goals (this is what you currently
do)
&gt;       &lt;plugin&gt;
&gt;         &lt;groupId&gt;org.apache.torque&lt;/groupId&gt;
&gt;         &lt;artifactId&gt;torque-maven-plugin&lt;/artifactId&gt;
&gt;         &lt;version&gt;3.3&lt;/version&gt;
&gt;         &lt;configuration&gt;
&gt;           ...
&gt;         &lt;/configuration&gt;
&gt;         &lt;executions&gt;
&gt;           &lt;execution&gt;
&gt;             &lt;phase&gt;generate-om&lt;/phase&gt;
&gt;             &lt;goals&gt;
&gt;               &lt;goal&gt;om&lt;/goal&gt;
&gt;               &lt;goal&gt;sql&lt;/goal&gt;
&gt;             &lt;/goals&gt;
&gt;           &lt;/execution&gt;
&gt;         &lt;/executions&gt;
&gt;       &lt;/plugin&gt;
&gt; 2) define different executions, and define the complete configuration for
&gt; each execution
&gt;       &lt;plugin&gt;
&gt;         &lt;groupId&gt;org.apache.torque&lt;/groupId&gt;
&gt;         &lt;artifactId&gt;torque-maven-plugin&lt;/artifactId&gt;
&gt;         &lt;version&gt;3.3&lt;/version&gt;
&gt;         &lt;executions&gt;
&gt;           &lt;execution&gt;
&gt;             &lt;phase&gt;generate-om&lt;/phase&gt;
&gt;             &lt;goals&gt;
&gt;               &lt;goal&gt;om&lt;/goal&gt;
&gt;             &lt;/goals&gt;
&gt;             &lt;configuration&gt;
&gt;               ...
&gt;             &lt;/configuration&gt;
&gt;           &lt;/execution&gt;
&gt;           &lt;execution&gt;
&gt;             &lt;phase&gt;generate-sql&lt;/phase&gt;
&gt;             &lt;goals&gt;
&gt;               &lt;goal&gt;sql&lt;/goal&gt;
&gt;             &lt;/goals&gt;
&gt;             &lt;configuration&gt;
&gt;               ...
&gt;             &lt;/configuration&gt;
&gt;           &lt;/execution&gt;
&gt;         &lt;/executions&gt;
&gt;       &lt;/plugin&gt;
&gt; The following does not work:
&gt; 3) Define some parameters for all executions and some for a specific
&gt; execution
&gt;       &lt;plugin&gt;
&gt;         &lt;groupId&gt;org.apache.torque&lt;/groupId&gt;
&gt;         &lt;artifactId&gt;torque-maven-plugin&lt;/artifactId&gt;
&gt;         &lt;version&gt;3.3&lt;/version&gt;
&gt;         &lt;configuration&gt;
&gt;           ...
&gt;         &lt;/configuration&gt;
&gt;         &lt;executions&gt;
&gt;           &lt;execution&gt;
&gt;             &lt;phase&gt;generate-om&lt;/phase&gt;
&gt;             &lt;goals&gt;
&gt;               &lt;goal&gt;om&lt;/goal&gt;
&gt;             &lt;/goals&gt;
&gt;             &lt;configuration&gt;
&gt;               ...
&gt;             &lt;/configuration&gt;
&gt;           &lt;/execution&gt;
&gt;           &lt;execution&gt;
&gt;             &lt;phase&gt;generate-sql&lt;/phase&gt;
&gt;             &lt;goals&gt;
&gt;               &lt;goal&gt;sql&lt;/goal&gt;
&gt;             &lt;/goals&gt;
&gt;             &lt;configuration&gt;
&gt;               ...
&gt;             &lt;/configuration&gt;
&gt;           &lt;/execution&gt;
&gt;         &lt;/executions&gt;
&gt;       &lt;/plugin&gt;
&gt;
&gt; As 1) does not meet your requiremets your only option is 2)
&gt;
&gt;    Thomas
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
&gt; For additional commands, e-mail: torque-user-help@db.apache.org
&gt;


---------------------------------------------------------------------
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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [Torque] Using Torque again</title>
<author><name>Angela Day &lt;akcday@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-torque-user/200911.mbox/%3c493183.94495.qm@web33305.mail.mud.yahoo.com%3e"/>
<id>urn:uuid:%3c493183-94495-qm@web33305-mail-mud-yahoo-com%3e</id>
<updated>2009-11-10T21:23:10Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
That was it.  The previous developer has some custom vm files out there that are choking. 
I replaced them with the files from the templates jar and it builds successfully.  Now the
only problem is figuring out what he did that was custom and integrating it into the new environment.
 He had it doing flips and creating custom form classes and om classes with extra methods.
 I have my work cut out for me.

Thanks for all of your help,

 
Angela Day
National Autism Association of Central Texas

http://www.naacentraltexas.org
formally FEAT Austin





________________________________
From: Thomas Vandahl &lt;tv@apache.org&gt;
To: torque-user@db.apache.org
Sent: Tue, November 10, 2009 2:51:43 PM
Subject: Re: [Torque] Using Torque again

On 10.11.09 20:52, Angela Day wrote:
&gt; Here is my default.properties file.  my build.properties file is empty.  The problem
seems to be referencing from the vm files that generate the om files.  Has there been an update
to those vm files for 3.3?  There is very little documentation on velocity that I can gleen
anything from.

Absolutely. Actually, there is not much left from the original template
files from 3.2 to 3.3, let alone 1.0.

&gt; project = cdb
&gt; database = oracle
&gt; targetPackage = org.apache.torque
&gt; 
&gt; torque.project = ${project}
&gt; torque.database = ${database}
&gt; torque.targetPackage = ${targetPackage}
&gt; torque.runOnlyOnSchemaChange = false

The file looks mostly OK to me.

&gt; outputDirectory = src
&gt; schemaDirectory = conf
&gt; templatePath = templates
&gt; useClasspath = true
&gt; 
&gt; torque.output.dir = ${torque.home}/${outputDirectory}
&gt; torque.schema.dir = ${torque.home}/${schemaDirectory}
&gt; torque.templatePath = ${templatePath}
&gt; torque.useClasspath = ${useClasspath}

I'd probably put the templatePath out of the way. You should be fine
with the current templates from the JAR.

&gt; torque.saveJavaName = ${sameJavaName}

This looks like a typo. But it could most probably not cause the
problems you are experiencing.

&gt; overloadKeySetters = true
Dunno this one.

&gt; useClasspath = false
[...]
&gt; torque.useClasspath = ${useClasspath}

This is a dangerous duplication. You set this before further up and
overwrite it here with false. This might be your sole problem.

&gt; # -------------------------------------------------------------------
&gt; #
&gt; #  C O N T R O L   T E M P L A T E S
&gt; #
&gt; # -------------------------------------------------------------------
&gt; 
&gt; SQLControlTemplate = sql/base/Control.vm
&gt; OMControlTemplate = om/Control.vm
&gt; idTableControlTemplate = sql/id-table/Control.vm
&gt; DataDTDControlTemplate = data/Control.vm
&gt; DataDumpControlTemplate = data/dump/Control.vm
&gt; DataSQLControlTemplate = sql/load/Control.vm
&gt; DocControlTemplate = doc/Control.vm
&gt; 
&gt; torque.template.sql = ${SQLControlTemplate}
&gt; torque.template.om = ${OMControlTemplate}
&gt; torque.template.idTable = ${idTableControlTemplate}
&gt; torque.template.dataDtd = ${DataDTDControlTemplate}
&gt; torque.template.dataDump = ${DataDumpControlTemplate}
&gt; torque.template.dataSql = ${DataSQLControlTemplate}
&gt; torque.template.doc = ${DocControlTemplate}
&gt; torque.template.sqlDbInit = sql/db-init/Control.vm
&gt; torque.template.ojb = ojb/repository/Control.vm
&gt; torque.template.ojbModel = ojb/model/Control.vm

I don't think this is supported anymore.

Bye, Thomas

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

</pre>
</div>
</content>
</entry>
</feed>
