-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
today we have checked in the new Zksample2 application as maven2 projects on sourceforge.net. You can reach the project homepage under the link http://zksample2.sourceforge.net/ here.
You will find there 3 eclipse maven subprojects and the folder for the documentation.
The Documentation you can download seperately as a pdf-file from here.
The documentation is a work in progress so be sure to check sometimes for the newest file.
For checkout and evaluate or work with the application please download and read first the documentation.
Mainly changes to the first sample app are: - change project structure as maven2 projects - spring managed frontend - @Secured() for securing methods with own implementation - login statistic - several integration options of ipToCountry - one-time-password sources are opend - Refactoring all Domain/DAO/Service Classes to english names - many many code changes - documentation
We whish all fun with it and hope that it can be usefull for others.
best Stephan and Björn
Hi
Very excellent example.
Apologies for silly question, I'm working through documentation to setup locally to better understand and got to part where I 'import' from sourceforge site
Its asking me for a user/pass but by existing sourceforge account does not work
Should I be able to Import?
org.tigris.subversion.javahl.ClientException: Authorization failed
svn: MKACTIVITY of '/svnroot/zksample2/!svn/act/3a2355d1-70ae-9743-97ac-64d3347988d0': authorization failed: Could not authenticate to server: rejected Basic challenge (https://zksample2.svn.sourceforge.net)
It's not an 'Import'. It's a checkout from svn.
Seems you have copy a false URL. Please correct it:
https://zksample2.svn.sourceforge.net/svnroot/zksample2
than go to trunk and checkout seperate all projects
Hi Erick,
yes you are right. We have changed an interface. So it should be throw DataAccessExceptions.
public interface HibernateOperations Helper class that simplifies Hibernate data access code. Automatically converts HibernateExceptions into DataAccessExceptions, following the org.springframework.dao exception hierarchy.
We will have a look on it.
Thanks
Stephan
Fixed!
Problem was a false Hibernate Dialect (H2 for our Postgres) . Now it's a DataAccessException ConstraintViolation. That's right.
We have a special script that do the deployment of the app on our web server in following way:
a) checkout the project from SF
b) compiles the project
c) replace the file 'customizeApplicationContext.xml' with a modified file that let connect the zksample2 app to
our postgres Database. So the svn Zksample2 sources can run out of the box with the configured H2 Database.
We have now moved the hibernate properties (hibernate.Dialect; hibernate.show_SQL; hibernate.format_SQL) in this file too.
d) copy the .war file to tomcat wepapps directory.
By the way:
For all who are interested in the newest Spring libs.
Björn made at time the Zksample2 sources ready for Spring 3.0 and Spring-Security 3.0x
At time the spring-security pieces of zkspring.jar 1.0 + 1.2 are not all compatible with Spring-Security 3.0x because the spring developers
have renamed some packages.
For us it's no problem because we don't use all of it. The SpringUtils.getBean() method we have cuted and use them.
For method securing with the annotation @Secured() we have an own method that runs all times in the actual Zksample2 codes.
best
Stephan
Done!
The Zksample2 app is updated to Spring3.
Thanks to Björn.
Best
Stephan
Hi,
I'm having problems to run the project... I think some maven dependency is missing:
Exception to start the app:
Error creating bean with name 'serviceTxAdvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate3.HibernateTransactionManager] for bean with name 'transactionManager' defined in class path resource [applicationContext-db.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.orm.
Update the maven dependencies for both projects.
So it's new libs, so maven must download it first to its local repository.
<Eclipse> <zkoss> <right click> <Maven> <Update Dependencies>
<Eclipse> <spring-hibernate-backend> <right click> <Maven> <Update Dependencies>
best
Stephan
Let me hear if it 's OK.
Hi Stephan,
Thank you.. The project is working right now!!
I was looking for your code and I think you made a really good job!! Are you considering create a skeleton project? You created a interesting structure for create ZK projects (with CRUD operations). The GUI classes, Util classes, Pagination classes, Menu classes, Security classes and User authentication are common for many projects. I think a skeleton project (without domais classes - just the packages for insert then) would help many developers to create ZK projects based in Spring and Hibernate. It could be a framework for some kinds of ZK projects.
Suggestion for ZK Studio and ZK Grails team: follow this project structure to automatize the creation of CRUD ZK projects...
Best,
Erick
We said THANKS for the nice words Erick,
We will have a look for it (skeleton project).
1. More important at time is that databinding guys are helping us to make our special pagination classes ready for databinding.
Actually we have a second BranchDialog that runs with databinding. The list is missing because the adaption of the pagination class.
2. Secondly we have problems with our JasperReport (in OrderDialog) to show the data. It runs without error but shows no data.
best
Stephan
Asked: 2010-01-17 08:29:28 +0800
Seen: 29,065 times
Last updated: May 27 '16