NoClassDefFoundError for com.vaadin.data.Property

Hi,

The problem I have is that I get a ClassDefNotFound exception, even though the class is in the vaadin package and can be used separately ie (Property p = new Property()). I also checked that the vaadin-sqlcontainer.1.1.0.jar package uses the same Property class in the same location. (sqlcontainer jar was taken from vaadin’s official site)

What could be the problem?

Here is the stacktrace:
com.vaadin.server.ServiceException: java.lang.NoClassDefFoundError: com/vaadin/data/Property$ConversionException
at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1466)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1420)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/vaadin/data/Property$ConversionException
at com.vaadin.addon.sqlcontainer.SQLContainer.addItem(SQLContainer.java:137)
at ee.helmes.analyzeem.DatabaseHelper.fillContainers(DatabaseHelper.java:129)
at ee.helmes.analyzeem.DatabaseHelper.(DatabaseHelper.java:51)
at ee.helmes.analyzeem.MyVaadinUI.init(MyVaadinUI.java:34)
at com.vaadin.ui.UI.doInit(UI.java:641)
at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:222)
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
… 27 more
Caused by: java.lang.ClassNotFoundException: com.vaadin.data.Property$ConversionException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:430)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
… 36 more

I have also added my pom.xml in the attachments, it should provide all the necessary version information.

Thank you in advance,
Chris Kokka
15637.xml (7.55 KB)

https://dev.vaadin.com/svn/addons/SQLContainer/trunk/demo/src/com/vaadin/addon/sqlcontainer/demo/addressbook/data/DatabaseHelper.java

This is the example code that I am using.

Problem solved by replacing the packages:

import com.vaadin.addon.sqlcontainer.SQLContainer; import com.vaadin.addon.sqlcontainer.connection.JDBCConnectionPool; import com.vaadin.addon.sqlcontainer.connection.SimpleJDBCConnectionPool; import com.vaadin.addon.sqlcontainer.query.TableQuery;

with these:

import com.vaadin.data.util.sqlcontainer.SQLContainer;
import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool;
import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool;
import com.vaadin.data.util.sqlcontainer.query.TableQuery;

and also removing the following lines:

q1.setDebug(debugMode);
personContainer.setDebugMode(debugMode);
q2.setDebug(debugMode);
cityContainer.setDebugMode(debugMode);