<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alex Little &#187; tomcat</title>
	<atom:link href="http://alexlittle.net/blog/tag/tomcat/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexlittle.net/blog</link>
	<description></description>
	<lastBuildDate>Thu, 09 Feb 2012 10:34:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tomcat, MySQL and case sensitive tAblE nAmEs&#8230;</title>
		<link>http://alexlittle.net/blog/2007/11/07/tomcat-mysql-and-case-sensitive-table-names/</link>
		<comments>http://alexlittle.net/blog/2007/11/07/tomcat-mysql-and-case-sensitive-table-names/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 09:42:02 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Web dev & programming]]></category>
		<category><![CDATA[case sensitive]]></category>
		<category><![CDATA[msg]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://alexlittle.net/blog/2007/11/07/tomcat-mysql-and-case-sensitive-table-names/</guid>
		<description><![CDATA[Having &#8216;fun&#8217; this morning trying to figure out another little bug which I need to get fixed to get the chat history working properly on our MSG servers running on *nix. The problem is related to the case sensitivity of table names&#8230; we have the table (in MySQL) &#8216;jiveProperty&#8217; and when I try to select [...]]]></description>
			<content:encoded><![CDATA[<p>Having &#8216;fun&#8217; this morning trying to figure out another little bug which I need to get fixed to get the chat history working properly on our MSG servers running on *nix. The problem is related to the case sensitivity of table names&#8230; we have the table (in MySQL) &#8216;jiveProperty&#8217; and when I try to select from this table (using the given camel case tablename) from my java class in my servlet, I get the error that table &#8216;jiveproperty&#8217; doesn&#8217;t exist (note the case).</p>
<p>However if I run the same code from a jsp it works fine&#8230; so it appears to me that something is turning the table name in my java class from camel case to all lower case, but this isn&#8217;t happening for my jsp pages &#8211; which are running from the same servlet container, so should be using the same mysql connector classes and settings.</p>
<p>any ideas???</p>
<p>Update (7/11)&#8230; problem turned out to be that when we overwrote the compiled classes in the servlet container and restarted tomcat, the tomcat work directory was still using the old version of the class. So before starting tomcat again we needed to clear out the work directory to make sure the new class was being used.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexlittle.net/blog/2007/11/07/tomcat-mysql-and-case-sensitive-table-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSGAlert connection problems</title>
		<link>http://alexlittle.net/blog/2007/05/23/msgalert-connection-problems/</link>
		<comments>http://alexlittle.net/blog/2007/05/23/msgalert-connection-problems/#comments</comments>
		<pubDate>Wed, 23 May 2007 07:38:20 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Web dev & programming]]></category>
		<category><![CDATA[msg]]></category>
		<category><![CDATA[msgalert]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://alexlittle.net/blog/2007/05/23/msgalert-connection-problems/</guid>
		<description><![CDATA[Some people reported the other day that they were having problems connecting to MSGAlert &#8211; we thought to start with it might just be a firewall issue &#8211; the port it runs on might have been blocked by their firewall, but after a bit of investigation we found out what the problem really was. We [...]]]></description>
			<content:encoded><![CDATA[<p>Some people reported the other day that they were having problems connecting to MSGAlert &#8211; we thought to start with it might just be a firewall issue &#8211; the port it runs on might have been blocked by their firewall, but after a bit of investigation we found out what the problem really was.</p>
<p>We were getting errors like these appearing in out tomcat log files:<br />
<code><br />
INFO: Illegal access: this web application instance has been stopped already.  Could not load META-INF/services/javax.xml.parsers.DocumentBuilderFactory.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.<br />
</code><br />
<code><br />
INFO: Illegal access: this web application instance has been stopped already.  Could not load com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.<br />
</code><br />
<code><br />
INFO: Illegal access: this web application instance has been stopped already.  Could not load com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.<br />
</code></p>
<p>For most of the afternoon we pretty pretty stumped as to the cause  &#8211; mainly thinking there was a jar file missing or something &#8211; but that didn&#8217;t seem right as the same code was being used in other places and ran fine. It was also odd that it ran fine on Windows, but not on Linux, but it had (until recently) been working fine on Linux too.</p>
<p>The cause turned out to be that there were 2 tomcat processes running, when the server-side code is running for MSGAlert it listens on port 5225, the &#8216;old&#8217; process had control of the port, but the old prcoesses servlet container wasn&#8217;t running &#8211; but this meant the port wasn&#8217;t available for the correct container to use &#8211; hence the error.</p>
<p>Once we&#8217;d stopped (killed) all the tomcat processes and restarted (just the one!) all started to work fine.</p>
<p>Thought I should post this up as we had quite a job finding any useful information on Google about the errors we were getting, even though it appears quite a lot of people come across the same issue <img src='http://alexlittle.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://alexlittle.net/blog/2007/05/23/msgalert-connection-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuesday 11 April 06</title>
		<link>http://alexlittle.net/blog/2006/04/11/2006-04-11-102355/</link>
		<comments>http://alexlittle.net/blog/2006/04/11/2006-04-11-102355/#comments</comments>
		<pubDate>Tue, 11 Apr 2006 10:23:55 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Web dev & programming]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[joinin]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://alexlittle.net/blog/2006/04/11/2006-04-11-102355/</guid>
		<description><![CDATA[Now that I&#8217;ve got most of the webservices etc sorted out for the JoinIn enterprise database, I started to look at creating the standalone interface for doing the grouping. I started off by creating a blanks struts application (on Tomcat 4.1- as I had been using for the JoinIN enterprise database), but soon noticed that [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve got most of the webservices etc sorted out for the JoinIn enterprise database, I started to look at creating the standalone interface for doing the grouping. I started off by creating a blanks struts application (on Tomcat 4.1- as I had been using for the JoinIN enterprise database), but soon noticed that I can&#8217;t use the filters in the servlet 2.3 spec that I&#8217;d have liked to have used for the page layout (header &#038; footer), the reason being that the struts framework uses a forward to map the action in the URL to the actual jsp page. This functionality is only available in servlet spec 2.4, which then also means upgrading to Tomcat 5.5.</p>
<p>So, after a bit of &#8216;fun&#8217;, I&#8217;ve got both the JoinIn enterprise database/webservice and the standalone grouping interface now running on tomcat 5.5 on my tablet PC. I now need to make sure that I update the tomcat on our dev server and get both the apps running correctly on that too.</p>
<p>How a datasource is configured in tomcat 5.5 is slightly different to tomcat 4.1 too. Rather than creating a joinindb.xml file in the webapps folder to store the context data, this file must now be within the META-INF directory, called context.xml.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexlittle.net/blog/2006/04/11/2006-04-11-102355/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wednesday 29 March 06</title>
		<link>http://alexlittle.net/blog/2006/03/29/wednesday-29-march-06/</link>
		<comments>http://alexlittle.net/blog/2006/03/29/wednesday-29-march-06/#comments</comments>
		<pubDate>Wed, 29 Mar 2006 14:29:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Web dev & programming]]></category>
		<category><![CDATA[joinin]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://alexlittle.net/blog/2006/03/29/wednesday-29-march-06/</guid>
		<description><![CDATA[Now that I&#8217;ve got my tomcat application linked up to my database, I&#8217;ve been having a go at generating webservices to interact with it. I had previously just been using the command line (as demonstrated in the Enterprise SDK minimal deployment instructions), but thought I&#8217;d try and make things a bit more automatic (and easier!) [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve got my tomcat application linked up to my database, I&#8217;ve been having a go at generating webservices to interact with it. I had previously just been using the command line (as demonstrated in the Enterprise SDK minimal deployment instructions), but thought I&#8217;d try and make things a bit more automatic (and easier!) for myself be writing an ant task to do all the soapification of my java classes.</p>
<p>After a little fiddling around I managed to get to create an ant task which will auto generate the webservices, <a href="download.cfm?file=build.xml">get a copy of the script I used</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexlittle.net/blog/2006/03/29/wednesday-29-march-06/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monday 27 March 06</title>
		<link>http://alexlittle.net/blog/2006/03/27/monday-27-march-06-2/</link>
		<comments>http://alexlittle.net/blog/2006/03/27/monday-27-march-06-2/#comments</comments>
		<pubDate>Mon, 27 Mar 2006 13:43:55 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Web dev & programming]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[joinin]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://alexlittle.net/blog/2006/03/27/monday-27-march-06-2/</guid>
		<description><![CDATA[Have spent some time this morning looking at linking up a MySQL database up to Tomcat 4.1, using database connection pooling (DBCP). I had a fair bit of teething troubles getting it to work (using the instructions that I&#8217;d found to edit the tomcat server.xml)&#160; as I kept getting the message that: org.apache.commons.dbcp.SQLNestedException: Cannot create [...]]]></description>
			<content:encoded><![CDATA[<p>Have spent some time this morning looking at linking up a MySQL database up to Tomcat 4.1, using database connection pooling (DBCP). I had a fair bit of teething troubles getting it to work (using the instructions that I&#8217;d found to edit the tomcat server.xml)&nbsp; as I kept getting the message that:</p>
<p>org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class &#8221; for connect URL &#8216;null&#8217;</p>
<p>It seems that this is quite a common problem (from all the forum postings about it), and different solutions appear to work for different people (depending I guess on exactly what version of tomcat, which database etc etc). So anyway, here&#8217;s what worked for me in the end&#8230;. (for info, here I&#8217;m using Tomcat v4.1 on Windows, and the MySQL connector in mysql-connector-java-3.1.12.jar &#8211; which I put in $CATALINA_HOME/common/lib/)</p>
<p>I did not edit the $CATALINA_HOME/conf/server.xml file, instead I created an xml file in the webapps directory named the same as my webapp that would like to use the database (joinindb.xml). This file looks contains this (for info, this is the entire file)</p>
<p></p>
<div style="margin-left: 80px;"> &lt;Context path=&quot;/joinindb&quot; docBase=&quot;joinindb&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; debug=&quot;5&quot; reloadable=&quot;true&quot; crossContext=&quot;true&quot;&gt;</p>
<p>&nbsp; &lt;Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; prefix=&quot;localhost_JoinInDB_log.&quot; suffix=&quot;.txt&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timestamp=&quot;true&quot;/&gt;</p>
<p>&nbsp; &lt;Resource name=&quot;jdbc/JoinInDB&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auth=&quot;Container&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&quot;javax.sql.DataSource&quot;/&gt;</p>
<p>&nbsp; &lt;ResourceParams name=&quot;jdbc/JoinInDB&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;factory&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;!&#8211; Maximum number of dB connections in pool. Make sure you<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configure your mysqld max_connections large enough to handle<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all of your db connections. Set to 0 for no limit.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;maxActive&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;100&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;!&#8211; Maximum number of idle dB connections to retain in pool.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set to 0 for no limit.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;maxIdle&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;30&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;!&#8211; Maximum time to wait for a dB connection to become available<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in ms, in this example 10 seconds. An Exception is thrown if<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this timeout is exceeded.&nbsp; Set to -1 to wait indefinitely.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;maxWait&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;10000&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;!&#8211; MySQL dB username and password for dB connections&nbsp; &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;username&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;myusername&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;password&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;xxxxxxxxxx&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;!&#8211; Class name for mm.mysql JDBC driver &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;driverClassName&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;org.gjt.mm.mysql.Driver&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;!&#8211; The JDBC connection url for connecting to your MySQL dB.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The autoReconnect=true argument to the url makes sure that the<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mm.mysql JDBC Driver will automatically reconnect if mysqld closed the<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connection.&nbsp; mysqld by default closes idle connections after 8 hours.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;parameter&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;url&lt;/name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;jdbc:mysql://localhost:3306/joinin?autoReconnect=true&lt;/value&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/parameter&gt;<br />
&nbsp; &lt;/ResourceParams&gt;<br />
&lt;/Context&gt;
</div>
<p>
I then added the following to my webapp web.xml file (this was added just before the closing &lt;/web-app&gt; tag):</p>
<div style="margin-left: 80px;">&nbsp;&lt;resource-ref&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;description&gt;DB Connection&lt;/description&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;res-ref-name&gt;jdbc/JoinInDB&lt;/res-ref-name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;res-auth&gt;Container&lt;/res-auth&gt;<br />
&lt;/resource-ref&gt;
</div>
<p>
I created a class to test the connection and the method that is used is as follows&#8230; (it just returns the name of the class):</p>
<div style="margin-left: 80px;">public String testConnection() {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String retvar=&quot;nothing here&quot;;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Context context = new InitialContext();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (context == null ) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; retvar = &quot;Boom &#8211; No Context&quot;; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataSource datasource = (DataSource)context.lookup(&quot;java:comp/env/jdbc/JoinInDB&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (datasource == null ) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; retvar= &quot;Boom &#8211; No DataSource&quot;; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retvar= &quot;Database connected!&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retvar = datasource.getConnection().getClass().getName();<br />
&nbsp;&nbsp;&nbsp; } catch (Exception e) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.printStackTrace() ;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retvar = &quot;Database Not Available&#8230;. aarrgh &#8230;. why? &#8211; see the stack trace&quot; ;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return retvar;<br />
&nbsp;&nbsp;&nbsp; }</p>
</div>
<p>When I called this method from a JSP in my webapp, the code run without error returned the value: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper as the classname.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexlittle.net/blog/2006/03/27/monday-27-march-06-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.668 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-10 11:21:09 -->

