Pages

Friday, May 23, 2014

The prefix "util" for element "util:set" is not bound.



If you get the following error in while executing a Spring program.Following are the steps to resolve it.

Add the namespaces (the ones that are highlighted below in your spring configuration file)

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:util="http://www.springframework.org/schema/util"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/util
  http://www.springframework.org/schema/util/spring-util-2.5.xsd">

This will resolve the issue
    public class HelloWorld {
       private String message;
     
       public void setMessage(String message){
          this.message  = message;
       }
     
       public void getMessage(){
          System.out.println("Your Message : " + message);
       }
    }



How to install adventureworks2012 database



  • Download the zip file at link.

Unzip the folder .The folder contains  two files with .mdf and .ldf extension.Login to SQL Server using the management studio.Right click on the databases and select Attach.It opens a dialog box as shown below.



Click on the ADD button of the dialog box and give the path of the mdf file . Click OK . The mdf file gets attached. Click OK to close the dialog box as shown in the below.

Below is the screenshot after the database gets sucessfully attached.



Wednesday, May 21, 2014

How to create a java project in eclipse




  • Create a java project by selecting File->New->Java Project.It opens a window as shown below.
  • Fill in the name of the project and the location (if you want to change)



  • Click on Next and then Click on Finish .If it asks for perspective change click on yes.This creates the HelloWorldSpring  java project.

Set the libraries:

Configure the build path.To do this,go to package explorer view ,right click on the project ,select build path  ->Configure Build path->select Libraries tab and select add external jars.