FIRST GWT WAB [message #783268] |
Wed, 25 January 2012 06:43  |
Eclipse User |
|
|
|
I'm trying to create a Web Bundle for a sample GWT application.
I am using the GWT plugin to generate the test application and added EclipseRT Virgo Server Facets to the project. The basic structure of the project was as follows:
br.teste.web.gwt
| __src
| __ Br.teste.gwt
| __ ...
| __war
| __WEB-INF
| __web.xml
| __lib
| __gwt-servlet.jar
| __META-INF
| __MANIFEST.MF
MANIFEST.MF
Manifest-Version: 1.0
Class-Path:
Bundle-Version: 1.0.0
Bundle-Name: TesteGWT
Bundle-ManifestVersion: 2
Web-contextPath: webtest
Bundle-SymbolicName: br.teste.gwt
If I compile the project and run directly by GWT it works, but if I deploy directly in VIRGO TOMCAT Server the application loads but clicking on the button an RPC call fails with ClassNotFoundException
java.lang.ClassNotFoundException: br.teste.gwt.server.GreetingServiceImpl
org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:306)
java.lang.ClassLoader.loadClass (Unknown Source)
I understand that my WAB is not with the classes in classpath.
Any help?
|
|
|
|
|
|
|
|
|
|
Re: FIRST GWT WAB [message #783407 is a reply to message #783377] |
Wed, 25 January 2012 12:00  |
Eclipse User |
|
|
|
Add the Bundle-ClassPath in the manifest did the trick 
But I had to add each classpath entry one by one, which in a large application can be a pretty boring.
I thought that for a WAB Bundle the OSGI container import the contents of the WEB-INF/classes and WEB-INF/libs into the classpath.
Manifest-Version: 1.0
Class-Path:
Bundle-Version: 1.0.0
Bundle-Name: TesteGWT
Bundle-ManifestVersion: 2
Web-ContextPath: webtest
Bundle-SymbolicName: br.teste.gwt
Bundle-ClassPath: /WEB-INF/classes, /WEB-INF/lib, /WEB-INF, ., WEB-INF/lib/gwt-servlet.jar
Import-Package: javax.servlet;version="[3.0.0,3.0.0]",
javax.servlet.http;version="[3.0.0,3.0.0]"
Thanks Frieder and Glyn for the help!
[Updated on: Wed, 25 January 2012 12:00] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.09352 seconds