This is what my StepInjector looks like:

package com.tyndalehouse.step.web.client.gin;

import net.customware.gwt.dispatch.client.gin.ClientDispatchModule;
import net.customware.gwt.presenter.client.place.PlaceManager;
import com.google.gwt.inject.client.GinModules;
import com.google.gwt.inject.client.Ginjector;
import com.tyndalehouse.step.web.client.presenter.AppPresenter;

@GinModules({ ClientDispatchModule.class, StepClientModule.class })
public interface StepInjector extends Ginjector {
        AppPresenter getAppPresenter();
        PlaceManager getPlaceManager();
}


====================================
My StepClientModule

package com.tyndalehouse.step.web.client.gin;

import net.customware.gwt.presenter.client.EventBus;
import
net.customware.gwt.presenter.client.gin.AbstractPresenterModule;
import net.customware.gwt.presenter.client.place.PlaceManager;
import com.google.inject.Singleton;
import com.google.inject.TypeLiteral;
import com.tyndalehouse.step.web.client.CachingDispatchAsync;
import com.tyndalehouse.step.web.client.presenter.AppPresenter;
import
com.tyndalehouse.step.web.client.presenter.HistoryModulePresenter;
import
com.tyndalehouse.step.web.client.presenter.ModuleSelectorPresenter;
import com.tyndalehouse.step.web.client.presenter.ScripturePresenter;
import
com.tyndalehouse.step.web.client.presenter.ScriptureSelectorPresenter;
import com.tyndalehouse.step.web.client.presenter.StepModulePresenter;
import com.tyndalehouse.step.web.client.presenter.StepPresenter;
import com.tyndalehouse.step.web.client.presenter.TimelinePresenter;
import com.tyndalehouse.step.web.client.service.eventbus.StepEventBus;
import com.tyndalehouse.step.web.client.view.HistoryModuleView;
import com.tyndalehouse.step.web.client.view.ModuleSelectorView;
import com.tyndalehouse.step.web.client.view.ScriptureSelectorView;
import com.tyndalehouse.step.web.client.view.ScriptureView;
import com.tyndalehouse.step.web.client.view.StepView;
import com.tyndalehouse.step.web.client.view.TimelineView;

public class StepClientModule  extends AbstractPresenterModule {

        @Override
        protected void configure() {

                bind(EventBus.class).to(StepEventBus.class).in(Singleton.class);
                bind(AppPresenter.class).in(Singleton.class);
                bind(PlaceManager.class).in(Singleton.class);
                
//bind(Log.class).toProvider(LogProvider.class).in(Singleton.class);
...
        }

}

====================================
and my AppPresenter
package com.tyndalehouse.step.web.client.presenter;

import net.customware.gwt.dispatch.client.DispatchAsync;

import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.inject.Inject;

public class AppPresenter {
        private HasWidgets container;
        private StepPresenter stepPresenter;

        //passing them in to have GIN initialise them!
        @Inject
        public AppPresenter(final DispatchAsync dispatcher,
                        final StepPresenter stepPresenter,
                        ScripturePresenter scripturePresenter,
                        ScriptureSelectorPresenter scriptureSelectorPresenter
                        ) {
                Log.debug("AppPresenter is being initialised");
                this.stepPresenter = stepPresenter;
        }

        private void showMain() {
                container.clear();
                container.add(stepPresenter.getDisplay().asWidget());
        }

        public void go(final HasWidgets container) {
                this.container = container;
                showMain();
        }
}

On Dec 12, 7:16 pm, Chris <[email protected]> wrote:
> Hi
>
> I'm trying to build by gwt application with ant. I can succesfully
> compile everything together, but I'm having trouble actually doing the
> gwt-compile.
>
> These are what my two tasks look like:
>
>         <target name="compile" depends="" description="Compiling web-app">
>                 <mkdir dir="${output.dir}" />
>                 <javac srcdir="src" destdir="${output.dir}"
> classpathref="classpath">
>                 </javac>
>         </target>
>
>         <target name="compile-gwt" depends="compile">
>                 <java
>                         failonerror="true"
>                         fork="true"
>                         classname="com.google.gwt.dev.Compiler"
>                         >
>                       <classpath>
>                         <pathelement location="src/main/java"/>
>
>                         <path refid="classpath"/>
>                       </classpath>
>                         <jvmarg value="-Xmx256M"/>
>                         <arg value="com.tyndalehouse.step.web.stepwebapp"/>
>                 </java>
>
> I get the following errors:
>
> compile-gwt:
>      [java] Compiling module com.tyndalehouse.step.web.stepwebapp
>      [java]    Resolving
> com.tyndalehouse.step.web.client.gin.StepInjector
>      [java]       Found type
> 'com.tyndalehouse.step.web.client.gin.StepInjector'
>      [java]          [ERROR] Annotation error: cannot resolve
> com.tyndalehouse.step.web.client.gin.StepClientModule
>      [java] java.lang.ClassNotFoundException:
> com.tyndalehouse.step.web.client.gin.StepClientModule
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>      [java]     at java.security.AccessController.doPrivileged(Native
> Method)
>      [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:
> 188)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>      [java]     at sun.misc.Launcher$AppClassLoader.loadClass
> (Launcher.java:301)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>      [java]     at java.lang.ClassLoader.loadClassInternal
> (ClassLoader.java:320)
>      [java]     at java.lang.Class.forName0(Native Method)
>      [java]     at java.lang.Class.forName(Class.java:247)
>      [java]     at
> com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue
> (TypeOracleMediator.java:666)
>      [java]     at
> com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue
> (TypeOracleMediator.java:605)
>      [java]     at
> com.google.gwt.dev.javac.TypeOracleMediator.createAnnotation
> (TypeOracleMediator.java:399)
>      [java]     at
> com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation
> (TypeOracleMediator.java:568)
>      [java]     at
> com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations
> (TypeOracleMediator.java:583)
>      [java]     at
> com.google.gwt.dev.javac.TypeOracleMediator.resolveClass
> (TypeOracleMediator.java:724)
>      [java]     at com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits
> (TypeOracleMediator.java:353)
>      [java]     at
> com.google.gwt.dev.javac.CompilationState.assimilateUnits
> (CompilationState.java:135)
>      [java]     at com.google.gwt.dev.javac.CompilationState.<init>
> (CompilationState.java:79)
>      [java]     at
> com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom
> (CompilationStateBuilder.java:284)
>      [java]     at
> com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom
> (CompilationStateBuilder.java:181)
>      [java]     at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
> (ModuleDef.java:280)
>      [java]     at com.google.gwt.dev.Precompile.precompile
> (Precompile.java:502)
>      [java]     at com.google.gwt.dev.Precompile.precompile
> (Precompile.java:414)
>      [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:201)
>      [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
>      [java]     at com.google.gwt.dev.CompileTaskRunner.doRun
> (CompileTaskRunner.java:87)
>      [java]     at
> com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
> (CompileTaskRunner.java:81)
>      [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:159)
>      [java]          [ERROR] Annotation error: expected class
> java.lang.Class, got null
>      [java]    Scanning for additional dependencies: file:/D:/STEPSVN/
> StepWebApp/src/main/java/com/tyndalehouse/step/web/client/
> StepEntryPoint.java
>      [java]       Computing all possible rebind results for
> 'com.tyndalehouse.step.web.client.gin.StepInjector'
>      [java]          Rebinding
> com.tyndalehouse.step.web.client.gin.StepInjector
>      [java]             Invoking
> com.google.gwt.dev.javac.standardgeneratorcont...@1b7e7e1
>      [java]                [ERROR] Generator
> 'com.google.gwt.inject.rebind.GinjectorGenerator' threw threw an
> exception while rebinding
> 'com.tyndalehouse.step.web.client.gin.StepInjector'
>      [java] com.google.inject.ProvisionException: Guice provision
> errors:
>      [java] 1) Error creating key for class
> com.tyndalehouse.step.web.client.presenter.AppPresenter
>      [java] 1 error
>      [java]     at com.google.gwt.inject.rebind.util.KeyUtil.getKey
> (KeyUtil.java:144)
>      [java]     at com.google.gwt.inject.rebind.util.KeyUtil.getKey
> (KeyUtil.java:68)
>      [java]     at
> com.google.gwt.inject.rebind.BindingsProcessor.addUnresolvedEntriesForInjectorInterface
> (BindingsProcessor.java:308)
>      [java]     at com.google.gwt.inject.rebind.BindingsProcessor.process
> (BindingsProcessor.java:196)
>      [java]     at
> com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate
> (GinjectorGeneratorImpl.java:76)
>      [java]     at
> com.google.gwt.inject.rebind.GinjectorGenerator.generate
> (GinjectorGenerator.java:47)
>      [java]     at
> com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator
> (StandardGeneratorContext.java:418)
>      [java]     at com.google.gwt.dev.cfg.RuleGenerateWith.realize
> (RuleGenerateWith.java:38)
>      [java]     at com.google.gwt.dev.shell.StandardRebindOracle
> $Rebinder.tryRebind(StandardRebindOracle.java:108)
>      [java]     at com.google.gwt.dev.shell.StandardRebindOracle
> $Rebinder.rebind(StandardRebindOracle.java:54)
>      [java]     at com.google.gwt.dev.shell.StandardRebindOracle.rebind
> (StandardRebindOracle.java:154)
>      [java]     at com.google.gwt.dev.shell.StandardRebindOracle.rebind
> (StandardRebindOracle.java:143)
>      [java]     at com.google.gwt.dev.Precompile
> $DistillerRebindPermutationOracle.getAllPossibleRebindAnswers
> (Precompile.java:317)
>      [java]     at
> com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds
> (WebModeCompilerFrontEnd.java:95)
>      [java]     at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
> $CompilerImpl.process(AbstractCompiler.java:200)
>      [java]     at org.eclipse.jdt.internal.compiler.Compiler.compile
> (Compiler.java:444)
>      [java]     at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
> $CompilerImpl.compile(AbstractCompiler.java:123)
>      [java]     at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
> $CompilerImpl.compile(AbstractCompiler.java:234)
>      [java]     at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
> $CompilerImpl.access$200(AbstractCompiler.java:109)
>      [java]     at com.google.gwt.dev.jdt.AbstractCompiler.compile
> (AbstractCompiler.java:522)
>      [java]     at
> com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations
> (BasicWebModeCompiler.java:112)
>      [java]     at
> com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations
> (WebModeCompilerFrontEnd.java:47)
>      [java]     at
> com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile
> (JavaToJavaScriptCompiler.java:421)
>      [java]     at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile
> (JavaScriptCompiler.java:32)
>      [java]     at com.google.gwt.dev.Precompile.precompile
> (Precompile.java:522)
>      [java]     at com.google.gwt.dev.Precompile.precompile
> (Precompile.java:414)
>      [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:201)
>      [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
>      [java]     at com.google.gwt.dev.CompileTaskRunner.doRun
> (CompileTaskRunner.java:87)
>      [java]     at
> com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
> (CompileTaskRunner.java:81)
>      [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:159)
>      [java] Caused by: java.lang.ClassNotFoundException:
> com.tyndalehouse.step.web.client.presenter.AppPresenter
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>      [java]     at java.security.AccessController.doPrivileged(Native
> Method)
>      [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:
> 188)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>      [java]     at sun.misc.Launcher$AppClassLoader.loadClass
> (Launcher.java:301)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>      [java]     at java.lang.ClassLoader.loadClassInternal
> (ClassLoader.java:320)
>      [java]     at java.lang.Class.forName0(Native Method)
>      [java]     at java.lang.Class.forName(Class.java:247)
>      [java]     at com.google.gwt.inject.rebind.util.KeyUtil.loadClass
> (KeyUtil.java:330)
>      [java]     at
> com.google.gwt.inject.rebind.util.KeyUtil.gwtTypeToJavaType
> (KeyUtil.java:318)
>      [java]     at com.google.gwt.inject.rebind.util.KeyUtil.getKey
> (KeyUtil.java:141)
>      [java]     ... 30 more
>      [java]    [ERROR] Errors in 'file:/D:/STEPSVN/StepWebApp/src/main/
> java/com/tyndalehouse/step/web/client/StepEntryPoint.java'
>      [java]       [ERROR] Line 10:  Failed to resolve
> 'com.tyndalehouse.step.web.client.gin.StepInjector' via deferred
> binding
>      [java]    Scanning for additional dependencies: jar:file:/D:/
> STEPSVN/StepWebApp/compiler_lib/gwt-user.jar!/com/google/gwt/core/
> client/impl/SchedulerImpl.java
>      [java]       [WARN] For the following type(s), generated source
> was never committed (did you forget to call commit()?)
>      [java]          [WARN]
> com.tyndalehouse.step.web.client.gin.StepInjectorImpl
>      [java]    Scanning for additional dependencies: jar:file:/D:/
> STEPSVN/StepWebApp/war/WEB-INF/lib/gwt-dispatch-1.0.0-SNAPSHOT.jar!/
> net/customware/gwt/dispatch/client/DefaultDispatchAsync.java
>      [java]       Adding '58' new generated units
>      [java]          Validating newly compiled units
>      [java]             [WARN] Warnings in 'generated://
> 9F62BD2E1B4734FBB562DD02960D3604/net/customware/gwt/dispatch/client/
> service/DispatchService_TypeSerializer.java'
>      [java]                [WARN] Line 48: Referencing deprecated
> class 'com.google.gwt.user.client.rpc.SerializableException'
>      [java]                See snapshot: C:
> \DOCUME~1\CJBURR~1\LOCALS~1\Temp
> \DispatchService_TypeSerializer3601886380033077971.java
>      [java]    [ERROR] Cannot proceed due to previous errors

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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