i have had enough
i am done with this open source rubbish
i cant work with amateurs
i am going to use Oracle ADF
i have invested over 7 days of my employer’s time
trying to get vaadin and spring roo to work
and it doesn’t
the instructions (where they exist) are wrong
the code (released into production!)
with spelling mistakes wrong versions and buggy
ie. reindeer the default theme doesn’t work !!!
i have given people final warnings for releasing untested code into production
why is this property not corrected by the generators
(and similar for hibernate <property name=“hibernate.hbm2ddl.auto” value=" …)
is this sensible for a default?
do you really want to drop the database, all it’s tables and all it’s data
what are these people thinking?
at least i had a complete set of scripts
to recreate the DB and all it’s data
but i will bet most dont
and i had to run them over night
i cannot enumerate all the issues overcome
just to get all the plugins installed and actually working
none of the instructions given are correct
so it’s all trial and error
hours and hours googling and trying to sort through all the drivel
here is a list of steps that works: (but a warning, the generated code still wont run)
using springsource toolsuite 2.8.1 (eclipse) and oracle 11g (a proper database)
-
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html
dont bother trying 11.2.0.2 because it is hard coded somewhere that it wants 10 -
C:\download> mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.2 -Dpackaging=jar -Dfile=ojdbc14.jar -DgeneratePom=true
-
in spring: file\new\spring roo project
-
roo> osgi install --url http://repository.springsource.com/maven/bundles/external/javax/resource/com.springsource.javax.resource/1.5.0/com.springsource.javax.resource-1.5.0.jar
-
roo> osgi install --url http://repository.springsource.com/maven/bundles/external/javax/transaction/com.springsource.javax.transaction/1.1.0/com.springsource.javax.transaction-1.1.0.jar
-
roo> osgi install --url file:///C:\Users\info.m2\repository\com\oracle\ojdbc14\10.2.0.2\ojdbc14-10.2.0.2.jar
-
roo> osgi start --url http://repository.springsource.com/maven/bundles/external/javax/resource/com.springsource.javax.resource/1.5.0/com.springsource.javax.resource-1.5.0.jar
-
roo> osgi start --url http://repository.springsource.com/maven/bundles/external/javax/transaction/com.springsource.javax.transaction/1.1.0/com.springsource.javax.transaction-1.1.0.jar
-
roo> osgi start --url file:///C:\Users\info.m2\repository\com\oracle\ojdbc14\10.2.0.2\ojdbc14-10.2.0.2.jar
-
roo> osgi ps
the 3 items should be Active -
roo> addon create wrapper --topLevelPackage com.oracle.roo.JDBC --groupId com.oracle --artifactId ojdbc14 --version 10.2.0.2 --vendorName Oracle --licenseUrl http://www.oracle.com
this doesn’t actually seem to do anything but i leave it here because i haven’t tested without it
get message: file ‘C:\data\work\springsource.…pom.xml’ already exists -
C:\download> mvn install:install-file -DgroupId=org.eclipse.persistence -DartifactId=eclipselink -Dversion=2.2.0 -Dpackaging=jar -Dfile=eclipselink.jar -DgeneratePom=true
-
C:\download>mvn install:install-file -DgroupId=org.eclipse.persistence -DartifactId=javax.persistence -Dversion=2.0.3 -Dpackaging=jar -Dfile=javax.persistence.jar -DgeneratePom=true
-
roo> persistence setup --provider ECLIPSELINK --database ORACLE --databaseName orcm --userName test --password password
BEWARE: unless you want your DB to be deleted !!! in persistence.xml change the default
to
and similarly for
<property name=“hibernate.hbm2ddl.auto” value= …
though i dont recommend HIBERNATE because it gives errors later on
[s] -
roo> pgp trust --keyId 0xBF0451C0
roo> download accept terms of use
roo> addon install bundle --bundleSymbolicName com.vaadin.spring.roo.addon
[/s]
the above 3 commands (from the tutorial) don’t work
get message: Could not find specified bundle with symbolic name: com.vaadin.spring.roo.addon
therefore do the following
after much searching found here: http://dev.vaadin.com/changeset/18575/svn/addons/SpringRooPlugin/trunk/com.vaadin.spring.roo.addon/readme.txt -
roo> osgi obr url add --url http://vaadin.com/springroo/repository.xml
-
roo> osgi obr deploy --bundleSymbolicName com.vaadin.spring.roo.addon
-
roo> osgi find --bundleSymbolicName com.vaadin.spring.roo.addon
-
roo> osgi framework command start [vaadin-plugin-bundle-id]
[vaadin-plugin-bundle-id]
being the 2 digits returned by 18. above
-
restart roo
-
roo> database reverse engineer --schema checker --testAutomatically false --enableViews false --includeNonPortableAttributes true
–includeNonPortableAttributes should be true for any re4al kind of DB
–excludeTables does not seem to work
for proper data modellers you will be appalled to see that table names are created with leading capitals (ie. case sensitive code??! what is the world coming to)
and any “_” are removed and replaced with that aberrant abomination called camelcase (where is hungarian notation these days ha ha! ) -
roo> vaadin setup --applicationPackage ~.web --baseName nine --themeName runo --useJpaContainer true
note that theme reindeer does not currently (2011/11/25) work
that took about a day and a half to figure out -
roo> vaadin generate all --package ~.web.ui --visuallyComposable true
-
setup a jetty server
in spring menu: run\external tools\external tools configuration …\program\new
location: C:\apache-maven-2.2.1\bin\mvn.bat
workspace: ${workspace_loc:/your project}
arguments: jetty:run -
run that puppy!!!
with HIBERNATE you will get the well known and apparently notorious error message
org.hibernate.LazyInitializationException: could not initialize proxy – no Session
why the generated code does not take care of this beggars my imagination
but after several hours of trying i gave up
it seems i might need access to the source code and i just cant be bothered
with ECLIPSELINK it works for tables that are not referenced by any other
it seems that the forms generated have a totally bizzare strructure
totally unlike any that a normal data modelling programmer would expect
instead of the normal shape where a table has a FK which looks up a single row in another table
the forms are generated the exact opposite!!!
the looked up table tries to select all the other rows that reference it???
imagine an address table with a FK to country
any normal sane person would expect an address form with a field looking up country
but no
what you get is a country form trying to gather all addresses which refer to it
total madness
and it fails
it only works if there are no such addresses
but even then clicking on the country line
to go to the specific country row fails also
a complete waste of time
for a new user like myself
i just want something simple that WORKS
that implements sane patterns (ever heard of master-detail, FK lookups?) and safe defaults
then i can extend my knowledge further
starting with this rubbish that doesn’t work
is totally frustrating and i have better things to do with my time
than bother with reindeer themes released in to production with webkit spelled as wekit
no wonder nothing works
thanks and goodbye