problems with entry class

106 views
Skip to first unread message

Lucius Meredith

unread,
Sep 18, 2012, 12:52:06 AM9/18/12
to scal...@googlegroups.com
Dear ScalaGWTly,

i've just begun working with ScalaGWT and am beginning with the sample: scalagwt-sample-0.1-M3.zip.

i've modified the showcase example ever so slightly -- just putting it into a different package -- to learn the build process. After a little hiccup with the gwtc task modifications everything seems to be working -- except the entry class. 

In my <project>.gwt.xml file i've got the following declaration

<entry-point class='com.biosimilarity.iacontainer.client.Showcase'/>

and in the corresponding file Showcase.scala i have the first line:

package com.biosimilarity.iacontainer.client

moreover, in the compilation trace i see

> ant build
...

[java] Compiling com.biosimilarity.iacontainer.client.Showcase
...

but then it errors with

     [java]    Added 6143 units to persistent cache.
     [java]    Removing invalidated units
     [java]    Finding entry point classes
     [java]       [ERROR] Unable to find type 'com.biosimilarity.iacontainer.client.Showcase'
     [java]          [ERROR] Hint: Check that the type name 'com.biosimilarity.iacontainer.client.Showcase' is really what you meant
     [java]          [ERROR] Hint: Check that your classpath includes all required source roots

As usual, i've no idea what i'm doing. So, any clues would be greatly appreciated.

Best wishes,

--greg

Lex Spoon

unread,
Sep 18, 2012, 9:41:25 AM9/18/12
to scal...@googlegroups.com
You might have a problem with your include paths in your gwt.xml file.
GWT only uses classes that are both on its class path and also
included via a gwt.xml file.

I'm sorry I can't give a more detailed reference off the top of my
head, but that's an angle I would look into given that GWT isn't
finding the class.

Lex

Meredith Gregory

unread,
Sep 18, 2012, 12:18:47 PM9/18/12
to scal...@googlegroups.com
Dear Lex,

Thanks! i looked into that angle. i'm not seeing the equivalent include in the sample. 

Morally, all i've done is a sed mapping com.google.gwt.sample.showcase to com.biosimilarity.iacontainer on all the relevant files:

build.xml
<project>.gwt.xml
*.scala
*.java

i've posted a version of the project here and included side-by-side comparisons of the sample .gwt.xml file and the variant i made below (in hopes that just by explaining it i'd see the problem, myself!).

Best wishes,

--greg

Here's the sample Showcase.gwt.xml

<module rename-to="showcase">
  <!-- Inherit the core Web Toolkit stuff. -->
  <inherits name="com.google.gwt.core.Core"/>
  <inherits name='com.google.gwt.user.User'/>
  <inherits name="com.google.gwt.i18n.I18N"/>
  <inherits name="com.google.gwt.i18n.CldrLocales"/>
  <inherits name="com.google.gwt.user.theme.standard.StandardResources"/>
  <inherits name="com.google.gwt.user.theme.chrome.ChromeResources"/>
  <inherits name="com.google.gwt.user.theme.dark.DarkResources"/>
  <inherits name="ScalaLibrary"/>

  <!-- Enable debug ID. -->
  <inherits name="com.google.gwt.user.Debug"/>
  <set-property name="gwt.enableDebugId" value="true"/>

  <!-- Use a generator to create the source code -->
  <generate-with class="com.google.gwt.sample.showcase.generator.ShowcaseGenerator">
    <when-type-assignable class="com.google.gwt.sample.showcase.client.Showcase.GeneratorInfo" />
  </generate-with>

  <!-- Use google-code-prettify to pretty-print source code -->
  <script src="prettify.js" />
  <script src="lang-scala.js" />
  <stylesheet src="prettify.css" />

  <!-- Specify the app entry point class. -->
  <entry-point class='com.google.gwt.sample.showcase.client.Showcase'/>

  <!-- Internationalization support. -->
  <extend-property name="locale" values="en"/>
  <set-property-fallback name="locale" value="en"/>
</module>

And here's my version

<module rename-to="iacontainer">
  <!-- Inherit the core Web Toolkit stuff. -->
  <inherits name="com.google.gwt.core.Core"/>
  <inherits name='com.google.gwt.user.User'/>
  <inherits name="com.google.gwt.i18n.I18N"/>
  <inherits name="com.google.gwt.i18n.CldrLocales"/>
  <inherits name="com.google.gwt.user.theme.standard.StandardResources"/>
  <inherits name="com.google.gwt.user.theme.chrome.ChromeResources"/>
  <inherits name="com.google.gwt.user.theme.dark.DarkResources"/>
  <inherits name="ScalaLibrary"/>

  <!-- Enable debug ID. -->
  <inherits name="com.google.gwt.user.Debug"/>
  <set-property name="gwt.enableDebugId" value="true"/>

  <!-- Use a generator to create the source code -->
  <generate-with class="com.biosimilarity.iacontainer.generator.ShowcaseGenerator">
    <when-type-assignable class="com.biosimilarity.iacontainer.client.Showcase.GeneratorInfo" />
  </generate-with>

  <!-- Use google-code-prettify to pretty-print source code -->
  <script src="prettify.js" />
  <script src="lang-scala.js" />
  <stylesheet src="prettify.css" />

  <!-- Specify the app entry point class. -->
  <entry-point class='com.biosimilarity.iacontainer.client.Showcase'/>

  <!-- Internationalization support. -->
  <extend-property name="locale" values="en"/>
  <set-property-fallback name="locale" value="en"/>
</module>
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SW
Reply all
Reply to author
Forward
0 new messages