Eclipse: resource is outof sync with the file system – permanent solution

Mysteriously got the following exception when trying to build an Eclipse project: “resource is out of sync with the file system” Although I can’t be sure, I think I may have deleted a file outside of Eclipse. To fix the problem, right click the project or edited resource and select “Refresh”. Alternatively, you can enable […]

J2EE Basics: JDBC Driver Connections

JDBC Driver Connection Method list There are many version of the Friends to find JDBC driver or the driver often ask how to use,In here I simply sort out driver with more typical usage.1. Microsoft SQL Server series (6.5, 7.x and 2000) and Sybase 10 Microsoft SQL Server series (6.5, 7.x and 2000) and Sybase […]

java.sql.SQLException: Io exception: Invalid Packet Lenght

Similar exceptions are : 1. Io exception: Unexpected packet 2. java.sql.SQLException: Protocol violation 3. java.sql.SQLException: Io exception: Bad packet type 4. java.sql.SQLException: Bigger type length than Maximum 5. java.sql.SQLException: Io exception: Invalid Packet Lenght 6. java.sql.SQLException: Closed Connection 7. java.sql.SQLException: Closed Statement 8. java.sql.SQLException: Refcursor value is invalid 9. java.sql.SQLException: Io exception: Size Data […] 5-byte UTF8 encoding not supported.

An interesting exception faced while parsing xml content. Also, on further analysis on this error caused below similar issues started to raise. Another similar exception is: Invalid byte 1 of 1-byte UTF-8 sequence Here, I am trying to parse an xml string using byte array from the xml string, and give that array as […]

Core Java: StringBuffer and StringBuilder

StringBuffer is used to store character strings that will be changed (String objects cannot be changed). It automatically expands as needed. Related classes: String, CharSequence. StringBuilder was added in Java 5. It is identical in all respects to StringBuffer except that it is not synchronized, which means that if multiple threads are accessing it at […]

Building DOM tree by reading an xml file in Java

This is the common code used to parse XML files in Java. Often we see calling this method from other part of code as

So, this become commonly used scripts in XML programming with Java. Vamsi PavanVamsi Pavan is an alumni of IIIT-Hyderabad with honors in computer science & engineering. He works as […]

Difference between String str=”abc” and str=new String(”abc”)?

1) using new operator:- String st=new String(“abc”); 2) Without using new operator:- String st=”abc”; Once string object is created with or without new operator contents of string object cannot be modified. But we can modify String reference variable. when you are trying to modify string objects ie.. concatinating,repalcing etc.. a new string object will be […]

Reading and Writing Excel Files with POI

In this article we’ll show you how to read and write Excel files and how to read any Microsoft file’s document properties. Conventions The POI project is nearing a 2.0 release and is in a stage of rapid development, with new features and changes integrating nightly. In order to keep this article relevant, we’ll refer […]