I try to use Vaadin 7.0.3 with vaadin CDI 1.0.0 but I have an error when I try to show the application.
When a try to show my application UI, I get this error log :
WARNING: StandardWrapperValve[Vaadin Application Servlet]
: PWC1406: Servlet.service() for servlet Vaadin Application Servlet threw exception
java.lang.AbstractMethodError: com.vaadin.ui.UI.init(Lcom/vaadin/server/WrappedRequest;)V
at com.vaadin.ui.UI.doInit(UI.java:976)
at com.vaadin.server.VaadinSession.createUI(VaadinSession.java:1026)
at com.vaadin.server.AbstractCommunicationManager.handleBrowserDetailsRequest(AbstractCommunicationManager.java:2475)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:351)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:662)[i]
[/i][i]
[/i][i]
[/i]
My code is the following :
import com.vaadin.cdi.CDIUI;
import com.vaadin.ui.Window;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Notification;
import com.vaadin.ui.UI;
@CDIUI
public class UIRedirector extends UI {
@Inject
BogeyManager bogeyManager;
@Override
protected void init ( VaadinRequest request ) {
this.setSizeFull();
String fragment = this.getPage().getUriFragment();
if ( fragment != null ) {
if ( fragment.equals( "Bogey" ) ) {
Window window = new Window();
window.setContent( window );
window.setClosable( false );
this.addWindow( window );
window.setContent( this.bogeyManager );
}
}
else {
Notification.show( "Unable to find a fragment Url" );
}
}
}
and the web.xml is
<servlet>
<servlet-name>Vaadin Application Servlet</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<param-name>UI</param-name>
<param-value>com.goodyear.tlga.web.vaadin.UIRedirector</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Vaadin Application Servlet</servlet-name>
<url-pattern>/vaadin/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Vaadin Application Servlet</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
I can’t find anything about this error on the web. Can you help me ? Thx