Error launching OOPHM

I’m trying to get OOPHM working with my computer, and I hit a wall at the last steps. Here’s what I’ve done:

I started a new Vaadin project, created both a new widgetset and widget, all with the Eclipse plugin. I swapped the two gwt-libraries provided by the plugin with the two jars from the oophm jar
from the SVN
. I compiled the widgetset successfully, started Tomcat and then GWT hosted mode. The hosted mode gets an IOException when trying to launch Firefox to the hosted mode url, but I assume that’s ignorable. All’s well.

Then I copy&paste the attempted URL from the Hosted Mode window into my browser, and then it fails. The browser shows a blank page with the default background color (page source shows the usual HTML loaded), but nothing’s visible. The Hosted Mode window shows first the message "
00:00:11.079 [INFO]
Connection received from 192.168.0.50:50369
" and, underneath, an error:

Looking at the line 208 in GWT’s JdtCompiler.class, the line says, according to Eclipse:

    options.reportUnusedDeclaredThrownExceptionIncludeDocCommentReference = false;

…"
options
" being an instance of
org.eclipse.jdt.internal.compiler.impl.CompilerOptions
. Looking at the class signature, as much as Eclipse allows, there, indeed, doesn’t seem to be such a field in the
CompilerOptions
class.

So, what should I do? Upgrade Eclipse? Downgrade Eclipse? Throw in random jars until it seems to work?

You probably need to add the src folder to the OOPHM Hosted mode classpath so it can find the sources for your widgetset. OOPHM Hosted Mode compiles the source files when the first request is made.

They seem to be included by default. Explicitly adding the sources doesn’t seem to have any effect.

I think I spotted the problem: The class
org.eclipse.jdt.internal.compiler.impl.CompilerOptions
was included in two jars - once in the OOPHM jar and once again in jasper-jdt.jar, which is included as a tomcat library by eclipse. The error disappears once the tomcat libraries are removed from the hosted mode’s default classpath settings.

Now it just can’t find my widgetset from its classpath, which is weird. But that’s a whole another matter…

[quote=Henrik Paul]
Now it just can’t find my widgetset from its classpath, which is weird. But that’s a whole another matter…
[/quote]I think you need to include your source folder explicitly in the classpath, even though the default classpath entries include the src-folder.

So in classpath dialog, click on “User Entries”, then from the right side click “Advanced…”. From there select “Add folders” and click OK. Then browse for your src-folder and select it. Then move the folder up in the tree above the default classpath entries.

And from what I reckon, the reason is because the default classpath only includes the compiled .class-files (binaries) and Hosted Mode needs the original .java-files.

Hope this remedies the problem.

Yup, that fixed it.

Aren’t you both on vacation? Rainy day apparently :slight_smile:

Take a look at
http://vaadin.com/wiki/-/wiki/Main/OOPHM%20Step%20by%20Step

I’ve the same problem as you, Henrik: I cannot start the OOPHM with the same error message.
Here is the classpath:


http://screencast.com/t/m79T4MJMmW

How did you remove tomcat from the default classpath, no button is available on the dialog box for it?

Thanks.

It works for me now. I’ve removed the default user entry and added the necessary entries myself.


http://screencast.com/t/aga6c22bYLU