<?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>.: Mr.cAm - Y: cuong_pho_nui :. &#187; database</title>
	<atom:link href="http://phamcuong.info/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://phamcuong.info</link>
	<description>Khám phá thế giới (^o^)</description>
	<lastBuildDate>Mon, 06 Sep 2010 08:09:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Lỗi connect database, xa xưa nhưng gây lỗi 500</title>
		<link>http://phamcuong.info/2009/12/10/l%e1%bb%97i-connect-database-xa-x%c6%b0a-nh%c6%b0ng-gay-l%e1%bb%97i-500/</link>
		<comments>http://phamcuong.info/2009/12/10/l%e1%bb%97i-connect-database-xa-x%c6%b0a-nh%c6%b0ng-gay-l%e1%bb%97i-500/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 16:59:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lập trình]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lỗi 500]]></category>

		<guid isPermaLink="false">http://phamcuong.info/?p=597</guid>
		<description><![CDATA[Tối đẹp trời này tớ đã bị mắc lỗi này và mất cả tiếng đồng hồ ngồi gãi đầu, mãi mới nhớ ra. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException Đây là dòng báo lỗi của em [...]]]></description>
			<content:encoded><![CDATA[<p>Tối đẹp trời này tớ đã bị mắc lỗi này và mất cả tiếng đồng hồ ngồi gãi đầu, mãi mới nhớ ra.</p>
<p><span id="more-597"></span></p>
<h1>HTTP Status 500 -</h1>
<hr size="1" noshade="noshade" /><strong>type</strong> Exception report</p>
<p><strong>message</strong></p>
<p><strong>description</strong> <span style="text-decoration: underline;">The server encountered an internal error () that  prevented it from fulfilling this request.</span></p>
<p><strong>exception</strong></p>
<pre>java.lang.NullPointerException</pre>
<p>Đây là dòng báo lỗi của em nó.</p>
<p>Và nguyên nhân là do trong lớp connectDB thiếu 1 dòng.</p>
<p>Trước là như vầy:</p>
<blockquote><p>Connection connection = null;<br />
try {<br />
connection = DriverManager.getConnection(&#8220;jdbc:postgresql://localhost:5432/caxxx&#8221;,&#8221;postgres&#8221;,&#8221;xxxxxx&#8221;);<br />
} catch (Exception e) {}<br />
return connection;</p></blockquote>
<p>Và sửa lại như thế này để chạy bình thường:</p>
<blockquote><p>Connection connection = null;<br />
try {<br />
Class.forName(&#8220;org.postgresql.Driver&#8221;);<br />
connection = DriverManager.getConnection(&#8220;jdbc:postgresql://localhost:5432/caxxxx&#8221;,&#8221;postgres&#8221;,&#8221;xxxxxx&#8221;);<br />
} catch (Exception e) {}<br />
return connection;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://phamcuong.info/2009/12/10/l%e1%bb%97i-connect-database-xa-x%c6%b0a-nh%c6%b0ng-gay-l%e1%bb%97i-500/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
