Hello, Im a returning developer of vaadin, most of the projects I did was on Vaadin 6, now I have a new project and want to use Vaadin 7, but Im having a weird problem when I change the default main UI class to my UI class, I was following this document:
but when ever I modify the web.xml the default vaadin 7 application fail, the tomcat show me this error:
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]
.StandardHost[localhost]
.StandardContext
[/WebClock]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]
.StandardHost[localhost]
.StandardContext
[/WebClock]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
… 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [com.example.webclock.WebclockUI$Servlet]
and [com.heb.webclock.WebClockMain$Servlet]
are both mapped to the url-pattern
[/*] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2410)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2085)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2046)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2039)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2039)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2039)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1304)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 6 more
I think it has to do whit this part:
The servlets named [com.example.webclock.WebclockUI$Servlet]
and [com.heb.webclock.WebClockMain$Servlet]
are both mapped to the url-pattern
[/*] which is not permitted
The default UI class created by the Eclipse Vaadin 7 Plugin have this part:
@WebServlet(value = “/*”, asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = WebclockUI.class)
public static class Servlet extends VaadinServlet {
}
That go against the web.xml
WebClock com.vaadin.server.VaadinServlet Vaadin UI UI com.heb.webclock.WebClockMain WebClock /*The weird part is that I undo the changes to the web.xml, but the application gets corrupted and now I cant make it work againg, I was trying to find info about this but I couldnt find it, some body can help me to figure out how to restore the aplication, or what are the correct steps to change the UI class ?
Many thanks in advancce.