1, javax.servlet.ServletException: Must specify type attribute if name is specified
You look at your jsp page, whether the tag name attribute is defined, if defined, then the type attribute must be defined. In general can be deleted, name attribute value is defined in your struts-config.xml of the name of the action of the value.
2, "No bean found under attribute key XXX"
Where in the struts-config.xml defines an ActionForm, but the type attribute specifies the class does not exist, type the value of the property should be the full name of the Form class. Or, in the Action definition, name, or attribute specified ActionForm attribute does not exist.
3, "Cannot find bean XXX in any scope"
In the Action Village will generally request.setAttribute () of some object, and then turned to the jsp file (using the tag or the request.getAttribute () method) get these objects and display them. The exception is that jsp to get an object, but in front of Action where the object has not set up to request (can also be a session, servletContext) Village. May be the name wrong, please check the tag inside jsp is generally the name attribute, or the getAttribute () method parameter values; or Action Logic is the problem is not the implementation of setAttribute () method first turned. There is another possible issue is purely a jsp file, for example, will specify an id value, and then loop to use this value as the name value, if the two values different, this exception will appear. (Is a reason, request and have no equivalent object.)
4, "Missing message for key" XXX ""
Lack the necessary resources to check whether there ApplicationResources.properties file jsp file required resources, for example: This line of code will find msg.name.prompt resource, and if AppliationResources.properties where there is no such resources will appear in this exception. When using multi-module, pay attention to the module's struts-config-xxx.xml have specified to use the resource file name, otherwise, what resources of course, could not find, which is an easy mistake.
5, "No getter method for property XXX of bean teacher"
This exception message that made it very clear, jsp inside a bean property to be taken out, but the bean does not have this property. You should check the jsp tags in a property value of the property. For example, the following code should be changed to code Caidui cade
6, "Cannot find ActionMappings or ActionFormBeans collection"
To be solved.
7, "Cannot retrieve mapping for action XXX"
In the. Jsp tag inside the designated action = '/ XXX', but the Action is not set in the struts-config.xml inside too.
8, HTTP Status 404 - / xxx / xxx.jsp
Forward of the path attribute to point to a jsp page does not exist, please check the path and modules, for the same module Action steering, path should not contain the module name; modules turn, remember to use contextRelative = "true".
9, no exceptions, which displays a blank page may be used in forward and Action inside struts-config.xml where the name does not match the definition of forward.
10, "The element type" XXX "must be terminated by the matching end-tag" XXX "."
This is the struts-config.xml file format errors, double check whether it is a well-formed xml document, on the xml file format here will not go into details.
11, "Servlet.init () for servlet action threw exception"
This exception usually occurs later will show a stack of information on the ActionServlet exception, which pointed out the specific exception which appears in the line of code. I have met in a prompt as follows:
at org.apache.struts.action.ActionServlet.parseModuleConfigFile (ActionServlet.java: 1003)
at org.apache.struts.action.ActionServlet.initModuleConfig (ActionServlet.java: 955)
To solve the problem, first download the struts of the source package, and then ActionServlet.java the first 1003 rows are inserted breakpoints, and monitoring of all variables. Very ashamed, I actually lost the struts-config.xml file, so the above exception occurs, it should be, and CVS sync without careful deleted.
12, "Resources not defined for Validator"
This is used to confirm the Validator plug-in that may occur when an exception, when you want to check validation.xml file inside the resources to see whether indeed the definition, form the name correctly, and so on.
13, remember when there are listed in the database using the text type, so get the contents from the database must be a key in order to take, it is personality.
var selectedType = eval ( 'document.forms . applyType. options [' + document.forms . applyType.selectedIndex + ']. value');
You can use property name? ? ?
15. Please select the type of societies to apply for scholarships to apply for grants for
The drop-down box shows the value removed from the database that corresponds to the type of
16, obtained from the link parameters of the method: String strMsgId = request.getParameter ( "id");
17, The requested resource (/ qlsc /) is not available.
This is because the clean After no further build
18, if. Xml configuration there is no problem, then the page can be opened, is like a tree
19, in the event of two identical. Do, the program will not know security that should be handled, there will be a blank page!
20, mssqlserver.jar msbase.jar msutil.jar Kaodao common / lib, the will be a lot less mistakes
form.getXXX () method can not consecutively many times (for a property case) will be a very personal mistakes
Please select class:
In the select of the property = "classId", always report No getter method available for property className for bean under name org.apache.struts.taglib.html.BEAN
The root cause is the corresponding form in the jsp is not the corresponding attributes, and set get method.
22, even if the port is broken, but the database would also like to use the Internet plug line, because the tomcat / conf / server.xml to use the ip, changed to localhost, and DAO.java after the ip was changed to localhost The problem does not exist.
23, enctype = "multipart / form-data" seems to be used in the interface for the attachment If not, no, there will be outofmemoryerror error
24, No selector attribute (cookie / header / name / parameter) was specified because of <logic:match value=" The program complements " property="type" name="question">
<html:textarea property="complement" cols="20" rows="5"/>
</ logic: match>, the forgotten name attribute
org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save ():
Reasons: <id> element is configured incorrectly, <id> element of the lack of its child elements <generator> </ generator> configuration. Solution: <id> elements in the corresponding database table maps the primary key field, its sub-elements <generator>, in which class values for increment, identity, sequence, hilo, native ...... and so on, the general whichever value is native.
java.lang.IllegalArgumentException: id to load is required for loading
Program: Users user = (Users) this.getHibernateTemplate (). Get (Users.class, id); If the user name parameter can not use this method
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
Program: sql statement has an error
Serious: Error starting static Resources
java.lang.IllegalArgumentException: Document base D: \ Program Files \ Apache Software Foundation \ Tomcat 5.0 \ webapps \ tomcat-docs does not exist or is not a readable directory
Serious: Error in resourceStart ()
2007-6-6 23:32:25 org.apache.catalina.core.StandardContext start
Serious: Error getConfigured
2007-6-6 23:32:25 org.apache.catalina.core.StandardContext start
Serious: Context startup failed due to previous errors
2007-6-6 23:32:25 org.apache.catalina.core.StandardContext start
Serious: Exception during cleanup after start failed
LifecycleException: Container StandardContext [/ tomcat-docs] has not been started
5.jsf + spring + hibernate
Serious: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/ WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org / apache / commons / pool / impl / GenericObjectPool
Caused by: java.lang.NoClassDefFoundError: org / apache / commons / pool / impl / GenericObjectPool
Serious: Error listenerStart
2007-6-8 10:31:55 org.apache.catalina.core.StandardContext start
Serious: Context [/ shj01] startup failed due to previous errors
2007-6-8 10:31:55 org.apache.catalina.core.ApplicationContext log
Program: spring-framework-2.0.5 \ lib \ jakarta-commons under the commons-collections.jar commons-dbcp.jar commons-pool.jar loaded into the project to go
Serious: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
javax.faces.FacesException: Can't parse configuration file: jar: file: / E: / tools / apache-tomcat-6.0.9/apache-tomcat-6.0.9/webapps / jsf02/WEB-INF/lib/jsf -impl.jar! / com / sun / faces / standard-html-renderkit.xml
Program: the tomcat installation file for the location of all right
7.spring MVC + hibernate
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/ WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org. objectweb.asm.ClassVisitor.visit (IILjava / lang / String; Ljava / lang / String; [Ljava / lang / String; Ljava / lang / String;) V
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit (IILjava / lang / String; Ljava / lang / String; [Ljava / lang / String; Ljava / lang / String;) V
The use of Spring's AOP programming, we will use these lib:
Hibernate to use if lib:
Asm-2.2.2.jar and asm.jar where there is conflict in class! ! !
The use of one or both are used, may occur following error:
java.lang.NoClassDefFoundError: org / objectweb / asm / CodeVisitor
java.lang.NoClassDefFoundError: org / objectweb / asm / commons / EmptyVisitor
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit. . . . . .
The solution is:
1. Remove the class path of the three lib on Hibernate
2. Join the Spring of the following four lib
8.spring MVC + hibernate
Exception in thread "main" org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean] for bean with name 'userService' defined in ServletContext resource [/ WEB-INF/applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org / springframework / aop / framework / AbstractSingletonProxyFactoryBean
Caused by: java.lang.NoClassDefFoundError: org / springframework / aop / framework / AbstractSingletonProxyFactoryBean
Program: No Canadian spring 2.0 aop libraries
org.apache.jasper.JasperException: Unable to compile class for JSP:
Program: jsp page in the java code problem
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CompanyController' defined in class path resource [com / company / test / company-config.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'methodNameResolver' of bean class [com.company.action.CompanyController]: Bean property 'methodNameResolver' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'methodNameResolver' of bean class [com.company.action.CompanyController]: Bean property 'methodNameResolver' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Controller did not inherit MultiActionController
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'turDiffService' defined in class path resource [com / expert / test / expert-config.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'turDifficultDao' of bean class [com.expert.operation.impl.TurDiffSerImpl]: Bean property 'turDifficultDao' is not writable or has an invalid setter method. Did you mean 'truDifficultDao' ?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'turDifficultDao' of bean class [com.expert.operation.impl.TurDiffSerImpl]: Bean property 'turDifficultDao' is not writable or has an invalid setter method. Did you mean ' truDifficultDao '?
In the definition TurDifficultDao turDifficultDao, to have a letter written wrongly, found errors, change overnight, but not to get () set () method to change over the corresponding
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in class path resource [com / expert / test / expert-config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named''is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named''is defined
Created in the expert-config.xml
<prop key=""> </ prop>
Did not give <prop key=""> </ prop> assignment
org.springframework.orm.hibernate3.HibernateQueryException: Instruction is not mapped
[from Instruction]; nested exception is org.hibernate.hql.ast.QuerySyntaxException:
Instruction is not mapped [from Instruction]
Caused by: org.hibernate.hql.ast.QuerySyntaxException: Instruction is not mapped [from
Reason: In the data-config.xml in the Workers not <value> com / serializ / Instruction.hbm.xml </ value>
java.sql.SQLException: Field 'userId' doesn't have a default value
Reason: the configuration file of the primary key change <generator /> can customize the primary key value, because I did not set the primary key is set to grow automatically, requiring fill the default value is subject to the configuration file of the <generator/> .
16.org.apache.jasper.JasperException: Unable to compile class for JSP
Reason: jsp page in the java code in bracket asymmetry!
Related Posts of ssh error summary
The first is the company give you a chance to meet, it is necessary to know to meet from time to equal the interview, and have a lot of companies to see you at the first time will give you a ready point of doing something trivial, these questions, althoug
hibernate lock mechanism 1. Pessimistic lock It refers to the modification of data by outsiders hold a conservative attitude. The assumption that at any time access to data, may also have another client to access the same data, in order to maintain t ...
1. Entity Layer: Inheritance: All categories inherited from BasicEntity, one of BasicEntity implementation java.io.Serializable interface; Naming rules: Class Name = Object + type suffix, one of type suffix for Bean, such as: SalesOrderBean 2. Form l ...
Therefore, in the development of statistical inquiry system, as far as possible through the use of select statement to write the required query property way back relational data, and avoid using the first query return persistent object (in this way are in
[Problem] Now, in the development of the so-called multi-storey JavaEE applications, data persistence layer is always essential, and "Automatic" of ORM - Hibernate, and "all-manual-type" of SqlMap - IBatis, equivalent data are Per ...
The use of hibernate, implementation of data persistence. Has the following several processes. One configuration database connection information. Hibernate.config 2 configuration mapping. 3 use: the use of the process are the following steps: 3.1: Ge ...
myeclipsePlug-ins? 1.tomcatPlugin(Start tomcat )：http ://www.sysdeo.com/eclipse/tomcatPlugin.html,2.xVersions of eclipse 3 version 2 .1Version doesn't work. 2.Lomboz(Development of jsp program ,jspDynamic prompt, debugging ):http://forge.objectweb.org/pro
Servlet brief introduction: Servlet is a small application server Are used to complete the B / S architecture, the client requests the response to treatment Platform independence, performance, able to run thread Servlet API for Servlet provides the s ...
The origin of ideas are pretty long history of reasons: [Use iBATIS history] The use of iBATIS has been a long time, the system is to use the CRUD template tool to generate the code, although there are tools to generate, but looked at a lot of CRUD the Sq
hibernate Lazy strategy can be used in: <class> tag, it can be true / false Tags can <PROPERTY> values true / false type of necessary tools to enhance <set> <list> can tag values true / false / extra <many-to-one> <on ...