• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)

Java Exceptions

java

IOException Example in Java

February 6, 2023 //  by Kenya Cardenas//  Leave a Comment

In this tutorial I am going to explain one of the most common Java exception that is well known by all the Java developers. IOExceptions are thrown when there is any input / output file operation issues while application performing certain tasks accessing the files. IOException is a checked exception and application developer has to handle in …

Category: JavaTag: Java Exceptions

Java Exceptions Best Practices

Top 11 Java Exception Best Practices

February 13, 2016 //  by Krishna Srinivasan//  Leave a Comment

In my previous tutorial about Java exceptions, I have covered suppressed exceptions and java exception handling. It is one of the important coding practice to do efficient and foolproof exception handling for your projects. To achieve that, you must have a good knowledge on best practices used for exception. This tutorial will highlight the most significant …

Category: JavaTag: Java Exceptions

java

java.net.ConnectException Example

February 12, 2016 //  by Krishna Srinivasan//  Leave a Comment

java.net.ConnectException is thrown when client socket is not able to connect to the server socket. java.net.ConnectException is subclass of java.net.SocketException. In this short tutorial, I am going to write a simple program for client socket that sends message to the server socket. Then server socket process the message and prints it. When there is a …

Category: JavaTag: Java Exceptions

java

EOFException Example in Java

February 6, 2016 //  by Krishna Srinivasan//  Leave a Comment

EOFException in Java is thrown when end of file is reached unexpectedly while processing the input. These exceptions are thrown while working the DataInputStream, ObjectInputStream and RandomAccessFile classes. All these classes are using one of the stream classes like FileInputStream for reading the data. When there is no data available in the stream by DataInputStream …

Category: JavaTag: Java Exceptions

Java InvalidPropertiesFormatException Example

November 8, 2014 //  by Krishna Srinivasan//  Leave a Comment

When we are using the collection of properties, if the input does not conform to the valid XML document type with the appropriate properties specification at that time an exception is thrown called InvalidPropertiesFormatException, to indicate operation could not be completed. This example explains about that exception. Java InvalidPropertiesFormatException Class Declaration In the above declaration, …

Category: JavaTag: Java Exceptions

javax.naming.NameNotFoundException: Name is not bound in this Context Exception

May 3, 2014 //  by Krishna Srinivasan//  Leave a Comment

When you are working with the JNDI look up, quite often you would encounter the javax.naming.NameNotFoundException thrown by your application. JNDI names are registered in the registery, if you try to access the name which is not registered or by the wrong format, you would get the javax.naming.NameNotFoundException. Lets look at the below code for …

Category: Java EETag: Java Exceptions, JNDI

java.sql.SQLException: Can’t call commit when autocommit=true Exception

May 3, 2014 //  by Krishna Srinivasan//  Leave a Comment

When you work with JDBC application, by default the auto commit is set to true, after the transaction is completed all the transactions are committed to the database. When it is set as true, you can not explicitly call the commit method. If you call the connection.commit() method, then the below exception will be thrown.

Category: JavaTag: Java Exceptions, JDBC

How To Resolve java.lang.IllegalAccessException

April 24, 2014 //  by Krishna Srinivasan//  Leave a Comment

This example shows when the java.lang.IllegalAccessException is thrown in your application. When an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, if that method is not accessible to your application (probably the modifier is private or not accessible one), then your application will …

Category: JavaTag: Java Exceptions, Java Lang

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

New Features in Spring Boot 1.4

Difference Between @RequestParam and @PathVariable in Spring MVC

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Introductiion to Jakarta Struts

What’s new in Struts 2.0? – Struts 2.0 Framework

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact