I am just trying to get RF running and have run into an issue when doing 
GWT compile. Basically the problem is that GWT compiler
complains that domain classes cannot be resolved. This prevents me from 
compiling with -strict option. I have made sure that both
sources and compiled classes are on classpath. I have also made sure that 
request-factory is run.

Does anyone have any ideas how to get rid of this errors? And why do I get 
them in the first place?

Validating units:
   Errors in 
'file:/D:/devel/project/sag-cliserv/src/com/example/sag/shared/application/storage/proxy/StoredItemProxy.java'
      Line 3: The import com.example.sag.server.application.StoredItem 
cannot be resolved
      Line 4: The import 
com.example.sag.server.application.StoredItemLocator cannot be resolved
      Line 11: StoredItem cannot be resolved to a type
      Line 11: StoredItemLocator cannot be resolved to a type
      Line 11: Class<StoredItemLocator> cannot be resolved to a type
   Errors in 
'file:/D:/devel/project/sag-cliserv/src/com/example/sag/shared/application/storage/rf/StoredItemContext.java'
      Line 4: The import 
com.example.sag.server.application.StoredItemLocator cannot be resolved
      Line 14: StoredItemLocator cannot be resolved to a type
Removing invalidated units
   Compilation unit 
'file:/D:/devel/project/sag-cliserv/src/com/example/sag/shared/application/storage/rf/SagRequestFactory.java'
 
is removed due to invalid reference(s):
      com.example.sag.shared.application.storage.rf.StoredItemContext
   Compilation unit 
'file:/D:/devel/project/sag-cliserv/src/com/example/sag/client/application/storage/StorageService.java'
 
is removed due to invalid reference(s):
      com.example.sag.shared.application.storage.rf.SagRequestFactory
   Compilation unit 
'file:/D:/devel/project/sag-cliserv/src/com/example/sag/shared/application/storage/rf/SagRequestContextProvider.java'
 
is removed due to invalid reference(s):
      com.example.sag.shared.application.storage.rf.SagRequestFactory
  
Below is the ant script snippet used to do javac  
  
<target name="javac" description="Compile java source to bytecode">
    <javac srcdir="src" includes="**" encoding="utf-8" 
           destdir="war/WEB-INF/classes"
           source="1.5" target="1.5" nowarn="true"
           debug="true" debuglevel="lines,vars,source">
        <classpath refid="project.class.path"/>
        <compilerarg value="-proc:only"/>
        <compilerarg line="-s .apt_generated"/>
    </javac>
    <javac srcdir="src" includes="**" encoding="utf-8"
           destdir="war/WEB-INF/classes"
           source="1.5" target="1.5" nowarn="true"
           debug="true" debuglevel="lines,vars,source">
        <classpath refid="project.class.path"/>
    </javac>
    <javac srcdir=".apt_generated" includes="**" encoding="utf-8"
           destdir="war/WEB-INF/classes"
           source="1.5" target="1.5" nowarn="true"
           debug="true" debuglevel="lines,vars,source">
        <classpath refid="project.class.path"/>
    </javac>
    <copy todir="war/WEB-INF/classes">
        <fileset dir="src" excludes="**/*.java"/>
    </copy>
</target>

And this is the GWT compile part

<target name="gwtc" description="GWT compile to JavaScript (production 
mode)">
    <java failonerror="true" fork="true" 
classname="com.google.gwt.dev.Compiler">
        <classpath>
            <pathelement location="src"/>
            <fileset dir="${gwt.sdk}" includes="*.jar"/>
            <pathelement location="${lib.root}/gwt-log-3.1.6.jar"/>
            <pathelement location="${lib.root}/gwt-oauth2-0.2-alpha.jar"/>
            <pathelement 
location="${lib.root}/google-oauth-java-client-1.6.0-beta.jar"/>
        </classpath>
        <jvmarg value="-Xmx256M"/>
        <jvmarg line="-Dgwt.jsinlinerratio=1.2"/>
        <arg line="-style OBF"/>
        <arg line="-XdisableClassMetadata"/>
        <arg line="-XdisableCastChecking"/>
        <arg line="-optimize 9"/>
        <!--<arg line="-logLevel DEBUG"/>-->
        <arg value="-compileReport"/>
        <arg value="-soyc"/>
        <arg value="-strict"/>
        <arg value="-war"/>
        <arg value="war"/>
        <arg value="com.example.sag.startup"/>
    </java>
</target>

M.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/FFPph3RLWdMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to