I am building a web application using zkoss 5.0.4, Spring 3.0.3, Hibernate 3 and JpA 1.0 with JBOSS 5.1 GA (with JDK support).
The project is compiled using JBOSS. But it seems that for some reason, perseverance does not apply.
When I launch the application in the console, it displays the following:
10:07:35,265 WARN [QuerySplitter] no persistent classes found for query class: from org.zkforge.zktodo2.Reminder
The following is a list of jar files that I use in the /WEB-INF/lib .
aopalliance.jar asm-1.5.3.jar asm-attrs-1.5.3.jar cglib-2.1_3.jar commons-dbcp-1.2.2.jar commons-fileupload-1.2.1.jar commons-io.jar commons-pool-1.3.jar ehcache-1.2.3.jar fckez.jar groovy.jar jruby.jar js.jar junit-3.8.1.jar jython.jar org.springframework.aop-3.0.3.RELEASE.jar org.springframework.asm-3.0.3.RELEASE.jar org.springframework.aspects-3.0.3.RELEASE.jar org.springframework.beans-3.0.3.RELEASE.jar org.springframework.context.support-3.0.3.RELEASE.jar org.springframework.context-3.0.3.RELEASE.jar org.springframework.core-3.0.3.RELEASE.jar org.springframework.expression-3.0.3.RELEASE.jar org.springframework.instrument.tomcat-3.0.3.RELEASE.jar org.springframework.instrument-3.0.3.RELEASE.jar org.springframework.jdbc-3.0.3.RELEASE.jar org.springframework.jms-3.0.3.RELEASE.jar org.springframework.orm-3.0.3.RELEASE.jar org.springframework.oxm-3.0.3.RELEASE.jar org.springframework.test-3.0.3.RELEASE.jar org.springframework.transaction-3.0.3.RELEASE.jar org.springframework.web.portlet-3.0.3.RELEASE.jar org.springframework.web.servlet-3.0.3.RELEASE.jar org.springframework.web.struts-3.0.3.RELEASE.jar org.springframework.web-3.0.3.RELEASE.jar zcommon.jar zcommons-el.jar zhtml.jar zk.jar zkplus.jar zul.jar zweb.jar
Below is my web.xml :
<?xml version="1.0" encoding="UTF-8"?> < web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> < display-name > zk5 < / display-name > <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:dataSourceContext.xml,classpath:spring-context.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <!-- The Spring RequestContextLister uses thread bound variables so to use this Spring freatures requires that we apply <disable-event-thread /> within zk.xml --> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <listener> < description> Used to cleanup when a session is destroyed< / description> < display-name> ZK Session cleaner< / display-name> <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> </listener> <servlet> <description> The ZK loader for ZUML pages</description> <servlet-name>zkLoader</servlet-name> <servlet-class> org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class> <init-param> <param-name>update-uri</param-name> <param-value>/zkau</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <description> The asynchronous update engine for ZK</description> <servlet-name>auEngine</servlet-name> <servlet-class> org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zul</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zhtml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>auEngine</servlet-name> <url-pattern>/zkau/*</url-pattern> </servlet-mapping> < welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> <welcome-file>index.zul</welcome-file> < / welcome-file-list> </web-app>
Below is my spring-context.xml file:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd "> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" p:persistenceUnitName="ExamplePU" p:persistenceXmlLocation="classpath:/META-INF/persistence.xml" p:dataSource-ref="dataSource" > <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" p:showSql="true" p:generateDdl="true"> </bean> </property> <property name="jpaProperties"> <value> hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy hibernate.dialect=${hibernate.dialect} hibernate.hbm2ddl.auto=${hibernate.hbm2ddl.auto} </value> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" p:entityManagerFactory-ref="entityManagerFactory" /> <tx:annotation-driven /> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> <bean id="basicDao" class="org.zkforge.zktodo2.BasicDao" /> <bean id="reminderService" class="org.zkforge.zktodo2.ReminderService" p:basicDao-ref="basicDao" /> <bean id="toDoControllerV1" class="org.zkforge.zktodo2.ZkToDoControllerV1" p:reminderService-ref="reminderService" scope="prototype" /> <bean id="toDoModel" class="org.zkforge.zktodo2.ZkToDoModelImpl" p:reminderService-ref="reminderService" scope="session"> </bean> <bean id="toDoControllerV2" class="org.zkforge.zktodo2.ZkToDoControllerV2" p:toDoModel-ref="toDoModel" scope="prototype" /> </beans>
Below is my dataSourceContext.xml file:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd "> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" p:driverClassName="${jdbc.driver}" p:url="${jdbc.url}" p:username="${jdbc.username}" p:password="${jdbc.password}" /> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:zktodo2.properties</value> </list> </property> </bean> </beans>
Below is my zktodo2.properties file
jdbc.url=jdbc:hsqldb:mem:salvation jdbc.username=sa jdbc.password= jdbc.driver=org.hsqldb.jdbcDriver hibernate.dialect=org.hibernate.dialect.HSQLDialect hibernate.hbm2ddl.auto=update
Below are my compilations from the JBOSS server:
10:06:41,000 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=
Please let me know if you need anything else on my part.