never mind...

I moved my locator class from client package to server and therethere,
it worked.

sry for spam

On Wed, Mar 14, 2012 at 11:16 AM, kayser <[email protected]> wrote:
> Hi,
>
> I followed an example in this list on how to use a spring bean via
> ServiceLocator. Everything works great using mvn gwt:debug but when I
> try to package everything using mvn package I get compiler errors.
> Here is my code:
>
> import javax.servlet.http.HttpServletRequest;
> import org.springframework.context.ApplicationContext;
> import
> org.springframework.web.context.support.WebApplicationContextUtils;
>
> import
> com.google.web.bindery.requestfactory.server.RequestFactoryServlet;
> import com.google.web.bindery.requestfactory.shared.ServiceLocator;
>
>
> public class EndpointConnectorServiceLocator implements ServiceLocator
> {
>
>        /* (non-Javadoc)
>         * @see
> com.google.web.bindery.requestfactory.shared.ServiceLocator#getInstance(java.lang.Class)
>         */
>        @Override
>        public Object getInstance(Class<?> clazz) {
>
>                HttpServletRequest request =
> RequestFactoryServlet.getThreadLocalRequest();
>                ApplicationContext context =
> WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
>                return context.getBean("endpointConnectorService");
>        }
>
> }
>
>
>
> and the mvn message when hitting the error:
>
>
> [INFO]    [ERROR] An internal compiler exception occurred
> [INFO] com.google.gwt.dev.jjs.InternalCompilerException: Failed to get
> JNode
> [INFO]  at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140)
> [INFO]  at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71)
> [INFO]  at
> com.google.gwt.dev.jjs.impl.BuildTypeMap.getType(BuildTypeMap.java:
> 730)
> [INFO]  at com.google.gwt.dev.jjs.impl.BuildTypeMap.access
> $000(BuildTypeMap.java:99)
> [INFO]  at com.google.gwt.dev.jjs.impl.BuildTypeMap
> $BuildDeclMapVisitor.visit(BuildTypeMap.java:195)
> [INFO]  at
> org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.traverse(LocalDeclaration.java:
> 237)
> [INFO]  at
> org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:
> 239)
> [INFO]  at
> org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:
> 1239)
> [INFO]  at
> org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:
> 687)
> [INFO]  at
> com.google.gwt.dev.jjs.impl.BuildTypeMap.createPeersForNonTypeDecls(BuildTypeMap.java:
> 637)
> [INFO]  at
> com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:514)
> [INFO]  at
> com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:523)
> [INFO]  at
> com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:
> 599)
> [INFO]  at
> com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:
> 33)
> [INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:
> 284)
> [INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:
> 233)
> [INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:
> 145)
> [INFO]  at com.google.gwt.dev.Compiler.run(Compiler.java:232)
> [INFO]  at com.google.gwt.dev.Compiler.run(Compiler.java:198)
> [INFO]  at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
> [INFO]  at
> com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
> [INFO]  at
> com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
> 82)
> [INFO]  at com.google.gwt.dev.Compiler.main(Compiler.java:177)
> [INFO]       [ERROR] <no source info>: public interface
> javax.servlet.http.HttpServletRequest
> [INFO]  extends java.lang.Object
> [INFO]  implements : Unresolved type javax.servlet.ServletRequest
> [INFO] /*   fields   */
> [INFO] public static final [unresolved] java.lang.String BASIC_AUTH
> [INFO] public static final [unresolved] java.lang.String FORM_AUTH
> [INFO] public static final [unresolved] java.lang.String
> CLIENT_CERT_AUTH
> [INFO] public static final [unresolved] java.lang.String DIGEST_AUTH
> [INFO] /*   methods   */
> [INFO] [unresolved] public abstract java.lang.String getAuthType()
> [INFO] [unresolved] public abstract java.lang.String getContextPath()
> [INFO] [unresolved] public abstract Unresolved type
> javax.servlet.http.Cookie[] getCookies()
> [INFO] [unresolved] public abstract long
> getDateHeader(java.lang.String)
> [INFO] [unresolved] public abstract java.lang.String
> getHeader(java.lang.String)
> [INFO] [unresolved] public abstract Enumeration#RAW getHeaderNames()
> [INFO] [unresolved] public abstract Enumeration#RAW
> getHeaders(java.lang.String)
> [INFO] [unresolved] public abstract int
> getIntHeader(java.lang.String)
> [INFO] [unresolved] public abstract java.lang.String getMethod()
> [INFO] [unresolved] public abstract java.lang.String getPathInfo()
> [INFO] [unresolved] public abstract java.lang.String
> getPathTranslated()
> [INFO] [unresolved] public abstract java.lang.String getQueryString()
> [INFO] [unresolved] public abstract java.lang.String getRemoteUser()
> [INFO] [unresolved] public abstract java.lang.String getRequestURI()
> [INFO] [unresolved] public abstract java.lang.StringBuffer
> getRequestURL()
> [INFO] [unresolved] public abstract java.lang.String
> getRequestedSessionId()
> [INFO] [unresolved] public abstract java.lang.String getServletPath()
> [INFO] public abstract javax.servlet.http.HttpSession getSession()
> [INFO] [unresolved] public abstract Unresolved type
> javax.servlet.http.HttpSession getSession(boolean)
> [INFO] [unresolved] public abstract Unresolved type
> java.security.Principal getUserPrincipal()
> [INFO] [unresolved] public abstract boolean
> isRequestedSessionIdFromCookie()
> [INFO] [unresolved] public abstract boolean
> isRequestedSessionIdFromURL()
> [INFO] [unresolved] public abstract boolean
> isRequestedSessionIdFromUrl()
> [INFO] [unresolved] public abstract boolean
> isRequestedSessionIdValid()
> [INFO] [unresolved] public abstract boolean
> isUserInRole(java.lang.String)
> [INFO]
> [INFO]
> [INFO]
> [INFO]
> org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
> [INFO]       [ERROR] at EndpointConnectorServiceLocator.java(41):
> HttpServletRequest request =
> RequestFactoryServlet.getThreadLocalRequest();
> [INFO]          org.eclipse.jdt.internal.compiler.ast.LocalDeclaration
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
>
>
> Does anybody have an idea how to solve this issue?
>
> Cheers
>
> Kay

-- 
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