I can not connect to mssql server

I was looking at different forums but I found that I was interested

  1. I creeted a project TestdbProject

  2. I add in A) TestdbProject /WebContent/WEB-INF/lib/sqljdbc4.jar
    B ) TestdbProject /WebContent/WEB-INF/lib/vaadin-sqlcontainer-1.1.0
    3)Compile Vaadin WidgetSEt

  3. Here is source code [code]

package com.db.testdbproject;

import java.sql.SQLException;
import java.util.Locale;

import com.vaadin.Application;
import com.vaadin.addon.sqlcontainer.SQLContainer;
import com.vaadin.addon.sqlcontainer.connection.SimpleJDBCConnectionPool;
import com.vaadin.ui.*;

public class TestdbprojectApplication extends Application {
/**
*
*/
private static final long serialVersionUID = 1L;
private SQLContainer container;

@Override
public void init() {
   initLayout();
}

private void initLayout(){
	
	System.out.println("GO GO GO");
	Window mainWindow = new Window("Test db connection");
	setMainWindow(mainWindow);
	SimpleJDBCConnectionPool connectionPool;
	
	try {
			System.out.println("Start DB CONNECTION");
			Locale.setDefault(Locale.ENGLISH);
			connectionPool = new SimpleJDBCConnectionPool("com.microsoft.jdbc.sqlserver.SQLServerDriver", "YOKO:1433", "testbill", "testbillp",2,5);
	} catch (SQLException e){
		
		System.out.println("Not ok");
	}
	
	
	
}

}

[/code]

  1. I get a exception see in the screen below.
    how
    i must do correct create the connection pool for mssql
    ???
    12289.png

i found my error in connecton string


connectionPool = new SimpleJDBCConnectionPool(“com.microsoft.sqlserver.jdbc.SQLServerDriver”, “jdbc:sqlserver://YOKO:1433;databaseName=BillAccount;”, “testbill”, “testbillp”,2,5);

The full script for mssql connection in show in a table

package com.db.testdbproject;

import java.sql.SQLException;
import java.util.Locale;


import com.vaadin.Application;
import com.vaadin.addon.sqlcontainer.SQLContainer;
import com.vaadin.addon.sqlcontainer.connection.SimpleJDBCConnectionPool;
import com.vaadin.addon.sqlcontainer.filters.Like;
import com.vaadin.addon.sqlcontainer.query.FreeformQuery;
import com.vaadin.event.FieldEvents.TextChangeEvent;
import com.vaadin.event.FieldEvents.TextChangeListener;
import com.vaadin.ui.*;
import com.vaadin.ui.AbstractTextField.TextChangeEventMode;


public class TestdbprojectApplication extends Application {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private SQLContainer container;

	@Override
	public void init() {
	   initLayout();
	}
	
	private void initLayout(){
		
		System.out.println("GO GO GO");
		Window mainWindow = new Window("Test db connection");
		setMainWindow(mainWindow);
		SimpleJDBCConnectionPool connectionPool;
		
		try {
				System.out.println("Start DB CONNECTION");
				Locale.setDefault(Locale.ENGLISH);
				connectionPool = new SimpleJDBCConnectionPool("com.microsoft.sqlserver.jdbc.SQLServerDriver",
						                                      "jdbc:sqlserver://YOKO:1433;databaseName=BillAccount;",
						                                      "testbill", "testbillp");
				 container = new SQLContainer(new FreeformQuery("SELECT TOP 1000 [ID]
 ,[ORDERID]
, [IN_CODE]
 ,[IN_PHONE]
, [IN_FNAME]
 ,[IN_LNAME]
 ,[IN_MNAME]
 ,[PAYDATE]
 ,[INFOQTY]
 ,[INFOCOST]
 FROM [BillAccount]
.[dbo]
.[bill]
" ,connectionPool));
				 System.out.println("Connect db suscesuful");
			
				
		} catch (SQLException e){
			
			System.out.println("Not ok");
		}
		
		
		
		TextField filterField =new TextField("Filter");
		filterField.setTextChangeEventMode(TextChangeEventMode.LAZY);
		filterField.setTextChangeTimeout(200);
		filterField.addListener(new filterFieldListener(container)); /// clasa filterFieldListener va fi creata mai jos 
		
		Table table =  new Table(null, container);
		table.setContainerDataSource(container);
		mainWindow.addComponent(filterField);
		mainWindow.addComponent(table);
		
		
		
		
	}
	
	
	 class filterFieldListener implements TextChangeListener{

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		private SQLContainer container;
		
		public filterFieldListener(SQLContainer container) {
			this.container = container;
		}
		
		
		
		public void textChange(TextChangeEvent event) {
			
			Like like = new Like("title", event.getText()+"%");
			container.removeAllContainerFilters();
			container.addContainerFilter(like);
			
		}
		
		
		
	      }
	
	
	
	
	

}

I sometimes appear so an error

com.vaadin.Application terminalError
SEVERE: Terminal error:
java.lang.RuntimeException: Failed to update item set size.

where this error may occur , ???

In the webpage show
[b]

Internal error

Please notify the administrator.
Take note of any unsaved data, and click here to continue.
[/b]