Hibernate4.3.6 error message and solution for Final + Spring3.0.5 configuration, hibernate4.3.6
1. caused by: org. hibernate. cache. noCacheRegionFactoryAvailableException: Second-level cache is used in the application, but property hibernate. cache. region. factory_class is not given, please either disable second level cache or set correct region factory class name to property hibernate. cache. region. factory_class (and make sure the second level cache provider, hibernate-infinispan, for example, is available in the classpath ).
The reason is that hibernate4.0 in hibernate. cfg. xml configuration Level 2 Cache and hibernate3.3 are different, this example uses Hibernate-core.4.3.6.Final, in fact from 4.0 is different, level 2 Cache configuration comparison is as follows:
4.0 and above are configured as follows:
<Property name = "hibernate. cache. use_second_level_cache"> true </property>
<Property name = "hibernate. cache. region. factory_class"> org. hibernate. cache. ehcache. EhCacheRegionFactory </property>
3.3 The configuration is as follows:
<Property name = "hibernate. cache. use_second_level_cache"> true </property>
<Property name = "cache. provider_class"> org. hibernate. cache. EhCacheProvider </property>
However, if you only modify the preceding configuration, an error occurs. To use the second-level cache, you must reference the corresponding jar package, that is, the jar package under the hibernate-release-4.3.6.Final \ lib \ optional \ ehcache should also be copied to the lib, otherwise the Unable to create requested service [org. hibernate. cache. spi. regionFactory] error.
2. nested exception is org. springframework. beans. factory. NoSuchBeanDefinitionException: No bean named 'attendtypedao' is defined
This error message is obvious: no corresponding bean is defined. After careful check, it turns out that you are too careless. When you define the bean, you write "attendTypeDao" as "attentTypeDao ".
3. Error
! MESSAGE Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
Modify the workspace \. metadata \. plugins \ org. eclipse. wst. server. core \ servers. xml file.
<Servers>
<Server hostname = "localhost" id = "JBoss v5.0 at localhost" name = "JBoss v5.0
Localhost "runtime-id =" JBoss v5.0 "server-type =" org. eclipse. jst. server. generic. jboss5"
Server-type-id = "org. eclipse. jst. server. generic. jboss5" start-timeout = "1000" stop-
Timeout = "15" timestamp = "0">
<Map jndiPort = "1099" key = "generic_server_instance_properties" port = "8090"
ServerAddress = "127.0.0.1" serverConfig = "default"/>
</Server>
</Servers>
Change start-timeout = "45" to start-timeout = "100" or longer.
The deployment was successful. However, the problems encountered by each person during actual deployment may be different. You can find the cause by carefully analyzing the error information.
Struts23161Hibernate434Spring402 framework startup Error
SessionFactory fails to call init. Check the database connection section.
Paste the bean xml of your sessionFactory
A question about SSH (struts21 + spring30 + hibernate33) configuration is as follows:
At com. fei. dao. impl. IUserDAOImpl. login (IUserDAOImpl. java: 17)
Check the error message.
What is the content of your IUserDAOImpl line 17th?