Can not load any images

Hi there Vaadin community,

first of all, thanks for this cool product and welcome to my first post :-D,

I’ve been trying to show images in my vaadin application since several days now. I tried it with the ClassResource, the ExternalResource and the FileResource (relative and full path), all without any luck. Class and file resource throw a null pointer exception. I finally copied the image to literally EVERY folder in the webapp, and also to /tmp trying to see, from where it may be fetched, but it still did not worked. ClassRessource and FileRessource fail with NullPointer exception, ExternalResource complains about missing vaadin theme *_icon.png, althoug my image is called spinner.png.

I have already seen the theme image approach, but this is not what I want. For a small test project, I want to have a folder where people are able to upload images per scp or sftp. These images should be served by tomcat in an explorer style.

I have to admit, that I am a seasoned java developer, but very new to Java based Web applications and especially tomcat (despite starting and stopping in other products). I work in Eclipse WTP (Web tools platform) with Vaadin extension and a configured a Tomcat6 server und ubuntu 10.04 LTS.

Do you have any ideas, what am I doing wrong?

Kind regards,

Bergtroll


EDIT:
Added an attachment of image path, source code used and error stack,
12319.png

I’ve been very blind. The problem was not a wrong file path or something, but mainWindow.getApplication() returned null because not beeing initialized with an application instance. Having fixed this, everything seems to work now.