You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Thomas Fischer <fi...@seitenbau.net> on 2006/01/16 16:36:59 UTC

AW: using Ant based Torque generator while going thro a HTTP PROXY





Probably the network is accessed to fetch an older version of the dtd. Make
sure you use the version 3_2 of the dtd, then you do not need any network
access (the 3_2 dtd is packaged in the generator jar)

   Thomas

"Thoralf Rickert" <th...@cadooz.de> schrieb am 16.01.2006
16:20:42:

> Yes, have a look at the ant documentation. You have to set a proxy
> in the ant build file, like this.
>
> <project....>
>  <setproxy proxyhost="192.168.." proxyport="8080"
> nonproxyhosts="mylocalhosts,..."/>
>
>  ...
> </project>
>
> Is UnknownHostException really a Proxy problem or a DNS problem?...
>
> > -----Ursprüngliche Nachricht-----
> > Von: Naveen Murthy [mailto:nmurthy@datalinx.net]
> > Gesendet: Montag, 16. Januar 2006 16:18
> > An: torque-user@db.apache.org
> > Betreff: using Ant based Torque generator while going thro a
> > HTTP PROXY
> >
> >
> > hello;
> >
> > im using ANT based  torque-gen-3.2  for generating Java Peer
> > files. It works fine when im directly connected to the network.
> >
> > but when im connecting to net via a PROXY server, the
> > generator fails using " java.net.UnknownHostException: db.apache.org"
> >
> > Is there way or an OPTION to indicate the presense of a PROXY server?
> >
> > thanks!
> >
>
>
>
> ---------------------------------------------------------------------
> 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


Pooled Connections Question - V 3.2 RC-2 -= Java/DB2

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

Occasionally we receive the following connection error
message: Torque Exception Message: .  Error Message
is:  org.apache.commons.dbcp.SQLNestedException: Could
not retrieve connection info from pool
 
Occasionally we also find that a connection does not
close after a commit. Our code is basic..

con = Torque.getConnection(db2.torque.environment)); 
//do  stuff
con.commit();
}finally {  
if (con != null) { //this is prob never null
    if (!con.isClosed()) {
        // send a message the con is NOT closed
	Torque.closeConnection(con);  }

Here is a portion of the prop file:
torque.dsfactory.eMarine.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.eMarine.connection.driver =
COM.ibm.db2.jdbc.app.DB2Driver

torque.defaults.pool.initialSize = 1
torque.defaults.pool.maxIdle = 40
torque.defaults.pool.maxActive = 60

torque.defaults.pool.maxWait = 50000
torque.defaults.pool.timeBetweenEvictionRunsMillis=
200000
torque.defaults.pool.minEvictableIdleTimeMillis =
2000000
torque.defaults.connection.driver =
COM.ibm.db2.jdbc.app.DB2Driver
torque.idbroker.clever.quantity=true
torque.manager.useCache = true
torque.database.eMarine.adapter=db2app
torque.defaults.connection.driver =
COM.ibm.db2.jdbc.app.DB2Driver
torque.defaults.connection.url = jdbc:db2:DB2B


Does anything jump out that might be set wrong?

Thank you for any help!
Jim



			 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


RE: using Ant based Torque generator while going thro a HTTP PROXY

Posted by Thomas Fischer <tf...@apache.org>.
Ok, I have found two possible reasons

1) I have found a misplaced 3_1 dtd in the id-schema.xml file which comes 
with the 3.2 generator. This might have caused the initial problem. I 
fixed it in svn.

2) if you do not specify a dtd at all, it looks like as if Torque tries to 
use the current dtd but gets it over the net instead of using the built-in 
dtd. No idea what this is good for, but it seems that this is what you get 
in the run you quoted below.

Please try to use the following doctype in all of your schema.xml files:
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_2.dtd">
and tell us if that made the problem go away.

    Thomas


On Mon, 16 Jan 2006, Naveen Murthy wrote:

>> From the below , it looks like the Dtd url may be hardcoded inside torque-sql  taskdef
> class.
>
> I tried changing the <!DOCTYPE  but the taskdef still tries to go to db.apache.org
> to resolve.
>
>
>
> sql-classpath:
>     [echo] loading templates from classpath
> [torque-sql] Using contextProperties file: E:\programs\torque-3.2\torque-gen-3.2
> \build.properties
> [torque-sql] Using classpath
> [torque-sql] Generating to file E:\programs\torque-3.2\torque-gen-3.2\src\sql\re
> port.stocksdb.sql.generation
> [torque-sql] Jan 16, 2006 12:36:05 PM org.apache.torque.engine.database.transfor
> m.XmlToAppData parseFile
> [torque-sql] INFO: Parsing file: 'id-table-schema.xml'
> [torque-sql] Jan 16, 2006 12:36:05 PM org.apache.torque.engine.database.transfor
> m.DTDResolver resolveEntity
> [torque-sql] INFO: Resolver: used 'http://db.apache.org/torque/dtd/database_3_2.
> dtd'
>
> BUILD FAILED
> file:E:/programs/torque-3.2/torque-gen-3.2/build-torque.xml:141: org.apache.torq
> ue.engine.EngineException: java.net.UnknownHostException: db.apache.org
>
>
> -----Original Message-----
> From: Thomas Fischer [mailto:fischer@seitenbau.net]
> Sent: Mon 1/16/2006 11:39 AM
> To: Apache Torque Users List
> Subject: Antwort: RE: using Ant based Torque generator while going thro a HTTP PROXY
>
>
>
>
>
> "Naveen Murthy" <nm...@datalinx.net> schrieb am 16.01.2006 17:24:12:
>
>> hello;
>>
>> 1. i do see the database.dtd in my torque-gen-3.2.jar; still for some
> reason
>> it tries to reach internet for db.apache.org
>
> Please make sure you use the exact doctype
> <!DOCTYPE database SYSTEM
> "http://db.apache.org/torque/dtd/database_3_2.dtd">
>
>> It would be good it never tries to reach out for something.
>
> The other alternative is to fail every time an unknown dtd is used. I
> consider trying to reach the internet more user-friendly than to fail
> completetly.
>
>    Thomas
>
>
>

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


RE: Antwort: RE: using Ant based Torque generator while going thro a HTTP PROXY

Posted by Naveen Murthy <nm...@datalinx.net>.
>From the below , it looks like the Dtd url may be hardcoded inside torque-sql  taskdef 
class.

I tried changing the <!DOCTYPE  but the taskdef still tries to go to db.apache.org
to resolve.



sql-classpath:
     [echo] loading templates from classpath
[torque-sql] Using contextProperties file: E:\programs\torque-3.2\torque-gen-3.2
\build.properties
[torque-sql] Using classpath
[torque-sql] Generating to file E:\programs\torque-3.2\torque-gen-3.2\src\sql\re
port.stocksdb.sql.generation
[torque-sql] Jan 16, 2006 12:36:05 PM org.apache.torque.engine.database.transfor
m.XmlToAppData parseFile
[torque-sql] INFO: Parsing file: 'id-table-schema.xml'
[torque-sql] Jan 16, 2006 12:36:05 PM org.apache.torque.engine.database.transfor
m.DTDResolver resolveEntity
[torque-sql] INFO: Resolver: used 'http://db.apache.org/torque/dtd/database_3_2.
dtd'

BUILD FAILED
file:E:/programs/torque-3.2/torque-gen-3.2/build-torque.xml:141: org.apache.torq
ue.engine.EngineException: java.net.UnknownHostException: db.apache.org


-----Original Message-----
From: Thomas Fischer [mailto:fischer@seitenbau.net]
Sent: Mon 1/16/2006 11:39 AM
To: Apache Torque Users List
Subject: Antwort: RE: using Ant based Torque generator while going thro a HTTP PROXY
 




"Naveen Murthy" <nm...@datalinx.net> schrieb am 16.01.2006 17:24:12:

> hello;
>
> 1. i do see the database.dtd in my torque-gen-3.2.jar; still for some
reason
> it tries to reach internet for db.apache.org

Please make sure you use the exact doctype
<!DOCTYPE database SYSTEM
"http://db.apache.org/torque/dtd/database_3_2.dtd">

> It would be good it never tries to reach out for something.

The other alternative is to fail every time an unknown dtd is used. I
consider trying to reach the internet more user-friendly than to fail
completetly.

    Thomas



Antwort: RE: using Ant based Torque generator while going thro a HTTP PROXY

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



"Naveen Murthy" <nm...@datalinx.net> schrieb am 16.01.2006 17:24:12:

> hello;
>
> 1. i do see the database.dtd in my torque-gen-3.2.jar; still for some
reason
> it tries to reach internet for db.apache.org

Please make sure you use the exact doctype
<!DOCTYPE database SYSTEM
"http://db.apache.org/torque/dtd/database_3_2.dtd">

> It would be good it never tries to reach out for something.

The other alternative is to fail every time an unknown dtd is used. I
consider trying to reach the internet more user-friendly than to fail
completetly.

    Thomas

> -----Original Message-----
> From: Thomas Fischer [mailto:fischer@seitenbau.net]
> Sent: Mon 1/16/2006 10:36 AM
> To: Apache Torque Users List
> Subject: AW: using Ant based Torque generator while going thro a HTTP
PROXY
>
>
>
>
>
>
> Probably the network is accessed to fetch an older version of the dtd.
Make
> sure you use the version 3_2 of the dtd, then you do not need any network
> access (the 3_2 dtd is packaged in the generator jar)
>
>    Thomas
>
> "Thoralf Rickert" <th...@cadooz.de> schrieb am 16.01.2006
> 16:20:42:
>
> > Yes, have a look at the ant documentation. You have to set a proxy
> > in the ant build file, like this.
> >
> > <project....>
> >  <setproxy proxyhost="192.168.." proxyport="8080"
> > nonproxyhosts="mylocalhosts,..."/>
> >
> >  ...
> > </project>
> >
> > Is UnknownHostException really a Proxy problem or a DNS problem?...
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Naveen Murthy [mailto:nmurthy@datalinx.net]
> > > Gesendet: Montag, 16. Januar 2006 16:18
> > > An: torque-user@db.apache.org
> > > Betreff: using Ant based Torque generator while going thro a
> > > HTTP PROXY
> > >
> > >
> > > hello;
> > >
> > > im using ANT based  torque-gen-3.2  for generating Java Peer
> > > files. It works fine when im directly connected to the network.
> > >
> > > but when im connecting to net via a PROXY server, the
> > > generator fails using " java.net.UnknownHostException: db.apache.org"
> > >
> > > Is there way or an OPTION to indicate the presense of a PROXY server?
> > >
> > > thanks!
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


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


RE: using Ant based Torque generator while going thro a HTTP PROXY

Posted by Naveen Murthy <nm...@datalinx.net>.
hello;

1. i do see the database.dtd in my torque-gen-3.2.jar; still for some reason
it tries to reach internet for db.apache.org
It would be good it never tries to reach out for something.

2. my Ant optional.jar does have the setproxy, but for some reason, it doesnt
seem to work, it gives 
BUILD FAILED
file:E:/programs/torque-3.2/torque-gen-3.2/build-torque.xml:35: Unexpected eleme
nt "setproxy"

thanks!


-----Original Message-----
From: Thomas Fischer [mailto:fischer@seitenbau.net]
Sent: Mon 1/16/2006 10:36 AM
To: Apache Torque Users List
Subject: AW: using Ant based Torque generator while going thro a HTTP PROXY
 





Probably the network is accessed to fetch an older version of the dtd. Make
sure you use the version 3_2 of the dtd, then you do not need any network
access (the 3_2 dtd is packaged in the generator jar)

   Thomas

"Thoralf Rickert" <th...@cadooz.de> schrieb am 16.01.2006
16:20:42:

> Yes, have a look at the ant documentation. You have to set a proxy
> in the ant build file, like this.
>
> <project....>
>  <setproxy proxyhost="192.168.." proxyport="8080"
> nonproxyhosts="mylocalhosts,..."/>
>
>  ...
> </project>
>
> Is UnknownHostException really a Proxy problem or a DNS problem?...
>
> > -----Urspr�ngliche Nachricht-----
> > Von: Naveen Murthy [mailto:nmurthy@datalinx.net]
> > Gesendet: Montag, 16. Januar 2006 16:18
> > An: torque-user@db.apache.org
> > Betreff: using Ant based Torque generator while going thro a
> > HTTP PROXY
> >
> >
> > hello;
> >
> > im using ANT based  torque-gen-3.2  for generating Java Peer
> > files. It works fine when im directly connected to the network.
> >
> > but when im connecting to net via a PROXY server, the
> > generator fails using " java.net.UnknownHostException: db.apache.org"
> >
> > Is there way or an OPTION to indicate the presense of a PROXY server?
> >
> > thanks!
> >
>
>
>
> ---------------------------------------------------------------------
> 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