Deploy vaadin to JBoss 7.0 gives me a ClassNotFoundException

谁说胖子不能爱 提交于 2019-12-03 15:57:30

Seems that some GWT classes in gwt-user.jar required for compiling the Vaadin client side widgetset are loaded by the JBoss7 unnecessarily.

vaadin.jar contains references to gwt-user.jar but it's not required during runtime, only during widgetset compilation time. Still JBoss wants to load these classes causing the problem.

There's a bug report in JBoss for this: http://community.jboss.org/thread/169575?tstart=0

As mentioned there, workaround is to include gwt-user.jar to the deployment package in WEB-INF/lib folder with the vaadin.jar, seems to work.

Vaadin Eclipse plugin creates library dependencies to gwt jar files and generally Eclipse should take care of the runtime classpath when deploying.

As the package name com.google.gwt.user.client suggest this should be in gwt-user.jar.

The gwt-dev.jar should only be needed when compiling client-side code with GWT.

Are you using add-ons? Add-ons (and their dependencies) should be always added to WEB-INF/lib to make the server-side classes available to the application and client-side code available to the GWT compiler.

On possible cause of the problem is (unnecessary) dependency to client-side class which is not available in the server at runtime. So, you might also check your code for unnecessary server-side dependencies to client-side GWT classes (like HasWidgets).

Check your code to ensure that you do not accidentally access this com.google.gwt.** class from your code. As said above, there is no need to deploy gwt libraries in the server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!