Vaadin 6.3.2 + Scala 2.8 RC2 = java.lang.InstantiationException :(

Hello guys,

I need a little help.

I did three times everything that is wrote here
Dynamic Web Projects in Scala with Eclipse
and every time I’m getting:

2010-05-18 02:13:26 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Test3 Application threw exception
java.lang.InstantiationException: com.example.test3.Test3Application
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.vaadin.terminal.gwt.server.ApplicationServlet.getNewApplication(
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.createApplication(
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.findApplicationInstance(
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at Source)

All works good when start application is in Java. When I change it into Scala it generates this error.

I am using latest Vaadin (6.3.2) and Scala (Scala 2.8 RC2).
I am attaching screenshot.

Any suggestions how to solve this problem?
What can I do?


PS: I love Scala and I am using it for 2.5 years, do I understand correctly that I can create Vaadin web applications using Scala instead of Java?? Thanks;)

I solved this problem in this way.

In Application.init() I put only one line :

new ScalaStartup().init( this );

so as fast as I can I’m passing control to scala code.

Just for a start I can tell that Window, Label and Refresher (here how I configure it
) works good from scala.


Hi Arthur,

Can you please provide some code snippet with the solution that you found for this problem.
I’m currently struggling with the same issue and, unfortunately, I don’t quite understand what you did to solve it!


Is your Application a Scala object instead of a class? If so, no constructor is generated for it, and it can’t be instantiated with Class.newInstance(). If you change it from object to a class it should work.