ssh框架遇到的标题计算

1.org.springframework.beans.factory.BeanCreationException: Error
creating bean with name ‘dataSource’ defined in class path resource
[applicationContext.xml]: Error setting property values; nested
exception is org.springframework.beans.NotWritablePropertyException:
Invalid property ‘driverName’ of bean class
[com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property
‘driverName’ is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?

1.org.springframework.beans.factory.BeanCreationException: Error
creating bean with name ‘dataSource’ defined in class path resource
[applicationContext.xml]: Error setting property values; nested
exception is org.springframework.beans.NotWritablePropertyException:
Invalid property ‘driverName’ of bean class
[com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property
‘driverName’ 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 ‘driverName’ of bean class
[com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property
‘driverName’ is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?
荒谬翻译过来正是:driverClassName 名小编com.mchange.v2.c3p0.ComboPooledDataSource不认得,改个自身认识的,否则笔者罢工
解决:改名
driverClassName –>driverClass
url –>jdbcUrl
username –>user
password—>password

Caused by: org.springframework.beans.NotWritablePropertyException:
Invalid property ‘driverName’ of bean class
[com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property
‘driverName’ is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?
谬误翻译过来就是:driverClassName 名我com.mchange.v2.c3p0.ComboPooledDataSource不认得,改个自小编认识的,不然作者罢工
解决:改名
driverClassName –>driverClass
url –>jdbcUrl
username –>user
password—>password

2.Caused by: java.lang.NoClassDefFoundError:
javax/transaction/SystemException
解决:确少geronimo-jta jar包

2.Caused by: java.lang.NoClassDefFoundError:
javax/transaction/SystemException
解决:确少geronimo-jta jar包

 

 

3.Caused by: org.springframework.beans.PropertyBatchUpdateException;
nested PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property
‘dataSource’ threw exception; nested exception is
java.lang.NoClassDefFoundError:
org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy
解决:<!– 配置事务 –>
<bean id=”transactionManager”
class=”org.springframework.orm.hibernate5.HibernateTransactionManager”>
<property name=”dataSource”
ref=”dataSource”></property>//那里并非用dataSource.改用sessionFactory
</bean>

3.Caused by: org.springframework.beans.PropertyBatchUpdateException;
nested PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property
‘dataSource’ threw exception; nested exception is
java.lang.NoClassDefFoundError:
org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy
解决:<!– 配置事务 –>
<bean id=”transactionManager”
class=”org.springframework.orm.hibernate5.HibernateTransactionManager”>
<property name=”dataSource”
ref=”dataSource”></property>//那里并非用dataSource.改用sessionFactory
</bean>

4.Caused by: java.lang.ClassNotFoundException:
org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy
解决:确少spring-jdbc-4.2.4.RELEASE.jar包

4.Caused by: java.lang.ClassNotFoundException:
org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy
解决:确少spring-jdbc-4.2.4.RELEASE.jar包

5.HTTP Status 500 – Write operations are not allowed in read-only mode
(FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or
remove ‘readOnly’ marker from transaction definition.
严重: Exception occurred during processing request: Write operations are
not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into
FlushMode.COMMIT/AUTO or remove ‘readOnly’ marker from transaction
definition.
org.springframework.dao.InvalidDataAccessApiUsageException: Write
operations are not allowed in read-only mode (FlushMode.MANUAL): Turn
your Session into FlushMode.COMMIT/AUTO or remove ‘readOnly’ marker from
transaction definition.

5.HTTP Status 500 – Write operations are not allowed in read-only mode
(FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or
remove ‘readOnly’ marker from transaction definition.
严重: Exception occurred during processing request: Write operations are
not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into
FlushMode.COMMIT/AUTO or remove ‘readOnly’ marker from transaction
definition.
org.springframework.dao.InvalidDataAccessApiUsageException: Write
operations are not allowed in read-only mode (FlushMode.MANUAL): Turn
your Session into FlushMode.COMMIT/AUTO or remove ‘readOnly’ marker from
transaction definition.

缓解:在service的类上丰富@Transactional注明

消除:在service的类上添加@Transactional声明

6.Bean ‘sessionFactory’; nested exception is
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Tag ‘property’ must have a ‘name’ attribute
Offending resource: class path resource [applicationContext.xml]
Caused by:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Tag ‘property’ must have a ‘name’ attribute
Offending resource: class path resource [applicationContext.xml]

6.Bean ‘sessionFactory’; nested exception is
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Tag ‘property’ must have a ‘name’ attribute
Offending resource: class path resource [applicationContext.xml]
Caused by:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Tag ‘property’ must have a ‘name’ attribute
Offending resource: class path resource [applicationContext.xml]

解决:<!– 配置hibernate映射文件 –>时<property
name=””>的值忘记写了

解决:<!– 配置hibernate映射文件 –>时<property
name=””>的值忘记写了

7.Caused by: java.lang.ClassNotFoundException:
com.mchange.v2.ser.Indirector”
解决:缺少mchange-commons-java-0.2.3.4.jar

7.Caused by: java.lang.ClassNotFoundException:
com.mchange.v2.ser.Indirector”
解决:缺少mchange-commons-java-0.2.3.4.jar

8.java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
解决:缺少mysql驱动jar包

8.java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
解决:缺少mysql驱动jar包

9.Could not load requested class : com.ssh.entity.User
焚薮而田:因为pojo里的文书,xml的文本以及数据Curry的文本之间的照耀失常

9.Could not load requested class : com.ssh.entity.User
斩草除根:因为pojo里的文本,xml的文本以及数据Curry的文本之间的映照有失水准

Caused by: org.springframework.aop.framework.AopConfigException: Cannot
proxy target class because CGLIB2 is not available. Add CGLIB to the
class path or specify proxy interfaces.
杀鸡取卵:大概jar包重复也可能不够cglib-2.1.3.jar

Caused by: org.springframework.aop.framework.AopConfigException: Cannot
proxy target class because CGLIB2 is not available. Add CGLIB to the
class path or specify proxy interfaces.
化解:或然jar包重复也说不定不够cglib-2.1.3.jar

10.No result defined for action com.ssh.action.UserAction and result
success
化解:是Struts.xml配置难题

10.No result defined for action com.ssh.action.UserAction and result
success
消除:是Struts.xml配置难题

11.Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Emp
is not mapped [from Emp]
缓解:applicationContext中尚无加载*.hbm.xml映射文件

11.Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Emp
is not mapped [from Emp]
化解:applicationContext中从不加载*.hbm.xml映射文件

12.Caused by: org.hibernate.boot.MappingException: Association
[com.ssh.entity.Dept.setEmp] references an unmapped entity
[com.ssh.entity.Dept.setEmp] : origin(null)

12.Caused by: org.hibernate.boot.MappingException: Association
[com.ssh.entity.Dept.setEmp] references an unmapped entity
[com.ssh.entity.Dept.setEmp] : origin(null)

缓解:是xxx.hbm.xml中<class name=”com.ssh.entity.User”
table=”user”>name中的路径应该是xxx实体类的途径,结果写到别的的实体类的路径了

斩草除根:是xxx.hbm.xml中<class name=”com.ssh.entity.User”
table=”user”>name中的路径应该是xxx实体类的不二法门,结果写到别的的实体类的不二法门了

13.Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘deptDaoImpl’ defined in class path
resource [applicationContext.xml]: Error setting property values;
nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
‘sessionFactory’ of bean class [com.ssh.dao.impl.DeptDaoImpl]: Bean
property ‘sessionFactory’ is not writable or has an invalid setter
method. Does the parameter type of the setter match the return type of
the getter?
消除:没有依赖注入

13.Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘deptDaoImpl’ defined in class path
resource [applicationContext.xml]: Error setting property values;
nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
‘sessionFactory’ of bean class [com.ssh.dao.impl.DeptDaoImpl]: Bean
property ‘sessionFactory’ is not writable or has an invalid setter
method. Does the parameter type of the setter match the return type of
the getter?
化解:没有信赖注入

14.严重: Servlet.service() for servlet [jsp] threw exception
javax.el.PropertyNotFoundException: Property [id] not found on type
[java.lang.String]

14.严重: Servlet.service() for servlet [jsp] threw exception
javax.el.PropertyNotFoundException: Property [id] not found on type
[java.lang.String]

化解:jsp中输出的id与实体类的eid不雷同<c:forEach items=”list”
var=”emp”>或然是<c:forEach items=”list”
var=”emp”>items中应当写成${list }
<td>${emp.id }</td>

缓解:jsp中输出的id与实体类的eid差异<c:forEach items=”list”
var=”emp”>只怕是<c:forEach items=”list”
var=”emp”>items中应该写成${list }
<td>${emp.id }</td>

15.Caused by: org.hibernate.MappingException: Duplicate property mapping
of ename found in com.ssh.entity.Emp
消除:xxx.hbm.xml映射文件中有双重字段

15.Caused by: org.hibernate.MappingException: Duplicate property mapping
of ename found in com.ssh.entity.Emp
不留余地:xxx.hbm.xml映射文件中有重新字段

16.HTTP Status 500 – not-null property references a null or transient
value : com.ssh.entity.Emp.esex; nested exception is
org.hibernate.PropertyValueException: not-null property references a
null or transient value : com.ssh.entity.Emp.esex
焚林而猎:是xxx.hbm.xml中的属性设置为不可能为空,可是小编前台表单中的数据填充为空了。

16.HTTP Status 500 – not-null property references a null or transient
value : com.ssh.entity.Emp.esex; nested exception is
org.hibernate.PropertyValueException: not-null property references a
null or transient value : com.ssh.entity.Emp.esex
消除:是xxx.hbm.xml中的属性设置为不可能为空,然而本身前台表单中的数据填充为空了。

17.org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unnamed bean definition specifies neither ‘class’
nor ‘parent’ nor ‘factory-bean’ – can’t generate bean name
Offending resource: class path resource [springmvc.xml]
缓解:由于:bean
没有安顿一体化,少了class等属性的配备也许布置了空的bean<bean></bean>

17.org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unnamed bean definition specifies neither ‘class’
nor ‘parent’ nor ‘factory-bean’ – can’t generate bean name
Offending resource: class path resource [springmvc.xml]
化解:由于:bean
没有配置一体化,少了class等品质的配置或许配置了空的bean<bean></bean>

18.java.lang.IllegalArgumentException: Expected
MultipartHttpServletRequest: is a MultipartResolver configured?
缓解:那是因为找不到multipartReslover的因由,在springMVC配置文件配置它的时候,不可能用其余名字,只好用钦命名字id=”multipartResolver”,否则就应运而生那种找不到的不当。

18.java.lang.IllegalArgumentException: Expected
MultipartHttpServletRequest: is a MultipartResolver configured?
杀鸡取蛋:这是因为找不到multipartReslover的由来,在springMVC配置文件配置它的时候,无法用别的名字,只可以用钦定名字id=”multipartResolver”,不然就出现那种找不到的不当。

Caused by: 成分类型为 “struts” 的始末必须匹配
“((package|include|bean|constant)*,unknown-handler-stack?)”。 –
file:/E:/JavaDeveleper/apache-tomcat-9.0.0.M22/webapps/shop/WEB-INF/classes/struts.xml:17:10
缓解:Struts.xml配置文件中的action要写在package中

Caused by: 成分类型为 “struts” 的始末必须匹配
“((package|include|bean|constant)*,unknown-handler-stack?)”。 –
file:/E:/JavaDeveleper/apache-tomcat-9.0.0.M22/webapps/shop/WEB-INF/classes/struts.xml:17:10
缓解:Struts.xml配置文件中的action要写在package中

19.java.lang.NoSuchMethodException:
com.opensymphony.xwork2.ActionSupport.listAll()
缓解:spring.xml宗旨配置文件忘记配置给应类的Javabean实例化

19.java.lang.NoSuchMethodException:
com.opensymphony.xwork2.ActionSupport.listAll()
化解:spring.xml宗旨配置文件忘记配置给应类的Javabean实例化

20.Caused by: Action class [userAction] not found – action –
file:/C:/Users/smfx1314/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/sshtest/WEB-INF/classes/struts.xml:7:63
java.lang.NoSuchMethodException: com.ssh.action.UserAction.save()

20.Caused by: Action class [userAction] not found – action –
file:/C:/Users/smfx1314/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/sshtest/WEB-INF/classes/struts.xml:7:63
java.lang.NoSuchMethodException: com.ssh.action.UserAction.save()

竭泽而渔:原因是缺点和失误jar包:struts2-spring-plugin-2.1.8.jar要么清理缓存,project

化解:原因是缺少jar包:struts2-spring-plugin-2.1.8.jar可能清理缓存,project

21.There is no Action mapped for namespace [/] and action name
[delete] associated with context path [/sshtest]. – [unknown
location]
缓解:Struts.xml中的action方法应用的是user_*的法子,在jsp页面中或其余请求中尚无如约user_*的主意呼吁,加上前缀user就能够了

21.There is no Action mapped for namespace [/] and action name
[delete] associated with context path [/sshtest]. – [unknown
location]
化解:Struts.xml中的action方法运用的是user_*的方式,在jsp页面中或别的请求中绝非遵照user_*的办法呼吁,加上前缀user就足以了