db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owens, Ryan" <row...@uhd.com>
Subject Torque Error: Cannot connect to MySQL
Date Mon, 10 Feb 2003 23:29:39 GMT
Hi all.

I'm having a huge problem trying to deploy Torque to a client's webhost.
Any help would be hugely appreciated.

The host in running Ensim Site Administrator 3.1.4-1.
which uses Tomcat 4.0.3 and java 1.4  don't know the exact version.

I have tested the app thoroughly on my local machine with the same tomcat version with no
problems.

On the host I can connect directly to to db with sql.Connection, ResultSet etc, and get this:
Trying to connect to: jdbc:mysql://127.0.0.1:3306/allpointnetwork_com?user=allpoint&password=the1ring

- with driver: org.gjt.mm.mysql.Driver 
- connection = com.mysql.jdbc.jdbc2.Connection@b258fa 
Sterling Highway & Esther Drive 
SUCCESS!! results on screen. So my connection info is correct.

 

 

java.lang.RuntimeException: Cannot connect to MySQL server on 127.0.0.1:3306. Is there a MySQL
server running on the machine/port you are trying to connect to? (java.security.AccessControlException)
org.apache.commons.dbcp.jdbc2pool.KeyedCPDSConnectionFactory.makeObject(KeyedCPDSConnectionFactory.java:173)

org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(Unknown Source) 
org.apache.commons.dbcp.jdbc2pool.Jdbc2PoolDataSource.getConnection(Jdbc2PoolDataSource.java:1096)

org.apache.commons.dbcp.jdbc2pool.Jdbc2PoolDataSource.getConnection(Jdbc2PoolDataSource.java:1028)

org.apache.torque.Torque.getConnection(Torque.java:889) 
org.apache.torque.Torque.getConnection(Torque.java:871) 


 

	-----Original Message----- 
	From: Campbell, Justin [mailto:jcampbell@profilesys.com] 
	Sent: Mon 2/10/2003 5:54 PM 
	To: 'Turbine Torque Users List' 
	Cc: 
	Subject: RE: how to set the PK manually?
	
	

	Marc -
	
	I believe your problem is a conceptual one. If the value in table B must
	equal the value in table A to show they are related, the index/key in table
	B is a *foreign key* -- not a primary key.
	
	Let me know if this the actual situation. If not, a better explanation of
	your situation may be in order :)
	
	Justin Campbell
	Project Technical Lead
	Profile Systems, Inc.
	
	
	-----Original Message-----
	From: Marc Lustig [mailto:mail@marclustig.com]
	Sent: Thursday, February 06, 2003 1:21 PM
	To: Torque Users List
	Subject: how to set the PK manually?
	
	
	Hi,
	
	I'm creating a new instance (row) and set the PK to a certain value.
	(I need to do this because this table B extends another table A, so the PK
	in table B must be the same as in table A.)
	
	My defaultIdMethod is "idbroker":
	<database defaultIdMethod="idbroker"...
	
	And to make torque not generating the PK I set idMethod="none":
	<table name="B" idMethod="none">
	
	Problem is when I trigger save() torque still generates a new PK and assigns
	it. How comes that?
	How can I make torque not to auto-generate a new primary key when save() is
	called?
	
	Thanks!
	
	Marc
	
	
	---------------------------------------------------------------------
	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
	
	

Mime
View raw message