Immer ein NoClassDefFoundError nach der Installation von Vaadin
Möchte ich ein Projekt mit Vaadin und bin vor einige Probleme. Hier ist, was ich Tat.
Ich Eclipse heruntergeladen und installiert die Vaadin Eclipse-plugin. Dann habe ich eine neue Vaadin 7 Projekt. Es heruntergeladen einige Ivy Abhängigkeiten aber dann, wenn ich drückte auf Ausführen, bekomme ich diesen Fehler: java.lang.NoClassDefFoundError:com/vaadin/server/VaadinServlet.
Ich ein wenig gesucht im Internet, aber ohne Erfolg. Eine Sache ist, dass in der web-app WEB-INF/lib Ordner gibt es keine Gläser. Ich habe anbei einen screenshot von der Fehlermeldung und auch web.xml und ivy.xml.
ivy.xml:
<?xml version="1.0"?>
<!DOCTYPE ivy-module [
<!ENTITY vaadin.version "7.1.7">
]>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="com.example" module="v7proj" />
<configurations>
<!-- The default configuration, which should be deployed to the server -->
<conf name="default" />
<!-- A configuration only needed when compiling the widget set. Should
not be deployed to the server -->
<conf name="widgetset-compile" />
<!-- A configuration used in compilation of server side classes only.
Should be deployed to the server -->
<conf name="nodeploy" />
</configurations>
<dependencies defaultconf="default" defaultconfmapping="default->default">
<!-- The core server part of Vaadin -->
<dependency org="com.vaadin" name="vaadin-server" rev="&vaadin.version;" />
<!-- Vaadin themes -->
<dependency org="com.vaadin" name="vaadin-themes" rev="&vaadin.version;" />
<!-- Push support -->
<dependency org="com.vaadin" name="vaadin-push" rev="&vaadin.version;" />
<!-- Servlet 3.0 API -->
<dependency org="javax.servlet" name="javax.servlet-api" rev="3.0.1" conf="nodeploy->default" />
<!-- Precompiled DefaultWidgetSet -->
<dependency org="com.vaadin" name="vaadin-client-compiled"
rev="&vaadin.version;" />
<!-- Vaadin client side, needed for widget set compilation -->
<dependency org="com.vaadin" name="vaadin-client" rev="&vaadin.version;"
conf="widgetset-compile->default" />
<!-- Compiler for custom widget sets. Should not be deployed -->
<dependency org="com.vaadin" name="vaadin-client-compiler"
rev="&vaadin.version;" conf="widgetset-compile->default" />
</dependencies>
</ivy-module>
ivysettings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<ivysettings>
<settings defaultResolver="default" />
<resolvers>
<chain name="default">
<!-- Public Maven repository -->
<ibiblio name="public" m2compatible="true" />
<!-- Vaadin Add-on repository -->
<ibiblio name="vaadin-addons" usepoms="true" m2compatible="true"
root="http://maven.vaadin.com/vaadin-addons" />
<!-- Vaadin snapshots repository -->
<ibiblio name="vaadin-snapshots" usepoms="true" m2compatible="true"
root="https://oss.sonatype.org/content/repositories/vaadin-snapshots" />
<!-- Repository used for Vaadin modified smartsprites library -->
<dual name="custom-smartsprites">
<filesystem name="smartsprites-ivy">
<ivy pattern="${basedir}/ivymodule/[module]-ivy-[revision].xml" />
</filesystem>
<url name="smartsprites-artifact">
<artifact
pattern="http://dev.vaadin.com/svn/versions/6.8/build/smartsprites/lib/[artifact](-[revision]).[ext]" />
</url>
</dual>
</chain>
</resolvers>
<modules>
<!-- Vaadin patched SmartSprites -->
<module organisation="com.carrotsearch" name="smartsprites"
revision="0.2.3-itmill" resolver="custom-smartsprites" />
</modules>
</ivysettings>
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>ScanAir</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
Bitte helfen. Ich bin im Grunde genommen stecken, ohne auch nur angefangen zu Programmieren. Ich bin auf Windows 8.1 Pro x64 mit Java 7u45 und Eclipse Kepler SR1 und Vaadin 7.1.7
Du musst angemeldet sein, um einen Kommentar abzugeben.
Auf stackoverflow gibt es viele Fragen und noch mehr Antworten zu diesem error-Ausnahme ausgelöst.
Haben Sie einen Blick auf diese gute Webseite: http://javareferencegv.blogspot.ch/2013/10/debugging-javalangnoclassdeffounderror.html
Dies ist ein guter Punkt um zu starten.
In eclipse haben Sie einen Blick auf Ihre Projekt-Eigenschaften. Dort ist ein Punkt namens "Deployment Assembly", die enthalten sollte zumindest diese zwei Einträge:
Zudem müssen Sie Ihr Projekt an den tomcat server Instanz.
https://vaadin.com/forum/message/2534863
Was Sie tun können, ist
1) Rechten Maustaste Auf das Projekt und Wählen Sie Eigenschaften
2) Wählen Sie Deployment Assembly
3) Klicken Sie Auf Hinzufügen
4) Wählen Sie Java Build Path-Einträge
5) Adde die ivy-Bibliothek.