Let's talk about developing crud functions in hibernate + spring + struts2 + extjs.

Source: Internet
Author: User

Not long ago, I read this article "hibernate + spring + struts2 + extjs crud development function" written by myloon. Some netizens commented on the issues they encountered, I am here to help the author make a supplement, please forgive me for the shortcomings.

 

First problem: Automatic database generation

1. Create an empty database myloon in MySQL;

2. Add the following content to the hibernate configuration file:
<Property name = "hibernate. hbm2ddl. Auto"> Update </property>

 

Second question:

Org. springframework. beans. factory. unsatisfieddependencyexception: Error creating bean with name 'levelservice' defined in servletcontext resource [/WEB-INF/spring/applicationcontext. XML]: unsatisfied dependency expressed through bean property 'postinterceptors ': No bean named' & levelservice' is defined

This problem is serious. After analyzing it for a long time, I finally found out that it was originally an applicationcontext. xml file header declaration problem. I changed <beans default-autowire = "autodetect"> to a common declaration, so that compilation will not fail. It may be related to the spring package. I use spring2.5, but I don't know what the original author uses. I am not very clear about the specific reasons. Please give more advice.

 

Third question:

(10 MS) [main] error: Org. springframework. web. context. contextloader # initwebapplicationcontext: context initialization failed <br/> (5177 MS) [main] error: Org. apache. catalina. core. containerbase. [Catalina]. [localhost]. [/crud] # listenerstart: exception sending context initialized event to listener instance of class Org. springframework. web. context. contextloaderlistener <br/> JAVA. lang. outofmemoryerror: Java heap space <br/> 2007-11-30 11:26:10 Org. apache. catalina. core. standardcontext start <br/> critical: Error listenerstart <br/> 11:26:10 Org. apache. catalina. core. standardcontext start <br/> severe: context [/crud] startup failed due to previous errors

 

A solution is provided online. I have tried to solve this problem. The specific solution is as follows:

Add the system environment variable java_opts.

Value:-xms32-xmx512

 

Fourth question:

Modify the annotation in the level class --

@ Table (name = "level ")

 

 

After other changes are made, it is no problem to deploy and run them.

 

For the package files required by the project, you can leave me an email address and I will forward it to you.

 

My operation is as follows:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.