SQLContainer - Tomcat - MySQL

hi friends

i’m a newbie about java & vaadin world. :frowning:

i’m trying to write a web app, but for now the first problem is the connection to database.

I have installed xampp with tomcat, and i have put
mysql-connector-java-5.1.15-bin.jar
and
vaadin-sqlcontainer-1.0.0.jar
into
/tomcat/lib

In the build path of my vaadin project, under libraries, i have added 2 external jar with the path of the 2 connectors in /tomcat/lib .

this piece of code generates everytime the same error:



private SQLContainer coursesContainer = null;

private void initContainers() {
		try {
			/* TableQuery and SQLContainer for courses-table */
            TableQuery q2 = new TableQuery("courses", connectionPool);
            q2.setVersionColumn("x1");
            q2.setDebug(true);
            coursesContainer = new SQLContainer(q2);            
			} catch (SQLException e) {
				showError("Could not create an instance of SQLContainer!");
				e.printStackTrace();
			}
	}


GRAVE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NoClassDefFoundError: com/vaadin/data/Container
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:162)

Caused by: java.lang.NoClassDefFoundError: com/vaadin/data/Container
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

Caused by: java.lang.ClassNotFoundException: com.vaadin.data.Container
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)

where is the error ?
Have i added correctly the build path of connectors ?

Thanks in advanced (and sorry for my bad english)


EDIT
[color=#F54545]

[/color]: I’m happy :slight_smile:
I was wrong paths.
I placed the containers in
WEB-INF/lib
using drag & drop and now it works
correctly.
Many thanks to Manvel to his suggestions.