Hello friends,
I am creating 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).
project compiles fine with JBOSS. But it seems that persitence is not applying for some reason.
When I run an application in console it gives following
10:07:35,265 WARN [QuerySplitter] no persistent classes found for query class: from org.zkforge.zktodo2.Reminder
Following is list of jar files that I am using in /WEB-INF/lib directory.
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
Following is my web.xml file
<?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 >
contextConfigLocation classpath:dataSourceContext.xml,classpath:spring-context.xml
org.springframework.web.context.ContextLoaderListener
within zk.xml --> org.springframework.web.context.request.RequestContextListener Used to cleanup when a session is destroyed ZK Session cleaner org.zkoss.zk.ui.http.HttpSessionListener The ZK loader for ZUML pages zkLoader org.zkoss.zk.ui.http.DHtmlLayoutServlet update-uri /zkau 1 The asynchronous update engine for ZK auEngine org.zkoss.zk.au.http.DHtmlUpdateServlet zkLoader *.zul zkLoader *.zhtml auEngine /zkau/* index.html index.htm index.jsp default.html default.htm default.jsp index.zul Following is my spring-context.xml file
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
p:persistenceUnitName="ExamplePU"
p:persistenceXmlLocation="classpath:/META-INF/persistence.xml"
p:dataSource-ref="dataSource"
p:showSql="true"
p:generateDdl="true">
hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy
hibernate.dialect=${hibernate.dialect}
hibernate.hbm2ddl.auto=${hibernate.hbm2ddl.auto}
class="org.springframework.orm.jpa.JpaTransactionManager"
p:entityManagerFactory-ref="entityManagerFactory"
/>
<!--
JPA helpers
-->
<bean id="basicDao" class="org.zkforge.zktodo2.BasicDao" />
<!--
First article classes
-->
p:basicDao-ref="basicDao" />
p:reminderService-ref="reminderService" scope="prototype"
/>
<!--
Data binding enhancement classes
-->
-->
Following is my dataSourceContext.xml file
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 ">
classpath:zktodo2.properties
</bean>
Following 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
Following is my compiling stuff from JBOSS server
10:06:41,000 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=#ExamplePU
10:06:41,156 INFO [Version] Hibernate Annotations 3.4.0.GA
10:06:41,156 INFO [Environment] Hibernate 3.3.1.GA
10:06:41,171 INFO [Environment] hibernate.properties not found
10:06:41,171 INFO [Environment] Bytecode provider name : javassist
10:06:41,171 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
10:06:41,343 INFO [Version] Hibernate Commons Annotations 3.1.0.GA
10:06:41,343 INFO [Version] Hibernate EntityManager 3.4.0.GA
10:06:41,375 INFO [Ejb3Configuration] Processing PersistenceUnitInfo [
name: ExamplePU
...]
10:06:41,375 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
10:06:41,515 INFO [AnnotationBinder] Binding entity from annotated class: org.zkforge.zktodo2.Reminder
10:06:41,546 INFO [EntityBinder] Bind entity org.zkforge.zktodo2.Reminder on table REMINDER
10:06:41,593 INFO [Version] Hibernate Validator 3.1.0.GA
10:06:41,625 INFO [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
10:06:41,687 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
10:06:41,703 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
10:06:41,734 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
10:06:41,734 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
10:06:41,781 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
10:06:41,796 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
10:06:41,796 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
10:06:41,796 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
10:06:41,796 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
10:06:41,796 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
10:06:41,796 INFO [SettingsFactory] JDBC batch size: 15
10:06:41,796 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
10:06:41,796 INFO [SettingsFactory] Scrollable result sets: enabled
10:06:41,796 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:06:41,796 INFO [SettingsFactory] Connection release mode: auto
10:06:41,796 INFO [SettingsFactory] Default batch fetch size: 1
10:06:41,796 INFO [SettingsFactory] Generate SQL with comments: disabled
10:06:41,796 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:06:41,796 INFO [SettingsFactory] Order SQL inserts for batching: disabled
10:06:41,796 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:06:41,812 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:06:41,812 INFO [SettingsFactory] Query language substitutions: {}
10:06:41,812 INFO [SettingsFactory] JPA-QL strict compliance: enabled
10:06:41,812 INFO [SettingsFactory] Second-level cache: enabled
10:06:41,812 INFO [SettingsFactory] Query cache: disabled
10:06:41,812 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
10:06:41,828 INFO [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
10:06:41,828 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:06:41,828 INFO [SettingsFactory] Cache region prefix: persistence.unit:unitName=#ExamplePU
10:06:41,828 INFO [SettingsFactory] Structured second-level cache entries: disabled
10:06:41,828 INFO [SettingsFactory] Statistics: disabled
10:06:41,828 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:06:41,828 INFO [SettingsFactory] Default entity-mode: pojo
10:06:41,828 INFO [SettingsFactory] Named query checking : enabled
10:06:41,875 INFO [SessionFactoryImpl] building session factory
10:06:42,046 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=#ExamplePU
10:06:42,046 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
10:06:42,046 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=#ExamplePU
10:06:42,046 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
10:06:42,046 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
10:06:42,046 WARN [SessionFactoryImpl] JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
10:06:42,062 INFO [TomcatDeployment] deploy, ctxPath=/zk5
10:06:42,171 INFO [[/zk5]] Initializing Spring root WebApplicationContext
10:06:42,171 INFO [ContextLoader] Root WebApplicationContext: initialization started
10:06:42,906 INFO [XmlWebApplicationContext] Refreshing Root WebApplicationContext: startup date [Sat Oct 02 10:06:42 IST 2010]; root of context hierarchy
10:06:42,953 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [dataSourceContext.xml]
10:06:43,046 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [spring-context.xml]
10:06:43,171 INFO [PropertyPlaceholderConfigurer] Loading properties file from class path resource [zktodo2.properties]
10:06:43,203 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@10fe280: defining beans [dataSource,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,entityManagerFactory,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,basicDao,reminderService,toDoControllerV1,toDoModel,toDoControllerV2]; root of factory hierarchy
10:06:43,296 INFO [LocalContainerEntityManagerFactoryBean] Building JPA container EntityManagerFactory for persistence unit 'ExamplePU'
10:06:43,296 INFO [Ejb3Configuration] Processing PersistenceUnitInfo [
name: ExamplePU
...]
10:06:43,296 INFO [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
10:06:43,296 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
10:06:43,296 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
10:06:43,312 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
10:06:43,312 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
10:06:43,312 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
10:06:43,312 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
10:06:43,312 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
10:06:43,312 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
10:06:43,312 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
10:06:43,312 INFO [SettingsFactory] JDBC batch size: 15
10:06:43,312 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
10:06:43,312 INFO [SettingsFactory] Scrollable result sets: enabled
10:06:43,312 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:06:43,312 INFO [SettingsFactory] Connection release mode: auto
10:06:43,312 INFO [SettingsFactory] Default batch fetch size: 1
10:06:43,312 INFO [SettingsFactory] Generate SQL with comments: disabled
10:06:43,312 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:06:43,312 INFO [SettingsFactory] Order SQL inserts for batching: disabled
10:06:43,312 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:06:43,312 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:06:43,312 INFO [SettingsFactory] Query language substitutions: {}
10:06:43,312 INFO [SettingsFactory] JPA-QL strict compliance: enabled
10:06:43,312 INFO [SettingsFactory] Second-level cache: enabled
10:06:43,312 INFO [SettingsFactory] Query cache: disabled
10:06:43,312 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
10:06:43,312 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:06:43,312 INFO [SettingsFactory] Structured second-level cache entries: disabled
10:06:43,312 INFO [SettingsFactory] Echoing all SQL to stdout
10:06:43,312 INFO [SettingsFactory] Statistics: disabled
10:06:43,312 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:06:43,312 INFO [SettingsFactory] Default entity-mode: pojo
10:06:43,312 INFO [SettingsFactory] Named query checking : enabled
10:06:43,312 INFO [SessionFactoryImpl] building session factory
10:06:43,312 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
10:06:43,312 INFO [SchemaUpdate] Running hbm2ddl schema update
10:06:43,312 INFO [SchemaUpdate] fetching database metadata
10:06:43,328 INFO [SchemaUpdate] updating schema
10:06:43,328 INFO [SchemaUpdate] schema update complete
10:06:43,484 INFO [ContextLoader] Root WebApplicationContext: initialization completed in 1313 ms
10:06:43,500 INFO [zkoss] Starting ZK 5.0.4 CE (build: 2010083112)
10:06:43,515 INFO [zkoss] Loading system default
10:06:43,625 INFO [zkoss] Parsing jndi:/localhost/zk5/WEB-INF/zk.xml
10:06:43,625 INFO [zkoss] The event processing thread is disabled
10:07:35,265 WARN [QuerySplitter] no persistent classes found for query class: from org.zkforge.zktodo2.Reminder
Sorry for the bad formating of code.. I do no know how best format code in this editor.
Can any one help me regarding the matter.
Please let me know if you need anything else from my side.
Thanks.