<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Java Programming Forums - The Java Community - Exceptions</title>
		<link>http://www.javaprogrammingforums.com/</link>
		<description>Exception handling.</description>
		<language>en</language>
		<lastBuildDate>Wed, 19 Jun 2013 06:09:47 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.javaprogrammingforums.com/images/misc/rss.png</url>
			<title>Java Programming Forums - The Java Community - Exceptions</title>
			<link>http://www.javaprogrammingforums.com/</link>
		</image>
		<item>
			<title><![CDATA[null pointer exception in "rs.next()"]]></title>
			<link>http://www.javaprogrammingforums.com/exceptions/29969-null-pointer-exception-rs-next.html</link>
			<pubDate>Wed, 12 Jun 2013 07:42:28 GMT</pubDate>
			<description><![CDATA[Plz.................. help, hv gt null pointr exception in rs.next() 
 
 
 
//This is my code 
  
            po=con.prepareCall("{call...]]></description>
			<content:encoded><![CDATA[<div>Plz.................. help, hv gt null pointr exception in rs.next()<br />
<br />
<br />
<br />
//This is my code<br />
 <br />
            po=con.prepareCall(&quot;{call Add_Customer_Ref(?)}&quot;);<br />
            po.registerOutParameter(1,Types.VARCHAR);<br />
            po.execute();<br />
            rs = po.getResultSet();<br />
                                     <br />
            while(rs.next()){<br />
                System.out.println(rs.getString(1));<br />
            }<br />
            po.getMoreResults();<br />
            rs=po.getResultSet();<br />
            while(rs.next()){<br />
                System.out.println(rs1.getString(1));<br />
            }<br />
            rs.close();<br />
            rs1.close();<br />
<br />
<br />
//StoredProcedure code:<br />
<br />
ALTER PROCEDURE [dbo].[Add_Customer_Ref]<br />
	<br />
	@customer_ref_no varchar(50)=null OUTPUT<br />
<br />
AS<br />
BEGIN<br />
	<br />
	SET NOCOUNT ON;<br />
<br />
  	SELECT @customer_ref_no=customer_ref_no from Table_Customers<br />
END<br />
<br />
:((</div>

]]></content:encoded>
			<category domain="http://www.javaprogrammingforums.com/exceptions/">Exceptions</category>
			<dc:creator>Nimisha</dc:creator>
			<guid isPermaLink="true">http://www.javaprogrammingforums.com/exceptions/29969-null-pointer-exception-rs-next.html</guid>
		</item>
		<item>
			<title>Security exception</title>
			<link>http://www.javaprogrammingforums.com/exceptions/29879-security-exception.html</link>
			<pubDate>Thu, 06 Jun 2013 13:25:22 GMT</pubDate>
			<description><![CDATA[Exception in thread "AWT-EventQueue-0" java.lang.SecurityException: Prohibited package name: java.awt]]></description>
			<content:encoded><![CDATA[<div>Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.SecurityException: Prohibited package name: java.awt</div>

]]></content:encoded>
			<category domain="http://www.javaprogrammingforums.com/exceptions/">Exceptions</category>
			<dc:creator>Nimisha</dc:creator>
			<guid isPermaLink="true">http://www.javaprogrammingforums.com/exceptions/29879-security-exception.html</guid>
		</item>
		<item>
			<title>interface - public void method() throws SomeException;</title>
			<link>http://www.javaprogrammingforums.com/exceptions/29874-interface-public-void-method-throws-someexception%3B.html</link>
			<pubDate>Thu, 06 Jun 2013 07:07:56 GMT</pubDate>
			<description><![CDATA[I need to write the implementation for the following interface. I noticed that "throws SomeException" are marked in the method declaration header. ...]]></description>
			<content:encoded><![CDATA[<div>I need to write the implementation for the following interface. I noticed that &quot;throws SomeException&quot; are marked in the method declaration header.  Does it mean I must specify the particular precondition and construct that particular exception object for a throw statement in the method?    <br />
<br />
public interface MinHeap&lt;E&gt; {<br />
	<br />
	public void insert(E item) throws HeapOverflowException;<br />
	public E findMin() throws NoSuchElementException; <br />
      	public E deleteMin() throws NoSuchElementException; <br />
}</div>

]]></content:encoded>
			<category domain="http://www.javaprogrammingforums.com/exceptions/">Exceptions</category>
			<dc:creator>JavaOwl</dc:creator>
			<guid isPermaLink="true">http://www.javaprogrammingforums.com/exceptions/29874-interface-public-void-method-throws-someexception%3B.html</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] exception use array (help me)]]></title>
			<link>http://www.javaprogrammingforums.com/exceptions/29789-exception-use-array-help-me.html</link>
			<pubDate>Sat, 01 Jun 2013 04:37:10 GMT</pubDate>
			<description><![CDATA[Please make a simulation program of Student Mark List with these following descriptions: 
1.	The program consists of 4 menu: 
&#8226;	1. Input Student...]]></description>
			<content:encoded><![CDATA[<div>Please make a simulation program of Student Mark List with these following descriptions:<br />
1.	The program consists of 4 menu:<br />
&#8226;	1. Input Student<br />
&#8226;	2. See All Data<br />
&#8226;	3. Edit Data<br />
&#8226;	4. Exit<br />
2.	If user choose menu 1, then user will be asked to input number of student in the list. Validate the number of student must be between 1 and 5.<br />
3.	Then the program will be asked user to input Student Id, Student Name and Student Mark as many as the number of student that user input before. Validate:<br />
<ul><li style="">	Student Id must be 10 characters long.</li><li style="">	Student Name must be filled.</li><li style="">	Student Mark must be between 0 and 100.</li></ul><br />
<br />
4.	If user choose menu 2, then:<br />
<ul><li style="">	Show the student data from the list include student number.</li><li style="">	Then user will be asked to choose the student number of the student to showing the completed student data.</li></ul><br />
<br />
5.	If user choose menu 3, then:<br />
	<ul><li style="">Show the student data from the list include student number.</li><li style="">	Then user will be asked to choose the student number of the student to showing the completed student data which user wants to </li></ul><br />
edit.<br />
&#61607;	Then user will be asked to input Student Id, Student Name and Student mark with the validation same as before.<br />
<br />
<b><b><b><br />
<span style="font-family: Arial Black">please, check my coding</span><br />
</b></b></b><br />
<br />
[/COLOR]<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">import java.util.*;
import java.io.*;
&nbsp;
public class J1601226535_07{
	public static void main (String&#91;&#93;args){
		Scanner in = new Scanner(System.in);
		int number = 5;//0-4
		int choice;
		int student, ID, Name;
		boolean flag;
&nbsp;
		do{
			flag = false; // untuk nilai yg minus atau salah
				try{
				number = in.nextInt();
				}catch(InputMismatchException e){
						flag=true;
						System.out.println(&quot;Inputan harus bilangan bulat&quot;);
						in.nextLine();
				}
	}while(flag);
&nbsp;
&nbsp;
			System.out.println(&quot;\t\t Student Mark List \t\t&quot;);
			System.out.println (&quot;1. Input Student&quot;);
			System.out.println(&quot;2. See All Data&quot;);
			System.out.println(&quot;3. Edit Data&quot;);
			System.out.println(&quot;4. Exit&quot;);
&nbsp;
			do{
				System.out.print(&quot;Input Your Choice &#91;1-4&#93;: &quot;);
				choice = in.nextInt();
			}while(menu &lt; 1 || menu &gt; 4);
				switch(menu){
					case 1 : System.out.println(How many student&#91;1-5&#93; ? ); break;
					case 2 : System.out.println(See All Data); break;
					case 3 : System.out.println(Edit Data); break;
						}
			}while(menu != 4);
&nbsp;
&nbsp;
					System.out.println(&quot;Please input data of 5 people&quot;);
					System.out.print(&quot;1 \t Please input Student ID &#91;10&#93;= &quot;);
					ID = in.nextInt();
					System.out.print(&quot;\t Please input Student Name\t= &quot;);
					Name = in.nextInt();
					System.out.print(&quot;\t Please input Student Mark &#91;0-100&#93;= &quot;);
					System.out.print(&quot;2 \t Please input Student ID &#91;10&#93;= &quot;);
					ID = in.nextInt();
					System.out.print(&quot;\t Please input Student Name\t= &quot;);
					Name = in.nextInt();
					System.out.print(&quot;\t Please input Student Mark &#91;0-100&#93;= &quot;);
					System.out.print(&quot;3 \t Please input Student ID &#91;10&#93;= &quot;);
					ID = in.nextInt();
					System.out.print(&quot;\t Please input Student Name\t= &quot;);
					Name = in.nextInt();
					System.out.print(&quot;\t Please input Student Mark &#91;0-100&#93;= &quot;);
					System.out.print(&quot;4 \t Please input Student ID &#91;10&#93;= &quot;);
					ID = in.nextInt();
					System.out.print(&quot;\t Please input Student Name\t= &quot;);
					Name = in.nextInt();
					System.out.print(&quot;\t Please input Student Mark &#91;0-100&#93;= &quot;);
					System.out.print(&quot;5 \t Please input Student ID &#91;10&#93;= &quot;);
					ID = in.nextInt();
					System.out.print(&quot;\t Please input Student Name\t= &quot;);
					Name = in.nextInt();
					System.out.print(&quot;\t Please input Student Mark &#91;0-100&#93;= &quot;);
&nbsp;
		}
	}</pre></div></code><hr />
</div> </div>

]]></content:encoded>
			<category domain="http://www.javaprogrammingforums.com/exceptions/">Exceptions</category>
			<dc:creator>young216</dc:creator>
			<guid isPermaLink="true">http://www.javaprogrammingforums.com/exceptions/29789-exception-use-array-help-me.html</guid>
		</item>
		<item>
			<title>Finally Block</title>
			<link>http://www.javaprogrammingforums.com/exceptions/29779-finally-block.html</link>
			<pubDate>Fri, 31 May 2013 18:41:01 GMT</pubDate>
			<description>What is the purpose of using Finally Block?  
I write code without Finally Block and with Finally Block. The result is same. 
 
CODE with...</description>
			<content:encoded><![CDATA[<div>What is the purpose of using Finally Block? <br />
I write code without Finally Block and with Finally Block. The result is same.<br />
<br />
CODE with FinallyBlock:<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code java:</div>
                <hr /><code class="bbcode_code"><div class="java" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7F0055; font-weight: bold;">public</span> <span style="color: #7F0055; font-weight: bold;">class</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a><span style="color: #000000;">&#123;</span>
<span style="color: #7F0055; font-weight: bold;">public</span> <span style="color: #7F0055; font-weight: bold;">static</span> <span style="color: #7F0055; font-weight: bold;">void</span> main<span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> args<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
<span style="color: #000066; font-weight: bold;">int</span> x <span style="color: #000000;">=</span> <span style="color: #cc66cc;">4</span>, y <span style="color: #000000;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #000000;">;</span>
<span style="color: #7F0055; font-weight: bold;">try</span><span style="color: #000000;">&#123;</span>
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #000000;">out</span>.<span style="color: #000000;">println</span><span style="color: #000000;">&#40;</span>x<span style="color: #000000;">/</span>y<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span>
<span style="color: #000000;">&#125;</span> <span style="color: #7F0055; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aarithmeticexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ArithmeticException</span></a> e<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #000000;">out</span>.<span style="color: #000000;">println</span><span style="color: #000000;">&#40;</span>e.<span style="color: #000000;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #7F0055; font-weight: bold;">finally</span><span style="color: #000000;">&#123;</span>
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #000000;">out</span>.<span style="color: #000000;">println</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">&quot;CODE with FinallyBlock&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></code><hr />
</div> CODE without FinallyBlock:<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code java:</div>
                <hr /><code class="bbcode_code"><div class="java" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7F0055; font-weight: bold;">public</span> <span style="color: #7F0055; font-weight: bold;">class</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a><span style="color: #000000;">&#123;</span>
<span style="color: #7F0055; font-weight: bold;">public</span> <span style="color: #7F0055; font-weight: bold;">static</span> <span style="color: #7F0055; font-weight: bold;">void</span> main<span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> args<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
<span style="color: #000066; font-weight: bold;">int</span> x <span style="color: #000000;">=</span> <span style="color: #cc66cc;">4</span>, y <span style="color: #000000;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #000000;">;</span>
<span style="color: #7F0055; font-weight: bold;">try</span><span style="color: #000000;">&#123;</span>
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #000000;">out</span>.<span style="color: #000000;">println</span><span style="color: #000000;">&#40;</span>x<span style="color: #000000;">/</span>y<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span>
<span style="color: #000000;">&#125;</span> <span style="color: #7F0055; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aarithmeticexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ArithmeticException</span></a> e<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #000000;">out</span>.<span style="color: #000000;">println</span><span style="color: #000000;">&#40;</span>e.<span style="color: #000000;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #000000;">out</span>.<span style="color: #000000;">println</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">&quot;CODE without FinallyBlock&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></code><hr />
</div> I'm waiting for your helps, friends. Thanks</div>

]]></content:encoded>
			<category domain="http://www.javaprogrammingforums.com/exceptions/">Exceptions</category>
			<dc:creator>AbbasAlasgarov</dc:creator>
			<guid isPermaLink="true">http://www.javaprogrammingforums.com/exceptions/29779-finally-block.html</guid>
		</item>
		<item>
			<title>java.rmi.unknownhostexception :unknown host: pc error</title>
			<link>http://www.javaprogrammingforums.com/exceptions/29599-java-rmi-unknownhostexception-unknown-host-pc-error.html</link>
			<pubDate>Wed, 22 May 2013 20:58:23 GMT</pubDate>
			<description>Hello everyone, 
 
I am beginner in java programming,when i try to run the program on the server side it is running fine but on the client side when...</description>
			<content:encoded><![CDATA[<div>Hello everyone,<br />
<br />
I am beginner in java programming,when i try to run the program on the server side it is running fine but on the client side when i execute the code i get the error message  java.rmi.unknownhostexception :unknown host: pc error. Program contains 4 files. I will post the code below.<br />
<br />
<u>ForExServerIntf.java</u><br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">import java.rmi.*;
public interface ForExServerIntf extends Remote
{
  float currency(float f1) throws RemoteException;
}</pre></div></code><hr />
</div> <br />
<u>ForExServerImpl.java</u><br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">import java.rmi.*;
import java.rmi.server.*;
public class ForExServerImpl extends
UnicastRemoteObject implements ForExServerIntf
{
  public ForExServerImpl() throws RemoteException{}
  public float currency(float f1)
  throws RemoteException
  {
    return f1/49;
  }
}</pre></div></code><hr />
</div> <br />
<u>ForExServer.java</u><br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">import java.rmi.*;
import java.net.*;
public class ForExServer
{
  public static void main(String args&#91;&#93;)
  {
    try
    {
      ForExServerImpl ForExImpl=new ForExServerImpl();
      Naming.rebind(&quot;ForExServer&quot;,ForExImpl);
      System.out.println(&quot;Server is running&quot;);
    }
    catch(Exception e)
    {
      System.out.println(e);
    }
  }
}</pre></div></code><hr />
</div> <br />
<u>ForExClient.java</u><br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">import java.io.*;
import java.rmi.*;
public class ForExClient
{
  public static void main(String args&#91;&#93;)
  {
    try
    {
      String ForExURL=&quot;rmi://&quot;+args&#91;0&#93;+&quot;/ForExServer&quot;;
      ForExServerIntf ForExServerIntf=(ForExServerIntf)Naming.lookup(ForExURL);
      System.out.println(&quot;Enter value in rupees:&quot;+args&#91;1&#93;);
      float f1=Float.valueOf(args&#91;1&#93;).floatValue();
      double d=ForExServerIntf.currency(f1);
      System.out.println(&quot;Converted value from rupees to dollar:&quot;+d);
      double r=((int)((d*100.0)+0.5))/100.0;
      System.out.println(&quot;\nRounded value is:&quot;+r);
    }
    catch(Exception e)
    {
      e.printStackTrace();
      System.out.println(&quot;Error&quot;);
    }
  }
}</pre></div></code><hr />
</div> <br />
Attachment of client side is given below<br />
<a href="http://www.javaprogrammingforums.com/attachments/exceptions/2096d1369255390-java-rmi-unknownhostexception-unknown-host-pc-error-rmiregistry1-jpg"  title="Name:  rmiregistry1.JPG
Views: 3
Size:  216.0 KB">rmiregistry1.JPG</a><br />
<br />
Please can anyone help me to solve the error.</div>


	<div style="padding:10px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<ul>
			<li>
	<img class="inlineimg" src="http://www.javaprogrammingforums.com/images/attach/jpg.gif" alt="File Type: jpg" />
	<a href="http://www.javaprogrammingforums.com/attachments/exceptions/2096d1369255390-java-rmi-unknownhostexception-unknown-host-pc-error-rmiregistry1-jpg">rmiregistry1.JPG</a> 
(216.0 KB)
</li>
			</ul>
			</fieldset>
	

	

	</div>
]]></content:encoded>
			<category domain="http://www.javaprogrammingforums.com/exceptions/">Exceptions</category>
			<dc:creator>hgauravnayak</dc:creator>
			<guid isPermaLink="true">http://www.javaprogrammingforums.com/exceptions/29599-java-rmi-unknownhostexception-unknown-host-pc-error.html</guid>
		</item>
	</channel>
</rss>
