Eclipse Plugin doesn't download Vaadin 7 libraries

strange, the Vaadin Eclipse plugin doesn’t download Vaadin 7 libraries like Vaadin 6, I install as the following steps:-

  1. Clean install Eclipse 4.2 juno SR1
  2. Install Apache IvyDE 2.2.0 following instruction from Book of Vaadin 7
  3. Install Vaadin Eclipse plugin 2.1.0 following instruction from Book of Vaadin 7
  4. create a new Vaadin 7 project
  5. click project [Properties]
    → [Vaadin]
    , then the Vaadin version drop-down list is disabled, can’t find usual download button like Vaadin 6, and Vaadin 7 libraries not in my WEB-INF/lib folder

but if I create Vaadin 6 project, everything is fine, I can download Vaadin 6.x library via plugin for each projects
12774.png

Hi guys,

I want to extend this thread as I encountered the same problem based on the same settings (Win7 64 Bit, Eclipse Juno, installed Ivy and Vaadin plugins, Apache Tomcat). After creating a simple Vaadin 7 application called “Testing” based on the Eclipse Plugin with standard parameters and the deployment on the Tomcat, I always get the following error message:

HTTP Status 500 - com.vaadin.server.ServiceException: com.example.testing.TestingUI could not be loaded

type Exception report

message com.vaadin.server.ServiceException: com.example.testing.TestingUI could not be loaded

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: com.vaadin.server.ServiceException: com.example.testing.TestingUI could not be loaded
com.vaadin.server.VaadinServlet.handleServiceException(VaadinServlet.java:580)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:343)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

root cause

com.vaadin.server.ServiceException: com.example.testing.TestingUI could not be loaded
com.vaadin.server.ServletPortletHelper.verifyUIClass(ServletPortletHelper.java:86)
com.vaadin.server.ServletPortletHelper.initDefaultUIProvider(ServletPortletHelper.java:144)
com.vaadin.server.VaadinService.createAndRegisterSession(VaadinService.java:445)
com.vaadin.server.VaadinService.findOrCreateVaadinSession(VaadinService.java:420)
com.vaadin.server.VaadinService.findVaadinSession(VaadinService.java:372)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:283)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

root cause

java.lang.ClassNotFoundException: com.example.testing.TestingUI
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
com.vaadin.server.ServletPortletHelper.verifyUIClass(ServletPortletHelper.java:79)
com.vaadin.server.ServletPortletHelper.initDefaultUIProvider(ServletPortletHelper.java:144)
com.vaadin.server.VaadinService.createAndRegisterSession(VaadinService.java:445)
com.vaadin.server.VaadinService.findOrCreateVaadinSession(VaadinService.java:420)
com.vaadin.server.VaadinService.findVaadinSession(VaadinService.java:372)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:283)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

Checking the WEB-INF\lib folder, there is no jar-file included and I’m also not able to download any file via the plugin. However, reading the error messages, tomcat somehow refers to vaadin classes.

Any idea folks?

Cheers

Nicolas

I usually use Ivy to download the required jars. If you have the Ivy script from Vaadin, there is a version property that gets set. Set it 7.0.0. You libraries won’t be in your WEB-INF/lib directory but rather it’ll get added to your classpath. Everything should work and such.

For you second problem, how are you running your app?

r u mention ivy.xml in the project?
the following is my ivy.xml, it looks it defined vaadin.version to 7.0.0 at top of file…


<?xml version="1.0"?>
<!DOCTYPE ivy-module [
	<!ENTITY vaadin.version "7.0.0">
]>
<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" />
	</configurations>
	<dependencies>
		<!-- The core server part of Vaadin -->
		<dependency org="com.vaadin" name="vaadin-server" rev="&vaadin.version;"
			conf="default->default" />

		<!-- Vaadin themes -->
		<dependency org="com.vaadin" name="vaadin-themes" rev="&vaadin.version;" />

		<!-- 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;" />

		<!-- 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>

my set up is Mac OSX 10.8.2, eclipse-jee-juno-SR1-macosx-cocoa-x86_64.tar.gz

  1. Right-Click you project in eclipse
  2. Hover over Build-path
  3. Click Configure Build path
  4. Select Libraries Tab
  5. Expand ivy.xml[default]

From that list, check which jar file you got. If you don’t see any ivy.xml[default]
, do an ivy resolve. Also make sure that ivy libraires and your src directory is selected for order of export tab.

Hi, Monir,
my [ivy.xml]
under “Java Build Path”->“Libraries” is same as yours, but I still got the following error when I debug as web application
java.lang.ClassNotFoundException: com.vaadin.server.GAEVaadinServlet

btw, I test my project with google apps engine.

I had the same problem, and I solved it by downloading it through an Iphone 3G connection !

So it seems to me that it is a problem of firewall. Maybe a port or protocol that should be open ?

Does any one knows which port / protocol Ivy uses ?

I use Ant build to deploy mine. I have the same error when when I try to run it from eclipse. Sorry, I assumed you were doing the same.

I checked ivy cache directory, it looks all vaadin related jars is there, I guess the problem may not be from vaadin-eclipse plugin, it may be ivy-eclipse integration.
if I choose vaadin 6 project, every thing is fine.

The Eclipse plug-in is not using Ivy for Vaadin 6 but downloads the JAR(s) directly from vaadin.com.

If a firewall is blocking direct Ivy downloads, check if there is a Maven repository proxy on your network that you could use - sometimes direct downloads are blocked. If nothing else helps, download the Vaadin ZIP from vaadin.com and extract the relevant JARs, skipping Ivy altogether.

I have updated eclipse,GAE library 1.7.5, and latest vaadin-eclipse plugin, and download vaadin-all-7.0.1.zip and copy all jar files in package / and /lib to my WEB-INF/lib, I found a strange red error sign on my project, then I run as google web application, the error is :-

HTTP ERROR 500

Problem accessing /. Reason:

    com.google.apphosting.api.ApiProxy$Environment.getDefaultNamespace()Ljava/lang/String;
Caused by:

java.lang.NoSuchMethodError: com.google.apphosting.api.ApiProxy$Environment.getDefaultNamespace()Ljava/lang/String;
	at com.google.appengine.api.NamespaceManager.get(NamespaceManager.java:56)
	at com.google.appengine.api.memcache.MemcacheServiceImpl.setNamespace(MemcacheServiceImpl.java:181)
	at com.google.appengine.api.memcache.MemcacheServiceImpl.<init>(MemcacheServiceImpl.java:145)
	at com.google.appengine.api.memcache.MemcacheServiceFactory.getMemcacheService(MemcacheServiceFactory.java:25)
	at com.vaadin.server.GAEVaadinServlet.service(GAEVaadinServlet.java:216)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
	at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:123)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:61)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:94)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:409)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Powered by Jetty://

when I changed to vaadin 6 then everythin is fine.

What you can do is

  1. Right-Click the project and Select properties
  2. Select Deployment Assembly
  3. Click Add
  4. Choose the Java Build Path Entries
  5. Adde the ivy library.