Rectangle 27 1

Defining unique models in the spec files is not necessarily a bad idea since it makes it easy to see exactly how each model is defined. The obvious problem with this approach is if you want to reuse the models in other test files. The Rails approach to this is to define all the models in separate files and then just require them in the tests that need it.

I think it really just depends on how many models you have and how much you want to reuse. In one of my gems, I took the approach of defining the models in the spec file, in another gem, I defined them in the spec helper, and in yet another I took the Rails approach and used a separate directory for them. If you asked me which one I preferred, I'd probably go with the spec that also contains the models because it's all in one place. Definitely a subjective problem though.

Another approach I've taken on occasion is to create an anonymous class that's guaranteed to only be around for the life of that test:

describe 'my test' do
  let(:my_class) do do
      has_many :things
      belongs_to :something_else

  it 'should have many things' do
    my_class.should have(100).things

ruby on rails - Lots of different models in tests (rspec)? Advanced - ...

ruby-on-rails ruby rspec
Rectangle 27 2

My guess is that you are using a separate war directory in your external server, have copied all of your static content over (including the *.gwt.rpc files) to that war directory, and then changed something about the serializable models that you are passing across your RPC calls. Whenever these models change the generated .gwt.rpc files will have changed. Your server would be using one variation of the serialization policies and your client java debugging would be using a different one.

I can think of two options:

Option #2 is the one I go with when dealing with large complex systems that require an external server.

This was my thought as well but I am using the same war directory. However the classes that the system is complaining about are in a seperate maven module. I am wondering if there is something that Intellij does when running in complete dev mode that it doesn't when the noserver flag is set?

xsee, Is there anything special I have to do in order to make this happen.

Hmmm, I don't use IntelliJ so it's hard for me to speculate but I doubt it is doing anything that would be too different from what eclipse does in this scenario. I wonder if your external Jetty server is caching the serialization policies? I haven't used an external Jetty in awhile so I don't have any configuration files handy to reference.

Ok, thanks. I think it may be related to the compiler setup. I am investigating ;)

gwt rpc - Intermitant serialization exception with GWT Dev mode and ex...

gwt gwt-rpc gwt-platform gwtp