title: Jetty Error: java.lang.NoClassDefFoundError: com/mysema/query/dml/UpdateClause
body: <p>I run </p>
  
  <pre><code>mvn jetty:run-war
  </code></pre>
  
  <p>See this error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: com/mysema/query/dml/UpdateClause
          at java.lang.Class.getDeclaredMethods0(Native Method)
          at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
          at java.lang.Class.getDeclaredMethod(Class.java:1937)
          at org.mortbay.jetty.annotations.AnnotationFinder$ParsedMethod.toMethod(AnnotationFinder.java:360)
          at org.mortbay.jetty.annotations.AnnotationFinder.getMethodsForAnnotation(AnnotationFinder.java:678)
          at org.mortbay.jetty.annotations.AnnotationProcessor.processPostConstructAnnotations(AnnotationProcessor.java:303)
          at org.mortbay.jetty.annotations.AnnotationProcessor.processLifeCycleCallbackAnnotations(AnnotationProcessor.java:295)
          at org.mortbay.jetty.annotations.AnnotationProcessor.process(AnnotationProcessor.java:110)
          at org.mortbay.jetty.annotations.Configuration.parseAnnotations(Configuration.java:138)
          at org.mortbay.jetty.plugin.Jetty6MavenConfiguration.parseAnnotations(Jetty6MavenConfiguration.java:121)
          at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure(AbstractConfiguration.java:121)
          at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:229)
          at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp(AbstractConfiguration.java:98)
          at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp(Configuration.java:149)
          at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1212)
          at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:548)
          at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:348)
          at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:107)
          at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
          at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:151)
          at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
          at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
          at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:151)
          at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
          at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
          at org.mortbay.jetty.Server.doStart(Server.java:222)
          at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
          at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
          at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:384)
          at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:320)
          at org.mortbay.jetty.plugin.Jetty6RunWar.execute(Jetty6RunWar.java:67)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: java.lang.ClassNotFoundException: com.mysema.query.dml.UpdateClause
          at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
          at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:326)
          at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:279)
          ... 52 more
  2013-04-02 12:07:44.209::INFO:  Started SelectChannelConnector@0.0.0.0:8080
  [INFO] Started Jetty Server
  </code></pre>
  
  <p>POM is:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
      xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.rbs.prototypeweb&lt;/groupId&gt;
          &lt;artifactId&gt;stylesuite&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;com.rbs.prototypeweb&lt;/groupId&gt;
      &lt;artifactId&gt;stylesuite.ui&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;stylesuite.ui&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;sms&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- As we are doing "inplace" GWT compilation, ensure the widgetset --&gt;
              &lt;!-- directory is cleaned properly --&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;filesets&gt;
                          &lt;fileset&gt;
                              &lt;directory&gt;src/main/webapp/VAADIN/widgetsets&lt;/directory&gt;
                          &lt;/fileset&gt;
                      &lt;/filesets&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                  &lt;artifactId&gt;vaadin-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${vaadin.plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;extraJvmArgs&gt;-Xmx512M -Xss1024k&lt;/extraJvmArgs&gt;
                      &lt;webappDirectory&gt;${basedir}/src/main/webapp/VAADIN/widgetsets
                      &lt;/webappDirectory&gt;
                      &lt;hostedWebapp&gt;${basedir}/src/main/webapp/VAADIN/widgetsets
                      &lt;/hostedWebapp&gt;
                      &lt;noServer&gt;true&lt;/noServer&gt;
                      &lt;!-- Remove draftCompile when project is ready --&gt;
                      &lt;draftCompile&gt;true&lt;/draftCompile&gt;
                      &lt;compileReport&gt;true&lt;/compileReport&gt;
                      &lt;style&gt;OBF&lt;/style&gt;
                      &lt;strict&gt;true&lt;/strict&gt;
                      &lt;runTarget&gt;http://localhost:8080/&lt;/runTarget&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;configuration&gt;
                              &lt;!-- if you don't specify any modules, the plugin will find them --&gt;
                              &lt;!-- &lt;modules&gt; &lt;module&gt;com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet&lt;/module&gt; 
                                  &lt;/modules&gt; --&gt;
                          &lt;/configuration&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;resources&lt;/goal&gt;
                              &lt;goal&gt;update-widgetset&lt;/goal&gt;
                              &lt;goal&gt;compile&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
                  &lt;version&gt;6.1.10&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;scanIntervalSeconds&gt;2&lt;/scanIntervalSeconds&gt;
                      &lt;stopKey&gt;foo&lt;/stopKey&gt;
                      &lt;stopPort&gt;9999&lt;/stopPort&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;start-jetty&lt;/id&gt;
                          &lt;phase&gt;pre-integration-test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;run&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;scanIntervalSeconds&gt;0&lt;/scanIntervalSeconds&gt;
                              &lt;daemon&gt;true&lt;/daemon&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;stop-jetty&lt;/id&gt;
                          &lt;phase&gt;post-integration-test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;stop&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
                  &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                  &lt;artifactId&gt;vaadin-client&lt;/artifactId&gt;
                  &lt;version&gt;${vaadin.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                  &lt;artifactId&gt;vaadin-client-compiled&lt;/artifactId&gt;
                  &lt;version&gt;${vaadin.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                  &lt;artifactId&gt;vaadin-server&lt;/artifactId&gt;
                  &lt;version&gt;${vaadin.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                  &lt;artifactId&gt;vaadin-shared&lt;/artifactId&gt;
                  &lt;version&gt;${vaadin.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                  &lt;artifactId&gt;vaadin-themes&lt;/artifactId&gt;
                  &lt;version&gt;${vaadin.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
                  &lt;version&gt;${spring.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
                  &lt;version&gt;${spring.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
                  &lt;version&gt;${spring.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
                  &lt;version&gt;${spring.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-data-jpa&lt;/artifactId&gt;
                  &lt;version&gt;${spring.data.jpa.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;junit&lt;/groupId&gt;
                  &lt;artifactId&gt;junit&lt;/artifactId&gt;
                  &lt;version&gt;${junit.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;log4j&lt;/groupId&gt;
                  &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                  &lt;version&gt;1.2.16&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
                  &lt;version&gt;${spring.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
                  &lt;artifactId&gt;hamcrest-all&lt;/artifactId&gt;
                  &lt;version&gt;1.1&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0.Final&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
                  &lt;version&gt;${hibernate.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                  &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;version&gt;${slf4j.version}&lt;/version&gt;
                  &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;/dependency&gt;   
  
              &lt;!-- HSQL --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
                  &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
                  &lt;version&gt;${hsql.version}&lt;/version&gt;
              &lt;/dependency&gt;       
  
              &lt;!-- H2 --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.h2database&lt;/groupId&gt;
                  &lt;artifactId&gt;h2&lt;/artifactId&gt;
                  &lt;version&gt;${h2.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;joda-time&lt;/groupId&gt;
                  &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
                  &lt;version&gt;${jodatime.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
                  &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
                  &lt;version&gt;${aspectj.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
                  &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
                  &lt;version&gt;${aspectj.version}&lt;/version&gt;
                  &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;/dependency&gt;       
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-validator-annotation-processor&lt;/artifactId&gt;
                  &lt;version&gt;4.1.0.Final&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.vaadin.addon&lt;/groupId&gt;
                  &lt;artifactId&gt;jpacontainer&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0.beta1&lt;/version&gt;
              &lt;/dependency&gt;   
  
  
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>It seems to work run ok on Tomcat. Also, when I look at the server output is says </p>
  
  <blockquote>
    <p>[INFO] Starting jetty 7.0.0.pre5 ...</p>
  </blockquote>
  
  <p>which is a different jetty version to that defined in the plugin</p>