Your src appears not to live underneath a subpackage called 'client',but you'll need to use the <src> directive in your module to make it accessible

251 views
Skip to first unread message

Abhishek Yadav

unread,
Jul 1, 2022, 10:02:56 AM7/1/22
to GWT Users

I am using GWT 2.9.0 + GXT 4.1.0 + Java 11 combination. I am getting below error [ERROR] Hint: Your source appears not to live underneath a subpackage called 'client'; no problem, but you'll need to use the directive in your module to make it accessible ProjectName. Below is my project structure in package explorer in eclipse. Can anyone help me in resolving the issue:

MavenProjectName


src/main/java ----> This is empty

src/main/src-client
    com.cname.proj
        Main.java ---> Entrypoint class
        Main.gwt.xml
    com.cname.proj.client.centerpanelscreens
    com.cname.proj.client.command
    com.cname.proj.service
       
src/main/src-common
    com.cname.proj
          Common.gwt.xml
    com.cname.proj.model
    com.cname.proj.model.to
    com.cname.proj.service
    com.cname.proj.util
   
src/main/webapp
        index.html
src/main/webapp/WEB-INF    
         web.xml    
         
         
         
    Content in Main.gwt.xml
         
    <module rename-to="js">
     <inherits name='com.google.gwt.user.User'/>
     <inherits name='com.google.gwt.user.theme.clean.Clean'/>
    <inherits name='com.cname.proj.Common' />
    <inherits name='com.sencha.gxt.ui.GXT'/>

    <entry-point class='com.cname.proj.Main' />
    <source path="client" />
    <source path="service"/>
    </module>
   
    Content in Common.gwt.xml
   
    <module>
      <inherits name='com.sencha.gxt.ui.GXT'/>
    <source path="model"/>
    <source path="service" />
    <source path="util">
    </source>
   </module>

Jens

unread,
Jul 1, 2022, 4:35:30 PM7/1/22
to GWT Users

    Content in Main.gwt.xml
         
    <module rename-to="js">
     <inherits name='com.google.gwt.user.User'/>
     <inherits name='com.google.gwt.user.theme.clean.Clean'/>
    <inherits name='com.cname.proj.Common' />
    <inherits name='com.sencha.gxt.ui.GXT'/>

    <entry-point class='com.cname.proj.Main' />
    <source path="client" />
    <source path="service"/>
    </module>

With that configuration the GWT compiler can see packages com.cname.proj.client and com.cname.proj.service in your main project. However your entry point is not in any of these packages. You need to move the entry point into the client package and update the <entry-point> accordingly.

-- J.

Abhishek Yadav

unread,
Jul 1, 2022, 8:05:54 PM7/1/22
to google-we...@googlegroups.com
Hi Jen, 

I have changed my entry point to 
class='com.cname.proj.client.Main. But now super devmode is  now giving me an error not able to find com/cname/proj/client/Main.gwt.xml in the classpath. It forces me to keen Main.gwt.xml and Main.java in the same folder/package and then it is giving me forgot to inherit some module error. 



Thanks & Regards,
Abhishek Yadav

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/16e5b1a9-dd3b-4403-bf76-973d0370d51an%40googlegroups.com.

Thomas Broyer

unread,
Jul 2, 2022, 4:22:47 AM7/2/22
to GWT Users
I suppose you've changed the way you call SuperDevMode to pass it com.cname.proj.client.Main too: SuperDevMode expects the module name, not the entrypoint class name. So you'd give SuperDevMode com.cname.proj.Main (which is the name of the Main.gwt.xml), in which it'll find the entrypoint class name.

Abhishek Yadav

unread,
Jul 4, 2022, 7:58:03 PM7/4/22
to GWT Users
Hi Jen & Thomas,

I was able to resolve that issue but now I am stuck at a different issue.

Now my project structure related to webapp is below as folllows:

MavenProjectName

src/main/webapp
      gxt -----> Some folder and files 
      js  -----> Some folder and files '
     index.html
     proj.css
src/main/webapp/WEB-INF    
         web.xml       -----> Some servlets, their mappings and index.html in welcome-file-list tag

Scenario 1)
Now If I start codeserver then from the GWT eclipse plugin then it does not allows me to use  -noServer flag and it gives me a url http://127.0.0.1:9876/ after starting super dev mode 
and then displays message: Visit a web page that uses one of these modules
After selecting one of the link it displays a empty page on the browser and in the logs 
GET /nos/js.nocache.js
   Sent error page: not found:

Scenario 2)
Now if I run super dev mode from gwt eclipse plugin then it gives me an ClassNotFoundError for javax.sql.datasource
1)So is my folder structure correct to dispay the application host page ?
2) Also is there any documentation on how to use external servlet container along with super dev mode in eclipse plugin 

Can you let me know on this issue






Craig Mitchell

unread,
Jul 5, 2022, 11:59:55 PM7/5/22
to GWT Users
As I understand it, you don't need the -noServer flag, you just run the code server (not DevMode):
Screenshot 2022-07-06 135501.png

That needs a -launcherDir to tell it where to generate the nocache.js (that nocache.js will contain the url to your codeserver, by default running on port 9876).

Then you start your Tomcat server, and point your browser to that.

Thomas Broyer

unread,
Jul 7, 2022, 9:35:15 AM7/7/22
to GWT Users
On Tuesday, July 5, 2022 at 1:58:03 AM UTC+2 abhiy...@gmail.com wrote:
2) Also is there any documentation on how to use external servlet container along with super dev mode in eclipse plugin 


Craig Mitchell

unread,
Jul 7, 2022, 8:24:22 PM7/7/22
to GWT Users
I had never seen the "Facet Settings" menu in my GWT settings (as the videos show).  After digging around, I realised I didn't have this checked:

Screenshot 2022-07-08 101601.png

Then it appeared!

Unfortunately, it still didn't launch my code server automatically.  However, this could be because I'm using the Google App Engine (GAE) server (not Tomcat).

I suspect it wouldn't work even if it did start automatically, as GAE doesn't pick up file changes once running, so the GWT Code Server would need to start first, update the nocache.js file, and only then could the GAE start.

I'll keep starting it manually.  Not much hassle really.  :-)

Reply all
Reply to author
Forward
0 new messages