puppalasrikanth / google-plugin-for-eclipse

Automatically exported from code.google.com/p/google-plugin-for-eclipse
Eclipse Public License 1.0
0 stars 0 forks source link

Error loading module(s) - Strict loading #258

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Attempt to use a 'shared' gwt package resource that has non-translatable code 
in it, then try open the UI in GWT Designer.

What is the expected output? What do you see instead?
The window should display properly if the code can be compiled and run by 
normal GWT compiler.

What version of the product are you using? On what operating system?
3.1.2.r43

Please provide any additional information below.
[ERROR] Errors in 
'file:/C:/Users/Ben/Java/workspace/doltech/project-test/test/nz/co/doltech/actio
ns/client/application/ApplicationPresenterTest.java'

      [ERROR] Line 39: No source code is available for type com.google.gwt.junit.GWTMockUtilities; did you forget to inherit a required module?

      [ERROR] Line 68: No source code is available for type org.mockito.Mockito; did you forget to inherit a required module?

   [ERROR] Errors in 'file:/C:/Users/Ben/Java/workspace/doltech/src/nz/co/doltech/actions/shared/constants/DistinguishedNames.java'

      [ERROR] Line 34: No source code is available for type java.util.Properties; did you forget to inherit a required module?

      [ERROR] Line 34: No source code is available for type nz.co.doltech.actions.ActionsProperties; did you forget to inherit a required module?

   [ERROR] Errors in 'file:/C:/Users/Ben/Java/workspace/doltech/src/nz/co/doltech/actions/shared/services/ActionService.java'

      [ERROR] Line 28: No source code is available for type nz.co.doltech.actions.server.entities.ActionEntity; did you forget to inherit a required module?

   [ERROR] Errors in 'file:/C:/Users/Ben/Java/workspace/doltech/src/nz/co/doltech/framework/extensions/platform/client/test/utils/MockitoMockFactory.java'

      [ERROR] Line 12: No source code is available for type com.gwtplatform.tester.MockFactory; did you forget to inherit a required module?

      [ERROR] Line 15: No source code is available for type org.mockito.Mockito; did you forget to inherit a required module?

   [ERROR] Errors in 'file:/C:/Users/Ben/Java/workspace/doltech/src/nz/co/doltech/framework/extensions/platform/client/test/utils/PresenterTestModule.java'

      [ERROR] Line 16: No source code is available for type org.jukito.JukitoModule; did you forget to inherit a required module?

      [ERROR] Line 19: No source code is available for type com.google.gwt.junit.GWTMockUtilities; did you forget to inherit a required module?

      [ERROR] Line 21: No source code is available for type org.jukito.TestSingleton; did you forget to inherit a required module?

   [ERROR] Errors in 'file:/C:/Users/Ben/Java/workspace/doltech/src/nz/co/doltech/framework/extensions/platform/client/test/utils/TestHelper.java'

      [ERROR] Line 27: No source code is available for type org.mockito.Mockito; did you forget to inherit a required module?

   [ERROR] Errors in 'file:/C:/Users/Ben/Java/workspace/doltech/src/nz/co/doltech/framework/extensions/platform/client/test/utils/ViewTestModule.java'

      [ERROR] Line 15: No source code is available for type org.jukito.JukitoModule; did you forget to inherit a required module?

      [ERROR] Line 18: No source code is available for type com.google.gwt.junit.GWTMockUtilities; did you forget to inherit a required module?

      [ERROR] Line 20: No source code is available for type com.gwtplatform.tester.MockFactory; did you forget to inherit a required module?

   [ERROR] Errors in 'file:/C:/Users/Ben/Java/workspace/doltech/src/nz/co/doltech/framework/module/shared/services/EntityService.java'

      [ERROR] Line 17: No source code is available for type nz.co.doltech.framework.module.server.entity.Entity; did you forget to inherit a required module?

      [ERROR] Line 17: No source code is available for type nz.co.doltech.framework.module.server.entity.EntityJoin; did you forget to inherit a required module?

      [ERROR] Line 21: No source code is available for type nz.co.doltech.framework.module.server.entity.EntityPrimaryKey; did you forget to inherit a required module?

[ERROR] Failed to create an instance of 
'nz.co.doltech.framework.extensions.gwtbootstrap.client.ui.DateBox' via 
deferred binding 

Original issue reported on code.google.com by ben.tech...@gmail.com on 11 Jan 2014 at 5:23

Attachments:

GoogleCodeExporter commented 8 years ago
This is mostly GWT issue, not Designer: GWT doesn't like paths with spaces. 
I added a workaround in Designer code, but it may not help.
As a temporary workaround, move eclipse out of Program Files.

Original comment by alexande...@gmail.com on 12 Jan 2014 at 2:14

GoogleCodeExporter commented 8 years ago
Moving eclipse didn't resolve this issue. I don't think its a pathing issue 
here, it seems that when GWT Designer is trying to build the development mode 
its doing it strictly meaning any code in the shared package that has server 
side code in it is causing this error, as you can see:

doltech/src/nz/co/doltech/framework/module/shared/services/EntityService.java

this is referenced in the client, but also referenced in the server. All of the 
examples seem to be similar.

Original comment by ben.tech...@gmail.com on 12 Jan 2014 at 2:48

GoogleCodeExporter commented 8 years ago
How can I reproduce the issue?

Original comment by alexande...@gmail.com on 12 Jan 2014 at 3:59

GoogleCodeExporter commented 8 years ago
1. Create a class in the 'shared' package you have set inside your *.gwt.xml 
file (<source path="client" /> or <source path="shared" /> should be define 
obviously to tell the compiler where the translatable code is).

2. Inside this class make reference to a non-translatable class in your project 
(i.e. in the server package). Now it has a piece of code that will throw an 
error if GWT was run in -strict mode. But because we want to have a 'shared' 
package that quite literally allows sharing between server and client package 
this will work fine with normal GWT compile.

3. Reference the class you created in step 1, inside your GUI logic somewhere.

4. Try view in GWT Designer.

Here is an example class that I can show you here:

import java.util.Properties;

import nz.co.doltech.actions.ActionsProperties;

public class DistinguishedNames {

    public final static String APPS_OU = "ou=Doltech Apps";

    public final static String TAKEACTION_OU = "ou=Take Action";

    public final static String CONTACTS_OU = "ou=Contacts";

    public final static String USERS_OU = "ou=_NZOSL_Users";

    public final static String GROUPS_OU = "ou=Groups";

    public final static String SECTIONS_OU = "ou=Sections";

    // Final DN Paths

    public final static String TAKEACTION_DN = TAKEACTION_OU + "," + APPS_OU;

    public final static String CONTACTS_DN = CONTACTS_OU + "," + APPS_OU;

    public final static String USERS_DN = USERS_OU;

    public final static String GROUPS_DN = GROUPS_OU + "," + TAKEACTION_OU + "," + APPS_OU;

    public final static String SECTIONS_DN = SECTIONS_OU + "," + TAKEACTION_OU + "," + APPS_OU;

    public static String getBaseDn() {
        Properties props = ActionsProperties.getProperies();
        return props.getProperty(ActionsProperties.LDAP_BASE);
    }
}

java.util.Properties is not a translatable (to javascript) piece of code so if 
I was to reference getBaseDn() method on the client side it would fail. But it 
will still allow me to compile this without errors because I am not running in 
-strict mode. Reason I want this here is because this class is used on the 
server side and the client side.

Original comment by ben.tech...@gmail.com on 12 Jan 2014 at 4:57

GoogleCodeExporter commented 8 years ago
Can you run your project using GWT 'development mode' outside of Eclipse & GWTD?

Original comment by alexande...@gmail.com on 13 Jan 2014 at 6:25

GoogleCodeExporter commented 8 years ago
Yes without any problem at all.

Original comment by ben.tech...@gmail.com on 14 Jan 2014 at 1:54

GoogleCodeExporter commented 8 years ago
Interesting... I still cannot reproduce it. Can you provide a self-containing 
project reproducing the problem?

Original comment by alexande...@gmail.com on 15 Jan 2014 at 11:27

GoogleCodeExporter commented 8 years ago
Okay I will update that repository I shared earlier reproducing it, later today.

Original comment by dol...@gmail.com on 16 Jan 2014 at 1:33

GoogleCodeExporter commented 8 years ago
Applied the changes 
https://github.com/BenDol/GWTP-Spring-Sample/commit/7a33cf99ac0be6044c18d81c4a55
6dd1151c94ef

These changes break GWT Designer. To see this just go into 
ApplicationView.ui.xml and attempt to use GWT Designer. The reason is that the 
class called SharedWithClientAndServer has an import to a server class 
InitDispatchHandler. This example is just silly, but in theory this should work 
fine in GWT compiler.

Original comment by dol...@gmail.com on 18 Jan 2014 at 4:30

GoogleCodeExporter commented 8 years ago
Any update on this?

Original comment by noreply....@gmail.com on 29 Jan 2014 at 4:11

GoogleCodeExporter commented 8 years ago
Some one has a solution to this issue?

Original comment by estiron...@gmail.com on 22 Nov 2015 at 2:12