I’m trying to mirgate from Vaadin 6.8 zu Vaadin 7.0.0 rc1.
But I have a problem with the instantiation of Springbeans and get following error:
29.01.2013 12:43:50 ERROR WrapperStartStopAppMain - (ContextLoaderListener.java:68)
ContextLoaderListener.contextInitialized: web.xml config: instantContextBuildingEnabled=true, noWebConfigLocations=classpath*:com/ecg/beanconfigs/*_config.xml, state: noWebContextnull, webContext=null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'toDoMonitorApplication' defined in file [C:\Programme\Tomcat\apache-tomcat-5.5.29\webapps\invoice\WEB-INF\classes\com\ecg\beanconfigs\mts.invoice.ui_config.xml]
: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.ecg.mts.invoice.ui.dialog.todomonitor.view.ToDoMonitorApplication]
: Constructor threw exception; nested exception is java.lang.VerifyError: (class: com/vaadin/server/Page, method: getJavaScript signature: ()Lcom/vaadin/ui/JavaScript;) Incompatible argument to function
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
...
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.ecg.mts.invoice.ui.dialog.todomonitor.view.ToDoMonitorApplication]
: Constructor threw exception; nested exception is java.lang.VerifyError: (class: com/vaadin/server/Page, method: getJavaScript signature: ()Lcom/vaadin/ui/JavaScript;) Incompatible argument to function
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
... 46 more
Caused by: java.lang.VerifyError: (class: com/vaadin/server/Page, method: getJavaScript signature: ()Lcom/vaadin/ui/JavaScript;) Incompatible argument to function
at com.vaadin.ui.UI.<init>(UI.java:116)
at com.vaadin.ui.UI.<init>(UI.java:162)
at com.ecg.mts.invoice.ui.AbstractInvoiceApplication.<init>(AbstractInvoiceApplication.java:25)
at com.ecg.mts.invoice.ui.dialog.todomonitor.view.ToDoMonitorApplication.<init>(ToDoMonitorApplication.java:17)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 48 more
I have following conditions in these project: there are other Dialogs with GWT Version 2.04 in the Application and every Vaadin Dialog has its own Applicaion-Class (Vaadin 6.8) and all Vaadin Dialogs are in an own Modul
With Vaadin 6.8, I extends the Class AbstractApplicationServlet and override the methodes init, getAppliacationClass and getNewApplication and define each dialog application class as Servlet in the web.xml like that
[code]
…
ToDoMonitorApplication
com.ecg.mts.invoice.ui.InvoiceApplicationServlet
applicationBeanName
toDoMonitorApplication
Application widgetset
widgetset
com.ecg.mts.invoice.ui.client.mts_invoice_widgetset
<servlet-mapping>
<servlet-name>ToDoMonitorApplication</servlet-name>
<url-pattern>/toDoMonitor/*</url-pattern>
</servlet-mapping>
...
[/code]
Then I define Beans for all Dialogs in the core module
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
default-lazy-init="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="toDoMonitorApplication" class="com.ecg.mts.invoice.ui.dialog.todomonitor.view.ToDoMonitorApplication"
scope="session">
<property name="toDoMonitorDataAccess" ref="toDoMonitorDataAccess" />
</bean>
...
</beans>
and define Beans for all Dialogs in the Vaadin dialog module
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
">
<bean id="toDoMonitorApplication"
class="com.ecg.mts.invoice.ui.dialog.todomonitor.view.ToDoMonitorApplication"
scope="singleton">
<property name="toDoMonitorDataAccess" ref="toDoMonitorDataAccess" />
</bean>
...
</beans>
With Vaadin 6.8 everything works fine, but with Vaadin 7 i have not longer the possibility to override the methods getAppliacationClass and getNewApplication, because the class VaadinServlet does not contain these methods (the use of the LecaysXXX classes is no alternative for these project).
Thanks for Help