2

new Zksample2 app. Spring, -AOP, -Security, Hibernate, Hibernate-Generic-DAO, Jasper

asked 2010-01-17 08:29:28 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2013-03-27 08:56:18 +0800

jimyeh gravatar image jimyeh
2047 1 4
ZK Team

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.

  1. KeyGenZkoss = one-time-password generator
  2. spring-hibernate-backend = backend
  3. zkoss = frontend
  4. zksample2_doc = 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

delete flag offensive retag edit

213 Replies

Sort by » oldest newest

answered 2010-02-19 05:06:33 +0800

erickmelo gravatar image erickmelo
87 2

If do you need some help with JasperReport I can help!!!

link publish delete flag offensive edit

answered 2010-02-19 10:21:21 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Great Erick,
please give me your mail address under sge(at)forsthaus(dot)de

link publish delete flag offensive edit

answered 2010-02-22 21:45:06 +0800

thaivq gravatar image thaivq
39 1

Hi Stephan,

Thanks for your great work.
The project works great but when I add new or delete a record, the paging information still display old result. For example, in Customer page I have 27 records, when I add a new one, the paging bar still states that I have 27 records which 28 records is expected. I only get 28 records when I reload the page.

Please have a look at this issue.

Thanks and regards.
Thai

link publish delete flag offensive edit

answered 2010-02-23 01:52:02 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi Thai,

yes, we will have a look on it.

best
Stephan

link publish delete flag offensive edit

answered 2010-02-23 11:48:25 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Fixed in Customers, Branches, Articles, Offices. Rest will follow.

link publish delete flag offensive edit

answered 2010-05-04 04:27:24 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi all,

we have new checked in sources for a so called HibernateStatistic module (Same name for the menu item).
It logs all Hibernate CRUD operations against the Database.

- log all DAO methods.
- log all Service methods. So it can shows all involved entities.
- logs the slowest query and stores their HQL statement

Technically it's plugged to the application as an spring aspect.

best and have fun with it
Stephan and Bjoern


Folders/Packages

backend
package: de.forsthaus.backend.util.db.logging
package: de.forsthaus.backend.util.db.logging.service
package: de.forsthaus.backend.util.db.logging.service.impl
(+ .dao; + .model; + service methods for the 2 tables)
spring-configuration: src/main/resources/performance-db-logging.xml

frontend (GUI-services)
package: de.forsthaus.gui.service
package: de.forsthaus.gui.service.impl

frontend (View)
de.forsthaus.webui.debug (controller for the view Grid-in-Grid)
de.forsthaus.webui.debug.model (RowRenderer/ItemRenderer)

frontend (zul)
src/main/webapp/WEB-INF/pages/debug/HibernateStatistics.zul (Main Grid)
src/main/webapp/WEB-INF/pages/debug/HibernateStatisticsDetail.zul (Detail Grid)

link publish delete flag offensive edit

answered 2010-05-18 08:11:02 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-05-18 08:11:46 +0800

Hi all,

we have added a PagedBindingListWrapper ( paging/sorting/searching on DB-side ) for the listbox
component that can work with zk's DataBinding mechanism.

So the Branch module sample works now complete databinded. The same for the grid will follow next times.

Have fun

best
Stephan and Björn

link publish delete flag offensive edit

answered 2010-05-20 12:42:13 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Added echo events and Documentation updated.

link publish delete flag offensive edit

answered 2010-06-17 05:36:32 +0800

ComBin gravatar image ComBin
12

Hi Stephan,

I have problem with this project. At run the exception is called:
17.06.2010 16:53:19 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Documents and Settings\Администратор\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\Documents and Settings\Администратор\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Kaspersky Lab\Kaspersky Anti-Virus 6.0 for Windows Servers\;C:\Program Files\TortoiseGit\bin;
17.06.2010 16:53:19 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: {Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:maven-zkoss' did not find a matching property.
17.06.2010 16:53:19 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
17.06.2010 16:53:19 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 580 ms
17.06.2010 16:53:19 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
17.06.2010 16:53:19 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
17.06.2010 16:53:20 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(F:\repository\zksample2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\maven-zkoss\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
17.06.2010 16:53:20 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2010-06-17 16:53:20,859 INFO ContextLoader M - Root WebApplicationContext: initialization started
2010-06-17 16:53:20,921 INFO XmlWebApplicationContext M - Refreshing Root WebApplicationContext: startup date [Thu Jun 17 16:53:20 NOVST 2010]; root of context hierarchy
2010-06-17 16:53:21,031 INFO XmlBeanDefinitionReader M - Loading XML bean definitions from class path resource [applicationContext-zkoss.xml]
2010-06-17 16:53:21,046 ERROR ContextLoader M - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-zkoss.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-zkoss.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:458)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: class path resource [applicationContext-zkoss.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:141)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
... 27 more
17.06.2010 16:53:21 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-zkoss.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-zkoss.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:458)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: class path resource [applicationContext-zkoss.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:141)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
... 27 more
17.06.2010 16:53:21 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
17.06.2010 16:53:21 org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
17.06.2010 16:53:21 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
17.06.2010 16:53:21 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: A web application registered the JBDC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

What can it be?
Thanks

link publish delete flag offensive edit

answered 2010-06-18 03:41:23 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi ComBin,

occurs this failure by starting the ready to use war-file? or have you checked out and start the project?

best
Stephan

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
4 followers

RSS

Stats

Asked: 2010-01-17 08:29:28 +0800

Seen: 29,058 times

Last updated: May 27 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More