Skip to main content

Posts

JUnit issue with Eclipse and Maven

In this post I am trying to resolve one issue of JUnit with Eclipse and Maven. Sometimes while using JUnit with Eclipse and Maven we have to face certain issues. And one of them is whenever we try to run the independent test case it will run fine and will not give any type of error. But when we run to try to compile the whole project, the same test will not compile at all. This is an annoying issue if someone does not know about the functionality of how Eclipse works with JUnit and Maven. JUnit in Action Since there is such no exception seen in file, but project compilation fails due to same file it is very frustrated for developer to figure out the issue. I am facing this issue and found a solution by googling around many forums. Problem : You have created a JUnit test case in the project and it is running fine, but fails to compile the whole project when try to build using Maven. Solution : Check that the test case you have created exist in the src/test/java folder and no

Java Bloggers Meet Oracle IDC Hyderabad

Oracle India had organized a Java Bloggers meet on 13th Jun 2015, at their office at Hyderabad on the occasion of Java completing 20 years. I was also invited to the event which is very exciting for me. I am on cloud nine when I got invited for the event. Oracle India had celebrated the event by organizing speeches by Sanket Atal - Group Vice President, R&D, Harshad Oak - Java Champion and Oracle ACE Director, and a live demonstration by Debraj Dutta , of a Bot-So a robot designed by Edifixio India and is based on IoT and fully developed using Java 8 features like streams for concurrency. Event started by Vandana Shenoy - Director Corporate Communications , by giving a small introduction about the event and a formal introduction of the speakers. Sanket Atal The presentation by him is more like a discussion. We have discussed and have fun question answers, quiz in between it. Below are the points he discussed: Java was started in 1991 under the name Project Stealth

20 year celebration of Java

We at Chandigarh celebrated Java's 20th birthday on 23rd May. This was the first time that @ChdJUG had celebrated this event. It is very enjoyable and memorable event. We had enjoyed a lot and cut a special cake on this occasion.  We hope to increase our community at Chandigarh and next year I am sure it will be bigger one :) You can follow me on Twitter @vinodkashyap and Chandigarh JUG @ChdJUG for more updates. 

RESTful Web Services - POST, PUT, GET, DELETE

Web services are very common these days as everything or most of the implementation is now API based. Every social network is providing API for fetching their data. Like if you take a case of TWITTER, it provides it's API to fetch different data related to user or for analytic. There are 2 types of web services namely: SOAP REST SOAP is based on WSDL and return data in XML format. But I will not talk about it here. I will be discussing about REST , an acronym for RE presentational S tate T ransfer methods. RESTful web services are very simple to learn and implement. They are basically stateless. It is based on HTTP URI and everything is implemented using URL. In this post I will explain about the four methods that are used with REST. POST PUT GET DELETE Let's dive deep into each of these methods of the REST. RESTful Java Web Services: Master Core REST Concepts and Create RESTful Web Services in Java POST It is used for creating a new entity. It is basically us

Reset username for SVN in eclipse

Sometimes we want to change the username and password for the SVN access in Eclipse or Spring Tools Suite. But it does not asks for it. There is a very easy way of doing this. You can easily find out the solution on google :). I am writing here again to save to my memory. The solution is for Windows platform and tried and tested on Windows 7.  Here is the path where you need to delete one folder to do the same.  1. First close Eclipse/STS if your had open it. Some times without closing first it will not work.  2. Go to C:\Users\<username>\AppData\Roaming\Subversion\auth  3. Delete svn.simple folder  4. That's it. Now when you restart your IDE and go to SVN it will again ask you for credentials.  Note : AppData folder is hidden and not viewed by default. To make it visible follow below steps:  1. C:\Users\<username>  2. Go to menu Tools --> Folder Options --> View Tab --> Click Show hidden files, folders and drives under Hidden Files and Folders.  Happy Codin

IndicThreads Conference Pune '15

This is one of my favorite Java conferences in India that everyone wants attend for sure. Most of the time it is based on the Java , but this time it is going far behind with IoT, Big Data, Cloud and many more interseting sessions as well. Sessions are great and speakers too. Conference is great and people loved to join it. You will learn a lot of new things and get to know about the industry. It enhances your vision to view the future. You will get a chance to meet the great brains behind the great innovations in the industry. This conference is organized by India's first " Java Champion Harshak Oak ". He is very nice and humble guy. I had meet him before and he always answer your queries without any hesitation and a smile on his face :) Visit the conference website: http://pune15.indicthreads.com/ See the sessions here: http://pune15.indicthreads.com/category/sessions/ See the speakers here: http://pune15.indicthreads.com/category/speakers/ I am going with 2 of m

Singleton Pattern revisited

As the name suggest, Singleton Pattern restricts to the creation of one and only one object of a class. This is very useful whenever we want to restrict the creation of an object to single instance . This is very small and sweet type pattern that is used in many cases. Let's take an example and see how it is used in the code public class SingleObject { private static SingleObject singleObject; private SingleObject() { } public static SingleObject createInstance() { if (singleObject == null) { singleObject = new SingleObject(); } return singleObject; } } Line by line explanation Line 2 : creates private instance of the class Line 4 : constructor is private, so that no outer class can create object of this class Line 7 : creating a static method to get an instance of the class. We have defined method as static so that we don't need to create a object to call this method. Since it is static we can call this method by name of the class i.e. SingleO