fmgasparino / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

[Patch] Use own ClassLoader over SystemClassLoader to make Hosted Mode working #186

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using IntelliJ
2. Open a huge project with 100+ modules
3. On Windows operating system, the classpath length exceeds its limit and thus 
Idea enables a feature called 'dynamic classpath'
4. Starting GWT Hosted Mode.
5. Hosted Mode is starting, but when opening the page in browser, multiple 
exceptions occur (see attachment).

What is the expected output? What do you see instead?
-----------------------------------------------
GWT Hosted Mode has to work.

What version of the product are you using? On what operating system?
-----------------------------------------------
Gin 2.0.0
GWT 2.5.0
JetBrains IntelliJ Idea 12.1.1

Please provide any additional information below.
-----------------------------------------------
While hunting down the problem, we've discovered, that Jetbrian's dynamic 
classpath feature uses a different class loader. We saw, that 
GinBridgeClassLoader loads classes by using SystemClassLoader.
Now, the problem seems to be, that GinModules are loaded twice.
That will cause errors.

Additional information on the Idea dynamic classpath issue: 
http://youtrack.jetbrains.com/issue/IDEABKL-6675

We think that using SystemClassLoader is not a good idea.
As you can read in this forum
https://groups.google.com/forum/?fromgroups=#!topic/Google-Web-Toolkit-Contribut
ors/SmubHX8OgKQ
using SystemClassLoader should be avoided.
Thats why, the attached patch simply uses the ClassLoader,
which loaded GinBridgeClassLoader.class itself.
Thus everything works fine again :-)

Any feedback is welcome.

Original issue reported on code.google.com by martin.k...@hypoport.de on 15 Apr 2013 at 8:10

Attachments:

GoogleCodeExporter commented 9 years ago
Looks good to me. Did you sign Contributor License Agreement before?
Please do so if you haven't already. You can see the instructions here:
  https://developers.google.com/web-toolkit/makinggwtbetter#clas

Original comment by gok...@google.com on 16 Apr 2013 at 12:15

GoogleCodeExporter commented 9 years ago
Hi,

I've signed the Contributor License Agreement (the electric version only)
just a few seconds before.
Thank you in advance for merging this.

Regards
Martin

Original comment by martin.k...@hypoport.de on 8 May 2013 at 10:14

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r270.

Original comment by gin.mirr...@gmail.com on 11 Aug 2013 at 10:53