Site Kit

Hi

Just release experimental version of Site Kit which provides some basic functionality for creating business web sites. Please check details from Directory. Feedback about API etc are welcome :).

Br,
Tommi

Hi. I think the online demo doesn’t work.

Hi

Thanks for notifying. The registration process should works now. You can test test admin side with:

admin@admin.org / password

Br,
Tommi

Hi Tommi,

Thank you for putting together this add-on. This is something I have being looking for my project. The demo is working. Interesting enough, it is almost exactly what I need. Thanks again…

Thank you Jack. It is encouraging to hear that you have found site kit to be useful. If you encounter bugs or come up with additional features, please let me know. Patches etc always welcome as well :).

Br,
Tommi

Hi Tommi,
I had send you an email to inquiry the possibility of doing some custom Vaadin work for us. Of course it will be based on your sitekit. Some how I don’t think the email got to you. Can you let me know? Many thanks in advance.

Jack

Hi Jack

I am afraid I have not received email from you as far as I can see. You can try to resend it to tommi.s.e.laukkanen@gmail.com. I am happy to improve Site Kit to better fit your needs and give guidance in usage.

Customization to specialized business needs are in my opinion best carried out by programmers of Vaadin company as they can give you extensive Vaadin knowledge, dedication and long term commitment.

Best regards,
Tommi Laukkanen

Hello Tommi,
I’m interesting by site kit but I see the demo link is not working any more.
The error is below.
Could you check and post a message when the demo site work again ?
many thanks

XML Parsing Error: undefined entity
Location: jar:file:///C:/Documents%20and%20Settings/segersp.BE/Application%20Data/Mozilla/Firefox/Profiles/osvyzem3.default/extensions/speedtest@gotomyhelp.com/chrome/speedtest.jar!/content/netError.xhtml
Line Number 392, Column 33:

&netOffline.longDesc;

Hi Philippe

You can see SiteKit in action at the groom demo:

https://54.246.89.141/groom

Its based on site kit. Just added couple of pages to default demo to create code reviewing site.

Br,
tommi

Hi Tommi,
Thanks for the add-ons. I was expecting this type of add-ons to use in my project. But i am not ssure how can i use to this add-on to customize my website. Can you provide some documentation or source code of ‘online demo’?

Hi,
I’m trying to setup the resource-bundle-translation-site which is using sitekit.
I need to use MySQL because this is what we use in our development environment.
Unfortunately the persistent entites use property names like ‘key’, ‘path’, ‘language’, ‘value’ which are reserved SQL-99 keywords and not accepted by MySQL. Sitekit at least uses ‘key’ (inPrivilege) which is where I got stuck.

Can this be fixed somehow? Unfortunately I couldn’t find the model sources yet …

Thanks
Hans

Hi, unfortunately JPA does not catch these problems and I am testing against PostgreSQL myself. If MySQL has different reserved words then the column names need to be fixed in the JPA entities and schema install scripts. If you have time to make fixes I will happily accept a patch. With the column name changes the software should work with MySQL. Regretfully, I am unlikely to find the time soon to test against MySQL and make these fixes.

Br,
Tommi

Hi Tommi, Thanks for your answer. I didn’t have time myself the last days to move forward. I’ve now changed to PG for testing. However, I’m not able to login because I got stuck with the password and deleting the hash doesn’t help either.
Also, I can’t find the sources for org.vaadin.addons.sitekit.model and hacking is a bit cumbersome…
Can you point me in the right direction?

Thanks,
Hans

As for the model fixes I would consider to use Liquibase for DB setup and maintenance - it’s great and works nice with most databases. I use it sucessfully for my projects.

Hi

The default admin is:

admin@admin.org
password

The sitkit sources are here:
https://github.com/tlaukkan/vaadin-sitekit

I need to checkout the Liquibase. Thank you for the tip! :slight_smile:

-Tommi

Thanks.
Still no luck. I get

[EL Fine]
: sql: 2013-11-30 13:15:37.465--ServerSession(14111765)--Connection(12256734)--Thread(Thread[qtp25056201-20,5,main]
)--SELECT USERID, CREATED, EMAILADDRESS, EMAILADDRESSVALIDATED, FIRSTNAME, LASTNAME, MODIFIED, PASSWORDHASH, PHONENUMBER, OWNER_COMPANYID FROM user_ WHERE ((OWNER_COMPANYID = ?) AND (EMAILADDRESS = ?))
    bind => [null, admin@admin.org]

[EL Finest]
: connection: 2013-11-30 13:15:37.469–ServerSession(14111765)–Connection(12256734)–Thread(Thread[qtp25056201-20,5,main]
)–Connection released to connection pool [default]
.

It appears that we search for a record where owner_companyid is null, however this property is not nullable.

I’ll have a look into the sitekit source then.

Hans

Update: the above error is resolved.

With the help of the sitekit sources I could do some debuging and this turned out to be a hostname problem:
The server running the service is expected to be 127.0.0.1, according to the url entry in the company table.
So if you address http://localhost:8083/site you’ll see the login view but logging fails because no company will be found.

However, I’m a bit confused about the meaning of the host and url properties for Company. We can add a multitude of companies but e.g. URL would always be the URL of the site running the server?

Thanks,
Hans

Hi

Site kit is meant for writing web sites in general and the host field exists to enable virtual hosting multiple instances of same web site software for different companies. It tells the software which company is to be connected to HTTP sessions coming with different host names.

The url field is meant for scenarios where absolute URLs to the site are required. In some reverse proxy scenarios the reverse proxy manipulates the request URL and as result what web app receives as request URL is not anymore same as what is visible in the browser URL box.

You can put * as the host and then that company will be used for all incoming requests. This actually should be the default setting for localization site i.e. it is a bug in the translation site database schema installation script. If you have time you can open issue about it to github and same goes for the mysql problems. This raises the probability that I remember to address these things when I next time devote time to site kit and translation site.

Br,
Tommi

Demo from github (https://github.com/bubblecloud/ilves-seed). DB: mySQL:

liquibase.exception.DatabaseException: Error executing SQL INSERT INTO site.user_ (userid, owner_companyid, emailaddress, emailaddressvalidated, firstname, lastname, phonenumber, passwordhash, created, modified) VALUES ('A591FCB8-772E-4157-B64B-4371A6C7CAE0', '3248528E-4D90-41F7-968F-AF255AD16901', 'admin@admin.org', 'false', 'Default', 'Administrator', '+123 12 123123', 'c8213c753f70e6ef82a3bbece671c183cc9aa70d944f2d8abbbc50ab7432f2b4', '2000-01-01 00:00:00', '2000-01-01 00:00:00'): Data truncation: Data too long for column 'emailaddressvalidated' at row 1
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:61)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:106)
    at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1189)
    at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1172)
    at liquibase.changelog.ChangeSet.execute(ChangeSet.java:352)
    at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:40)
    at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:64)
    at liquibase.Liquibase.update(Liquibase.java:202)
    at liquibase.Liquibase.update(Liquibase.java:181)
    at org.vaadin.addons.sitekit.util.PersistenceUtil.getEntityManagerFactory(PersistenceUtil.java:85)
    at org.vaadin.addons.sitekit.jetty.DefaultJettyConfiguration.configureServer(DefaultJettyConfiguration.java:72)
    at org.bubblecloud.ilves.Ilves.main(Ilves.java:41)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'emailaddressvalidated' at row 1
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3489)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:734)
    at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:294)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:54)
    ... 11 more
2014-09-04 15:59:49,341 main INFO  liquibase - database/sitekit/db.changelog-2.0.xml::default-data::tlaukkan: Successfully released change log lock
Exception in thread "main" org.vaadin.addons.sitekit.site.SiteException: Error updating database.
    at org.vaadin.addons.sitekit.util.PersistenceUtil.getEntityManagerFactory(PersistenceUtil.java:90)
    at org.vaadin.addons.sitekit.jetty.DefaultJettyConfiguration.configureServer(DefaultJettyConfiguration.java:72)
    at org.bubblecloud.ilves.Ilves.main(Ilves.java:41)
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set database/sitekit/db.changelog-2.0.xml::default-data::tlaukkan:
     Reason: liquibase.exception.DatabaseException: Error executing SQL INSERT INTO site.user_ (userid, owner_companyid, emailaddress, emailaddressvalidated, firstname, lastname, phonenumber, passwordhash, created, modified) VALUES ('A591FCB8-772E-4157-B64B-4371A6C7CAE0', '3248528E-4D90-41F7-968F-AF255AD16901', 'admin@admin.org', 'false', 'Default', 'Administrator', '+123 12 123123', 'c8213c753f70e6ef82a3bbece671c183cc9aa70d944f2d8abbbc50ab7432f2b4', '2000-01-01 00:00:00', '2000-01-01 00:00:00'): Data truncation: Data too long for column 'emailaddressvalidated' at row 1
    at liquibase.changelog.ChangeSet.execute(ChangeSet.java:388)
    at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:40)
    at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:64)
    at liquibase.Liquibase.update(Liquibase.java:202)
    at liquibase.Liquibase.update(Liquibase.java:181)
    at org.vaadin.addons.sitekit.util.PersistenceUtil.getEntityManagerFactory(PersistenceUtil.java:85)
    ... 2 more
Caused by: liquibase.exception.DatabaseException: Error executing SQL INSERT INTO site.user_ (userid, owner_companyid, emailaddress, emailaddressvalidated, firstname, lastname, phonenumber, passwordhash, created, modified) VALUES ('A591FCB8-772E-4157-B64B-4371A6C7CAE0', '3248528E-4D90-41F7-968F-AF255AD16901', 'admin@admin.org', 'false', 'Default', 'Administrator', '+123 12 123123', 'c8213c753f70e6ef82a3bbece671c183cc9aa70d944f2d8abbbc50ab7432f2b4', '2000-01-01 00:00:00', '2000-01-01 00:00:00'): Data truncation: Data too long for column 'emailaddressvalidated' at row 1
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:61)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:106)
    at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1189)
    at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1172)
    at liquibase.changelog.ChangeSet.execute(ChangeSet.java:352)
    ... 7 more
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'emailaddressvalidated' at row 1
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3489)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:734)
    at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:294)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:54)
    ... 11 more