Well, except for the fact that it doesn't work in hosted mode, I would
now say that I have the reduced example working. Thanks for the
advice! It really made the difference.
I'm still curious about what was breaking GWT before. I've tried a
number of different permutations, first moving the super-source
library out into a separate project, so the directory structure looked
like this:
testsuper/
src/
foo.bar.test/
TestSuper.gwt.xml
foo.bar.test.hack.java.io/
OutputStream.java
And that worked. Then I put the library into its own project and a non-
src source folder, so the project structure looked like this:
testanothersuper/
foo/bar/bat/
emul
Testanothersuper.gwt.xml
emul.hack.java.io/
OutputStream.java
And that worked. As did:
testanotheranothersuper/
foo/bar/bat/
Testanothersuper.gwt.xml
hack.java.io/
OutputStream.java
What did NOT work were either of the following:
testanothersuper/
foo/bar/bat/
emul
Testanothersuper.gwt.xml
emul.java.io/
OutputStream.java
testanotheranothersuper/
foo/bar/bat/
Testanothersuper.gwt.xml
java.io/
OutputStream.java
Basically, in order for this to work, two things needed to be true:
* java.io had too be enclosed inside of another package (hack.*)
* OutputStream.java had to have a package declaration of "java.io" not
"hack.java.io".
If the second condition was not true, GWT would throw this kind of
error:
[ERROR] Line 11: The declared package "hack.java.io" does not match
the expected package "java.io"
This second condition also meant that the IDE would always get
confused and throw an error that OutputStream.java is in the wrong
package. This, in turn, was causing me, a GWT newb, to get confused,
as I just spent the last week or two trying to make both GWT and the
IDE happy. As you can see from my first post, I was trying to make it
so that the "wrapper" package (e.g. hack) was a source folder. This
made the IDE happy, but caused GWT to freak out. If there is a way to
satisfy the constraints of both the IDE and GWT, I cannot see it, and
I would greatly appreciate it if someone could point it out to me.
Fortunately, though, making the IDE happy is not critical to the
success of my project, and I think I can move on from here :D
I have one other question, but I'll put that in a separate thread.
Thanks again,
Jake
On May 14, 9:58 pm, Jake <[email protected]> wrote:
> Hi Alyxandor,
>
> Thanks for the quick response! I started a new workspace and created a
> new project per your parameters. Adding a new GWT module to the
> package foo.bar.test (for example TestSuper.gwt.xml) causes the
> following error when running from hosted mode:
>
> java.lang.NullPointerException
> at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.<init>
> (StandardLinkerContext.java:164)
> at com.google.gwt.dev.HostedMode.link(HostedMode.java:452)
> at com.google.gwt.dev.HostedMode.doStartup(HostedMode.java:353)
> at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:585)
> at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
> at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
>
> However, it compiles fine.
>
> I'm not sure to what extent it is a problem to have hosted mode
> broken, but compilation successful. I messed around with this a lot,
> and am absolutely certain that this is caused by adding a new module
> to foo.bar.test. This is strange because I've looked at the GWT source
> code, and there are many packages that have many modules in them.
> Perhaps this is a bug in the GWT Eclipse tooling. What do you think?
>
> Thanks,
>
> Jake
>
> On May 14, 9:06 pm, Alyxandor <[email protected]>
> wrote:
>
> > Are you getting a "wrong package error"? Because if you aren't, you
> > should!
>
> > Also, you've got to make your java.io hack-pack-age another level
> > deeper... You don't need to make two different source folders, that's
> > just to minimize IDE confusions....
>
> > Try this...
>
> > test/
> > src/
> > foo.bar.test/
> > Test.gwt.xml
> > TestSuper.gwt.xml
> > foo.bar.test.client/
> > foo.bar.test.server/
> > foo.bar.test.hack.java.io/
> > OutputStream.java
>
> > Where TestSuper.gwt.xml = <module><super-source path="hack"/></module>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---