struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Thomas <jtho...@vitria.com>
Subject A class loader observation
Date Wed, 28 Mar 2001 03:07:58 GMT
It seems to me that if struts.jar is loaded from either .../jre/lib/ext or
WEB-INF/lib, then Struts will not be able to load classes (such as an
application's ActionForm beans) from a different location (such as
c:\export\java) specified as part of the CLASSPATH environment variable set
before starting Tomcat. Please let me know if this observation is correct or
not.
--
Thanks in advance
Jacob

-----Original Message-----
From: JOEL VOGT [mailto:joel.vogt@studentmail.newcastle.edu.au]
Sent: Tuesday, March 27, 2001 4:41 PM
To: struts-user@jakarta.apache.org
Subject: Newbie datasource Q


Hi all,

Hopefully this is an easy question for somebody.
In my struts-config I have the datasource
<data-sources>
  	  <data-source
  	     autoCommit="false"
  	     description="Access data source config"
   	     driverClass="sun.jdbc.odbc.JdbcOdbcDriver"
   	     maxCount="4"
   	     minCount="2"
   	     password="mypassword"
             url="jdbc:odbc:Rec97"
             user="myusername"
             />
</data-sources>

later on in a servlet I have

javax.sql.DataSource dataSource = servlet.findDataSource(null);
con = dataSource.getConnection();

When I try to use this however, I get an java.sql exception :
'no data found'	

Anyone know how to fix this, do this proper? It works fine if I hard 
code in the database details.

Thanks, 
Joel.

Mime
View raw message