retrieving data from mysql using vaadin+hibernate persistance

i am using eclipse
i have configured hibernate libraries +.cfg.xml+hbm.xml
i have created a form and bind it to pojo.
i want to authenticate users to login into sms window with username and password.
but when i click login button, no response,
message from server:
INFO: Not binding factory to JNDI, no JNDI name configured
Hibernate: select this_.userID as userID0_0_, this_.userName as userName0_0_, this_.userPassword as userPass3_0_0_, this_.secretQuestion as secretQu4_0_0_, this_.secretAnswer as secretAn5_0_0_ from account this_ where this_.userName=? and this_.userPassword=? limit ?

i need your help please…i have attach my codes…

vaadinApplication
package com.example.dawasco;

import com.vaadin.Application;
import com.vaadin.service.ApplicationContext;

public class DawascoApplication extends Application implements ApplicationContext.TransactionListener {
/**
*
*/
private static final long serialVersionUID = 1L;
private static ThreadLocal currentApplication=new ThreadLocal();

@Override
public void init() {
	getContext().addTransactionListener(this);
	setMainWindow(new LoginForm());
}

public void loadProtectedResource(){

	setMainWindow(new SmsWindow());
}


public void transactionStart ( Application application, Object o )
{
    if ( application == DawascoApplication.this )
    {
        currentApplication.set ( this );
    }
}

public void transactionEnd ( Application application, Object o )
{
    if ( application == DawascoApplication.this )
    {
        currentApplication.set ( null );
        currentApplication.remove ();
    }
}
public static DawascoApplication getInstance()
{
    return currentApplication.get();
}

}

my login Window:

package com.example.dawasco;

import java.util.Vector;

import org.hibernate.Criteria;

import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;

import com.example.dawasco.Login;
import com.vaadin.data.util.BeanItem;
import com.vaadin.ui.Button;
import com.vaadin.ui.Form;
import com.vaadin.ui.HorizontalLayout;

import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;

public class LoginForm extends Window {

/**
 * 
 */
private static final long serialVersionUID = 1L;
//Create a form 
private final Form form=new Form();
private final HorizontalLayout hLayout=new HorizontalLayout();
private Login user =null;




Login bean =new Login();



public LoginForm() {
	super("login to customer account");
	createForm();
	
}

public LoginForm(String a){
	
}

public void createForm(){
	 
	// use FormLayout as its layout.
	form.setFormFieldFactory(new LoginFieldFactory());
	// Set form caption and description texts form
	form.setCaption("REGISTERED CUSTOMER LOGIN:");
	form.setDescription("make sure you fill your username and password");
	
	// Create the login bean.
	// Create a bean item that is bound to the bean.
	BeanItem<Login> item = new BeanItem<Login>(bean);

	// Bind the bean item as the data source for the form. 
	form.setItemDataSource(item);
	
	// Set the order of the items in the form.
	Vector<String> order = new Vector<String>();
	order.add("username");
	order.add("password");
			
	form.setVisibleItemProperties(order);
	hLayout.setSpacing(true);
	
	  
     
	Button loginButton = new Button("login", new Button.ClickListener() {
        /**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		public void buttonClick(ClickEvent event) {
            try {
                form.commit();
            
               
               authenticate(bean.getUsername(), bean.getPassword());
             
            } catch (Exception e) {
                // Ignored, we'll let the Form handle the errors
            }
        }
    });
	 
	 hLayout.addComponent(loginButton);
     form.getFooter().addComponent(hLayout);
     form.getFooter().setMargin(false, false, true, true);
     form.setImmediate(true);
     addComponent(form);
	
}





public void authenticate(String username, String password) throws Exception {
    
	  dbLogin();
 
 if ((user.getUsername()==username)&&(user.getPassword()==password)) {
  
      DawascoApplication.getInstance().loadProtectedResource();
        }
 
        else {
        	throw new Exception("Login failed!");
        
        }
    } 

public void dbLogin()
{
	Session sess = HibernateUtil.getSessionFactory().getCurrentSession();
	  Transaction newTransaction = sess.beginTransaction();
	  Criteria cri=sess.createCriteria(Login.class);
	  Criterion usernameCriteria=Restrictions.eq("username",bean.getUsername());
	  Criterion passwordCriteria=Restrictions.eq("password",bean.getPassword());
	  cri.add(usernameCriteria);
	  cri.add(passwordCriteria);
	  cri.setMaxResults(1);
	   user = (Login)(cri.uniqueResult());
	   newTransaction.commit();
		sess.close();
	
}

}

my Login.class:

  public Login(String username, String password) {
        this.username = username;
        this.password = password;
    }
  
  
public String getId() {
	return id;
}


public void setId(String id) {
	this.id = id;
}


public String getQuestion() {
	return question;
}


public void setQuestion(String question) {
	this.question = question;
}


public String getAnswer() {
	return answer;
}


public void setAnswer(String answer) {
	this.answer = answer;
}


public String getUsername() {
	return username;
}
public void setUsername(String username) {
	this.username = username;
}
public String getPassword() {
	return password;
}
public void setPassword(String password) {
	this.password = password;
}

}

my Login.cfg.xml

<?xml version='1.0' encoding='utf-8'?>
<session-factory>

    <!-- Database connection settings -->
    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="connection.url">jdbc:mysql://localhost:3306/dawasco</property>
    <property name="connection.username">root</property>
    <property name="connection.password"></property>
     <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>

    

    <!-- JDBC connection pool (use the built-in) -->
    <property name="connection.pool_size">2</property>

    <!-- SQL dialect -->
    <property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>

    <!-- Enable Hibernate's automatic session context management -->
    <property name="current_session_context_class">thread</property>

    <!-- Disable the second-level cache  -->
    <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

    <!-- Echo all executed SQL to stdout -->
    <property name="show_sql">true</property>

    <!-- Drop and re-create the database schema on startup -->
    <!-- <property name="hbm2ddl.auto">update</property> -->

    <mapping resource="com/example/dawasco/Login.hbm.xml"/>

</session-factory>
[12005.java|attachment](upload://nSdV7OZ74rRfxv12XQueaWjR0BS.java) (1.12 KB) [12006.java|attachment](upload://iYqUmNdtzCOyDbun7SShHUKFF0f.java) (2.13 KB) [12007.java|attachment](upload://2zWi8a1B8BEA0Gc9N2zi8mlxwuA.java) (5.38 KB) [12008.java|attachment](upload://Vo2464zXXdpCzVchIRXP2cHE5l.java) (2.54 KB) [12009.xml|attachment](upload://xbz1W22paH81X6Lu98DVgObqHN0.xml) (1.68 KB)