Database Definition

I’m testing vaadin in liferay/tomcat v6.1/7 with an eye to adopting it. I must say so far Vaadin is proving to be a good web framework, I really like the largely simple java.
Now for the issue I’m having…
I assume that without defining which database to use, the AddressBook sample code tries to connect to the lportal db (is this right)?
How do I get it to use a different data base (like a seperate database called “addressbook”).

Ok, my frustration is reaching a level at which I will toss this idea all together and recommend Microsoft’s solution:angry:.

There are multiple version of AddressBook employing different persistence and databases.

One tutorial uses the DatabaseHelper class - to connect to a “real” data base however when you download the “final version zip file” and you unzip it - the DatabaseHelper.java does not even exist. (from https://vaadin.com/tutorial/-/chapter/themeing.final.html)

The other tutorial’s addressbook - has PersonReferenceContainer which has no database driver or url reference - and oh the downloadable source does not work either.

Does someone have an example that when deployed works?

The complete source code can be found at
http://dev.vaadin.com/svn/demo/demo-site/src/com/vaadin/demo/
, and yes, DatabaseHelper is included.

Thank you – I’ll take a look

Hi Tom, found DataBaseHelper along with other files in /sqlcontianer/addressbook -
I have imported and compiled this version in eclipse/liferay/vaadin

this is the result when I deploy

INFO: Initializing Spring root WebApplicationContext
12:29:36,148 ERROR [pool-2-thread-2]
[PortletBagFactory:313]
javax.portlet.PortletException: Failed to load application class: com.vaadin.demo.tutorial.AddressBookApplication
javax.portlet.PortletException: Failed to load application class: com.vaadin.demo.tutorial.AddressBookApplication
at com.vaadin.terminal.gwt.server.ApplicationPortlet2.init(ApplicationPortlet2.java:48)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:256)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:221)
at com…

so I’m blowing it away and starting a new portlet project.

Rebuild went well

new error’s indicate it can’t find the database table - I’m doing some checking on my end.