Toolkit productivity tools project

Sorry for the false alarm… I was misusing Google Guice and that was messing my views.

Thanx
Bruno

Hello Dmitri,

First of all thanks a lot for the work!
I’m new to Vaadin and looking to all the feature that I need for my web site and your add-on will help me a lot!

But I’m actually facing a difficulty to use the PDFViewer feature, I don’t know if it’s the good place to post (is there a dedicated place for problem using your add on?)

I’m using the last Vaadin built 6.6.2, I add tpt-core, icepdf-core, icepdf-pro, and icepdf-pro-intl in my library and buildpath.
And my code is the following :


		DocumentViewer viewer = new DocumentViewer();
		viewer.loadDocument ( new PdfDocument ( new File ( myFilePath) ) );		
		System.out.println("Pages pdf : " + viewer.getPagesCount());		

		VerticalLayout myTabCoursPDF = new VerticalLayout();
		myTabCoursPDF.addComponent(viewer);

		tabsheet.addTab(myTabCoursPDF);

And this tabsheet is added in my mainWindow.

So the following code allow me to show the first page of the PDF, but when I try to scroll down on other pages I got an error :


java.lang.NullPointerException
	at com.vaadin.terminal.StreamResource.<init>(StreamResource.java:87)
	at eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer.generateCell(SinglePageDocumentRenderer.java:116)
	at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1572)
	at com.vaadin.ui.Table.enableContentRefreshing(Table.java:2313)
	at com.vaadin.ui.Table.changeVariables(Table.java:2159)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
18 juin 2011 10:52:44 com.vaadin.Application terminalError
GRAVE: Terminal error:
java.lang.NullPointerException
	at com.vaadin.terminal.StreamResource.<init>(StreamResource.java:87)
	at eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer.generateCell(SinglePageDocumentRenderer.java:116)
	at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1572)
	at com.vaadin.ui.Table.enableContentRefreshing(Table.java:2313)
	at com.vaadin.ui.Table.changeVariables(Table.java:2159)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
18 juin 2011 10:52:44 com.vaadin.Application terminalError
GRAVE: Terminal error:
java.lang.ArrayIndexOutOfBoundsException: 1
	at com.vaadin.ui.Table.paintContent(Table.java:2496)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:954)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:841)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:767)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Am I missing a thing in my dev ?

Thank’s in advance for your time helping

Audric

Hi Dimitri, thank you for the plug in…
however I found a problem in the captcha widget, probably due to JPEGImageEncoder that is incompatible with openJDK 6.

I replaced in TPTCaptcha.java

ByteArrayOutputStream bos = new ByteArrayOutputStream ();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder ( bos );
encoder.encode ( image );

with

ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(image, "jpg",bos);

and everything seems to work.

Antonio

Hi Antonio,
thanks for the bug ! Im trying to make a release of v2.0 of TPT, so will add this fix as well. Unfortunately takes longer than expected due to a lot of main job projects this summer.

Hi Audric,
this is very strange. It seems PDF file was opened as you was able to see the first page. Is your PDF ok, maybe icepdf stucks with it ?
Anyways, could you try a newer version of pdf viewer - it was removed from upcoming tpt v2.0 to a separate stand-alone project, will be released as add-on
in a couple of days or so, but for now you can just get the sources -
http://code.google.com/p/tdv/
- will this work better for your pdf or not ?

Scott, sorry for late response, it seems my account was somehow unsubscribed from this topic. Subscribed it back again.
Do you still having problems with this issue ? If so, could you please show a full stacktrace of your NPE ?

Thanks,
Dmitri

Can TPT support multiple tabs in a browser somehow? I use the ThreadLocal pattern which comes with TPT so I don’t know how to combine it with the wiki article:
Support Multiple Tabs

Any ideas?

Hi !

It seems nothing prevents you to use the mentioned technique for multi-tab support with TPT. You still have the MyApplication class which just extends TPTApplication instead of Application, so feel free to override getWindow() there as described and do the other stuff as well. Or you just tried and there were problems ?

P.S Just did not use multi-tab support yet in any of my app, so never tried this technique with TPT, but of there are any problems with this, just let me know, will be happy to fix.

P.S.2. It seems, something broken with the forum or liferay, still not getting any topic updates Im subscribed to…

This is a bug in Liferay, with subscriptions getting deleted in some situations - see
this thread
. It looks like it has just been fixed in the latest Liferay builds, but I am not sure when we will have such a version in use.

The problem I am facing is to get access to the actual window for each session (in this case each browser tab). Deep in the application I call the famous TPTApplication.getCurrentApplication()
Then I need to access the current visible window

[code]
public Window getWindow(String name) {

}

/* anywhere in the application i would like to get
the window of the current visible browser tab */
((MyTPTApplication)MyTPTApplication.getCurrentApplication()).getWindow(xxx)

[/code]How would I get the name for the current window from anywhere in the application?

I also implemented the ThreadLocal pattern in the main window class.

public static class MyWindow extends Window implements ParameterHandler, HttpServletRequestListener {
		
	private static ThreadLocal<MyWindow> threadLocal = new ThreadLocal<MyWindow>(); 
	
	....

}

So to get there I need to through following steps or am I missing something?

getCurrentApplication → getWindow by name → getInstance of MyWindow

Thanks in advance!

Hi ,

i get almost the same Exception after just simply instancing the TPTCatpcha Element like this:

TPTCaptcha tptCaptcha = new TPTCaptcha();

java.lang.NullPointerException
com.vaadin.terminal.StreamResource.(StreamResource.java:87)
eu.livotov.tpt.gui.widgets.TPTCaptcha.refreshCaptchaImageSource(TPTCaptcha.java:179)
eu.livotov.tpt.gui.widgets.TPTCaptcha.setCaptchaCode(TPTCaptcha.java:95)
eu.livotov.tpt.gui.widgets.TPTCaptcha.setCaptchaCode(TPTCaptcha.java:83)
eu.livotov.tpt.gui.widgets.TPTCaptcha.generateCaptchaCode(TPTCaptcha.java:129)
eu.livotov.tpt.gui.widgets.TPTCaptcha.(TPTCaptcha.java:62)
eu.livotov.tpt.gui.widgets.TPTCaptcha.(TPTCaptcha.java:72)
com.example.lieferantenportal.LieferantenportalApplication.test(LieferantenportalApplication.java:62)
com.example.lieferantenportal.LieferantenportalApplication.init(LieferantenportalApplication.java:51)
com.vaadin.Application.start(Application.java:554)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.startApplication(AbstractApplicationServlet.java:1208)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:484)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

Any idea whats causing that?

thanks

steff

I see that you have moved the PDF viewer to another project. There are still lots of references to it in the current project. The handbook still has it in table of contents, even though the description has been removed. And the project page still talks about a built in PDF viewer.

I really need to make use of the viewer. Where can I find the new PDF viewer project?

Thanks!!

David

When I’m adding a page which extends a Panel , I don’t see the scroll bar , why is that?

public class WelcomeView extends Panel implements TPTView  {
controller.addView ( "WelcomePage", new WelcomeView()  );

UPDATE :

another question :

how to get HttpServletRequest request,HttpServletResponse response with

@Override
public void transactionStart ( Application application, Object o )
{
super.transactionStart ( application, o );
// your code goes here
}
@Override
public void transactionEnd ( Application application, Object o )
{
super.transactionEnd ( application, o );
// your code goes here
}

Thanks

I too am getting the exact same error. I recently moved to Vaadin 6.6.6 and am wondering if that is the reason. TPT version is 1.2.

Steffan, were you able to find any resolution?

what login and password for http://demo.stor-m.ru/tpt-demo ?

Imran,
You have to override the setCaptchaCode method from TPTCaptcha and set the application value with the application of your main window,
if not, your application will always throw null pointer exception, because it always call TPTApplication which never used in your main window.

The solution is like this:

@SuppressWarnings(“serial”)
public class CaptchaLayout extends VerticalLayout {
private TPTCaptcha captcha;
Application application;

public CaptchaLayout(Window main) {
   application = main.getApplication();
   captcha = new TPTCaptcha() {
		
       @Override
       public void setCaptchaCode ( String code ) {         
          setCaptchaCode ( code, application);     
       }  
		
};

}

Thanks.

Imran,
You have to override the setCaptchaCode method from TPTCaptcha and set the application value with the application of your main window,
if not, your application will always throw null pointer exception, because it always call TPTApplication which never used in your main window.

The solution is like this:

@SuppressWarnings(“serial”)
public class CaptchaLayout extends VerticalLayout {
private TPTCaptcha captcha;
Application application;

public CaptchaLayout(Window main) {
   application = main.getApplication();
   captcha = new TPTCaptcha() {
		
       @Override
       public void setCaptchaCode ( String code ) {         
          setCaptchaCode ( code, application);     
       }  
		
};

}

Thanks.

Hi,

I have same problem as Imran.

I did what you said:


HorizontalLayout hl = new HorizontalLayout();
				ourLayout.addComponent(hl, 0,3,1,3);
				
				captcha = new TPTCaptcha() {

					private static final long serialVersionUID = 1L;

					@Override
					public void setCaptchaCode(String code) {
						super.setCaptchaCode(code, getWindow().getApplication());
					}
				};
				hl.addComponent(captcha); 
				
				Button changeCode = new Button("new captcha");
				changeCode.addListener(new Button.ClickListener() {
					
					private static final long serialVersionUID = 1L;

					@Override
					public void buttonClick(ClickEvent event) {
						captcha.generateCaptchaCode(6);						
					}
				});
				hl.addComponent(changeCode);

or am I doing something wrong?

Thanks for reply

hi
how u solved that problem Audric because i have a same problem now a days and i want to show PDF from my hard disk must with DocumentViewer(because it is in the image format and so my client can’t print PDF):

My code is like this:

       [code]

DocumentViewer viewer = new DocumentViewer();
addComponent ( viewer );

        java.io.File pdfFile = new java.io.File ( "C:/handbook.pdf" );
        viewer.loadDocument( new PdfDocument( pdfFile ) );
        addComponent(viewer);

[/code]

and got the following error:

May 29, 2012 6:32:54 PM org.icepdf.core.pobjects.Catalog <clinit>
INFO: ICEsoft ICEpdf Core 4.0.0 
May 29, 2012 6:32:58 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.AbstractMethodError: eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer.generateCell(Lcom/vaadin/ui/Table;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:532)
    at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
    at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
    at com.vaadin.ui.Button.fireClick(Button.java:550)
    at com.vaadin.ui.Button.changeVariables(Button.java:217)
    at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1445)
    at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1393)
    at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1312)
    at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:763)
    at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
    at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
    at org.eclipse.jetty.server.Server.handle(Server.java:346)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
    at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:531)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.AbstractMethodError: eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer.generateCell(Lcom/vaadin/ui/Table;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    at com.vaadin.ui.Table.getVisibleCellsNoCache(Table.java:1691)
    at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1479)
    at com.vaadin.ui.Table.attach(Table.java:3341)
    at com.vaadin.ui.AbstractComponentContainer.attach(AbstractComponentContainer.java:97)
    at com.vaadin.ui.AbstractComponentContainer.attach(AbstractComponentContainer.java:97)
    at com.vaadin.ui.AbstractComponentContainer.attach(AbstractComponentContainer.java:97)
    at com.vaadin.ui.AbstractComponentContainer.attach(AbstractComponentContainer.java:97)
    at com.vaadin.ui.AbstractComponentContainer.attach(AbstractComponentContainer.java:97)
    at com.vaadin.ui.AbstractComponentContainer.attach(AbstractComponentContainer.java:97)
    at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:560)
    at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211)
    at com.vaadin.ui.AbstractOrderedLayout.addComponent(AbstractOrderedLayout.java:70)
    at eu.livotov.tpt.gui.widgets.TPTMultiView.switchView(TPTMultiView.java:298)
    at com.complete.raspberry.webui.RaspberryWindow.setUiForCurrentUser(RaspberryWindow.java:89)
    at com.complete.raspberry.webui.RaspberryWindow.applicationUserChanged(RaspberryWindow.java:97)
    at com.vaadin.Application.setUser(Application.java:483)
    at com.complete.raspberry.webui.RaspberryApplication.login(RaspberryApplication.java:39)
    at com.complete.raspberry.webui.LoginView$1.buttonClick(LoginView.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:512)
    ... 32 more
May 29, 2012 6:32:59 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
java.lang.AbstractMethodError: eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer.generateCell(Lcom/vaadin/ui/Table;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    at com.vaadin.ui.Table.getVisibleCellsNoCache(Table.java:1691)
    at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1479)
    at com.vaadin.ui.Table.getVisibleCells(Table.java:3189)
    at com.vaadin.ui.Table.paintContent(Table.java:2483)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.ui.TabSheet.paintContent(TabSheet.java:435)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
    at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
    at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:1040)
    at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:927)
    at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:794)
    at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
    at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
    at org.eclipse.jetty.server.Server.handle(Server.java:346)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
    at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:531)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
    at java.lang.Thread.run(Unknown Source)

Hello steff.

You should use TPTApplication in your main class instead of the normal Application of Vaadin. After change that, your captcha will work perfectly.

Regards

Saul.