Error when using serve modules without publishing in eclipse - eclipse

I am getting this error when "serve modules without publishing" is checked in the application server (Tomcat) inside eclipse
When its not checked - the application is running with no issue,
The problem is that every change I make eclipse will deploy and restart tomcat,
Do I need to do anything else besides checking "serve modules without publishing"?
HTTP Status 500 - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
type Exception report
message The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:278)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:76)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:242)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:124)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:411)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:469)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1430)
org.apache.jasper.compiler.Parser.parse(Parser.java:139)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.xerox.infrastructure.filters.LoginInterceptor.doFilter(LoginInterceptor.java:58)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.15 logs.

Related

gwt server not found after deployment

I've a strange problem. I created the plain vanilla Greetings example with the webAppCreator of gwt. That means I created a project called Test and after that I did not modify it in any way. Then I created a war file with "ant war" and deployed this on my local tomcat 7. The server starts fine and the Grettings page is loaded properly. But, when clicking on the Send button I get the following error:
There a no error messages in the tomcat logs. However in the development mode the stuff works fine. I'm using gwt 2.5. Any idea what could cause this problem?
Edit: Maybee this gives some further insights:
I found a stack trace:
java.lang.UnsupportedClassVersionError: com/server/GreetingServiceImpl : Unsupported major.minor version 51.0 (unable to load class com.server.GreetingServiceImpl)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2908)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
java.lang.Thread.run(Thread.java:680)
But what does it mean?
Okay, I found the problem.
The error UnsupportedClassVersionError means that I tried to run a compiled java file with an older runtime, i.e. I compiled the servlets with java 7 and tried to run them with java 6.
I repaired this by setting the correct JAVA_HOME path to my .bash_profiles file like this
export JAVA_HOME=/path/to/java_7/Home
That was it, now everything runs fine. Thanks for reading anyway.

error when accessing worklight server deployed on tomcat

I deploy the war file and adapter file to the tomcat,everything is fine,but when I try access the worklight server,the request is
[http://10.30.3.11:8080/nantian/apps/services/api/attendance/android/query]
and the logcat appear this error
[http://10.30.3.11:8080/nantian/apps/services/api/attendance/android/query]failure. state: 500, response:
The server was unable to process the request from the application. Please try again later.[http://10.30.3.11:8080/nantian/apps/services/api/attendance/android/query]Cannot read property 'errors' of undefined
and the tomcat appear the following error:
java.lang.RuntimeException: Unique constrain: found 2 beans implementing inteface com.worklight.server.report.api.GadgetReportsService (in 4 spring application contexts).
at com.worklight.server.bundle.api.ServiceManager.getServiceConsumer(ServiceManager.java:133)
at com.worklight.core.bundle.CoreServiceManager.getGadgetsReportService(CoreServiceManager.java:47)
at com.worklight.core.auth.impl.AuthenticationContext.logLoginActivity(AuthenticationContext.java:337)
at com.worklight.core.auth.impl.AuthenticationContext.checkAuthentication(AuthenticationContext.java:495)
at com.worklight.core.auth.impl.AuthenticationContext.processRealms(AuthenticationContext.java:396)
at com.worklight.core.auth.impl.AuthenticationContext.pushCurrentResource(AuthenticationContext.java:373)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:63)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
I am sure that I just deploy one war file to the tomcat,but I have try deploying the war file again and again to test the app,Of course,undeploy the file before I deploy it.and the worklight server is 5.0.5,mysql 5.1.47,tomcat 7.0.37.Any help?thanks in advance.
Is this an installation using IBM Installation Mananger?
If you've used it to install Worklight on Tomcat then it has also deployed a worklight.war file during installation.
Make sure you undeploy this .war file via the Tomcat Manager view (typically http://localhost:8080/manager). I would also go to the file system and make sure no other files remain (the .war file, worklight.home, ...).
Next, deploy your own .war file (probably nantian.war or alike).

Exception java.lang.NoClassDefFoundError in Dynamic Web Application, Eclipse, JSF [duplicate]

This question already has answers here:
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
(2 answers)
Closed 7 years ago.
when I'm running my appication everything is ok to moment when I press the button and I'm redirecting to another xhtml page. Then eclipse console until I stop server display:
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/ChatAzure] threw exception [javax/servlet/jsp/jstl/core/Config] with root cause
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:345)
at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
I use:
eclipse, jsf2-1-7, jstl-1.2.jar, Tomcat v0.7.
I don't know what's wrong, I need help.
The mentioned class is part of JSTL. This is normally already provided by a full fledged Java EE container, but not in Tomcat as being a barebones JSP/Servlet container. You'd need to supply JSTL yourself along with the web application. It has ultimately to be placed in the webapp's runtime classpath.
You correctly mentioned jstl-1.2.jar (I assume that it's exactly the one as you could find in our JSTL wiki page), but this problem indicates that it has apparently not been placed at the right place. You need to place it in /WEB-INF/lib folder of the web project. This folder is covered by webapp's default runtime classpath. Nothing more needs to be done. If you have ever fiddled in the project's Build Path properties in an attempt to solve it, you should undo all those attempts.
Unrelated to the concrete problem: why are you still using legacy JSP? It has been deprecated and succeeded by Facelets (XHTML) since JSF 2.0. Make sure that you're reading up to date JSF 2.x resources and not JSF 1.x ones while learning JSF.

unable to deploy struts2 war on tomcat7

I feel really stupid right now but I've been struggling all day long and I don't have a clue, some help would be kindly appreciated :)
I've developped a struts2 webapp which works fine when I run it through eclipse (indigo sr2) related to my servelt server apache tomcat 7.0.27 installed on my own computer. All I do is : right click on the folder of my webapp --> run as --> run on server. Then it runs nicely either in eclipse browser, or in other browser (chrome, firefox) when I copy and path the url adress of my servlets.
Now all I'd like to do is make it run without eclipse. So I exported my webapp in a .war file (right click on the webapp folder --> export --> War file), and tried to deploy it using the app manager tomcat web interface : all it asked me to do was to browse for the war file through my computer and to click on the deploy button. Easy going so far !
Then my webapp appears in the applications tab of the app manager interface, but when I click on the "run" button, all I get is this message :
Failure : application for the context path /MMSProject could not start
(the original message is in French, I did not find how to change tomcat7 language, so this might not be the exact message you'd have in english, I hope this translation is close enough. MMSProject is the name of my webapp).
Therefore, I downloaded some struts2 webapp examples on the struts2 website and tried to deploy struts2-blank on tomcat7 using the same process. This one works perfectly fine : I can run it from tomcat app manager. So I guess my problem comes from my own war file and not from tomcat itself, but since it's generated by eclipse it seems weird to me that this part of the process could go wrong.
And so I'm stuck with that. Would you guys know :
How can I get more information about what's going wrong (I looked in tomcat logs but did not find any error message). This could help me a lot to solve the problem !
Any reason for what my webapp would run from eclipse but not directly from tomcat ?
How can I make it run from tomcat ? :)
Thank you very much in advance for any help ! I'm kind of desperate right now, did not think deployment would be such a pain !
EDIT :
I've double checked tomcat's log and actually found this in catalina.[date].log:
Grave: Error filterStart
juin 21, 2012 1:48:42 PM org.apache.catalina.core.StandardContext startInternal
Severe: Context [/MMSproject] startup failed due to previous errors
juin 21, 2012 1:48:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Grave: The web application [/MMSproject] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#2de3bcb5]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#427a269c]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
juin 21, 2012 1:48:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Grave: The web application [/MMSproject] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#617ceddc]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#50e43884]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
and this in localhost.[date].localhost :
juin 21, 2012 1:48:42 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NullPointerException
at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:191)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:747)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:222)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ok, so I found the anwser and wanted to post it in order to help someone who would have te same issue !
It's a tiny detail but it may save you a lot of struggling and praying time once you know it: before deploying don't forget to switch the struts devMode to false (in struts.xml file) if you had decided to use it at the begining of you development (ie : maybe some few hard coding weeks ago !).
So basically this is what you wanna have in struts.xml :
<constant name="struts.devMode" value="false" />
instead of :
<constant name="struts.devMode" value="true" />
Good luck everybody !

Problem running a GWT 2.4 App on Tomcat

I have a problem running my gwt2.4rc1 application in a tomcat. The problem occurs when I try to make a requestfactory call. Then I get the exception at the bottom.
When I run GWT in development mode everything works fine. The gwt-dev. jar is in the lib folder of my webapp. I am using maven for dependency management. Could there be a problem with my configuration? I already had the error with gwt2.4 beta. If there are any other information required to solve this problem I am glad to provide them.
Regards,
Arne
SEVERE: Unexpected error
com.google.web.bindery.requestfactory.server.UnexpectedException: Unexpected checked exception
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216)
at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:242)
at com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveRequestFactory(ServiceLayerCache.java:198)
at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:201)
at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:125)
at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:261)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:175)
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:162)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NoClassDefFoundError: com/google/gwt/dev/util/StringKey
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2804)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1144)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1639)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateProxy(RequestFactoryInterfaceValidator.java:1594)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateEntityProxy(RequestFactoryInterfaceValidator.java:828)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.maybeCheckProxyType(RequestFactoryInterfaceValidator.java:1540)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.getDomainType(RequestFactoryInterfaceValidator.java:1374)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.createDomainMethod(RequestFactoryInterfaceValidator.java:1192)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.checkClientMethodInDomain(RequestFactoryInterfaceValidator.java:1079)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateRequestContext(RequestFactoryInterfaceValidator.java:909)
at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateRequestFactory(RequestFactoryInterfaceValidator.java:964)
at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveRequestFactory(ResolverServiceLayer.java:187)
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:233)
... 32 more
Caused by: java.lang.ClassNotFoundException: com.google.gwt.dev.util.StringKey
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
... 57 more
There's a fix for this on its way over from RC to trunk. In the mean time, remove gwt-servlet from your dependencies and use requestfactory-servlet.jar instead.
I've always understood gwt-dev.jar to be the compiler and other development tools. If you believe that, there should be no dependency on it from your own code, and there is no reason for it to be in the WEB-INF/lib folder of your war file.
I see from this question that at least one other contributer to SO feels the same way, but the belief doesn't appear to be universal.
I'll update this answer if I can find anything one way or the other in the GWT docs.
Update:
The closest thing I could find was Organize Projects which shows gwt-dev as a referenced library not present in WEB-INF/lib. I can't find anything official that says either that you can or can't deploy it to your web server. In an old book GWT In Action (Hanson, 2007), page 551 says
You should never deploy the gwt-user.jar and gwt-dev.jar files to your server,
because they will interfere with your server; these JAR files contain their own
Tomcat server code, which is used when you're testing in hosted mode.
This is clearly out of date, since hosted mode isn't called that anymore and uses an embedded Jetty server rather than Tomcat, but that's the basis for my belief.
Ok I made it working :)
I used the gwt version compiled from here:
http://code.google.com/p/google-web-toolkit/source/browse/#svn%2Freleases%2F2.4
I did put gwt-servlet.jar and requestfactory-servlet.jar as dependencies in my project. The problem in the other thread occured because I used my own group-id for the compiled jars, so these were not used by gin and the gwt-maven-plugin. No everything works fine :)
Thanks for the help though!!