入手SpringSide 应用过程出现的异常~

版本:SpringSide3.2.2
数据库:MySql5.0
[b]异常1:[/b]

ognl.OgnlException: target is null for setProperty(null, "pageNo", [Ljava.lang.String;@18a80d4)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2219)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)

解决:
ArticleAction中page属性没有get方法:

public Page
getPage() {
return page;
}

[b]异常2:[/b]

org.hibernate.QueryException: could not resolve property: SUBJECT of: com.ht.entity.security.Article
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:67)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:61)

解决:


jsp页面属性名name(filter_LIKES_?)?处要与类中定义的一致。

[color=red]------分割线------数据库已修改为oracle10g :oops: [/color]
[b]异常3[/b]

2010-03-22 19:34:59,281 [http-8080-3] ERROR [500.jsp] -
java.lang.NullPointerException
at com.ht.sys.service.security.SecurityEntityManager.searchArticle(SecurityEntityManager.java:144)
at com.ht.sys.service.security.SecurityEntityManager$$FastClassByCGLIB$$bf90a3ab.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)

解决:
错误代码:

@Transactional(readOnly = true)
public Page
searchArticle(final Page
page, final List filters) {
return articleDao.findPage(page, filters);
}

articleDao未注入:

@Autowired
private ArticleDao articleDao;

加入@Autowired即可
这次真的大粗心了 :?
[b]异常4[/b]

org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
......~~...~
Caused by: java.sql.SQLException: ORA-00904: "THIS_"."JOB_STATUS": 标识符无效
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)

解决:
pojo类中我定义了属性jobStatus,
解析时解析为了JOB_STATUS,修改属性为jobstatus就ok了。
[b]异常5[/b]

ConstraintViolationException: could not insert: [com.ht.sys.entity.security.Recruitment]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
......
Caused by: java.sql.SQLException: ORA-01400: 无法将 NULL 插入...
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)

解决:
IdEntity类中id生成方式修改为:
@GeneratedValue(strategy = GenerationType.SEQUENCE)
[b]异常6[/b]

[http-8080-2] ERROR [500.jsp] - The list() is not defined in action class com.opensymphony.xwork2.ActionSupport
java.lang.IllegalArgumentException: The list() is not defined in action class com.opensymphony.xwork2.ActionSupport
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:454)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)

解决:

Action类,类与表大小写不一致等等

[b]异常7[/b]

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_filterChainList': Cannot create inner bean '(inner bean)' of type [org.springframework.security.config.OrderedFilterBeanDefinitionDecorator$OrderedFilterDecorator] while setting bean property 'filters' with key [10]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'filterSecurityInterceptor' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterSecurityInterceptor' defined in file [/data/cds/tomcat/webapps/cds/WEB-INF/classes/applicationContext-security.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Unsupported configuration attributes: [浏览角色, 修改用户, 浏览用户, 修改角色]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

解决:

初始化资源方法:
public LinkedHashMap getRequestMap() throws Exception {//NOSONAR
List resourceList = securityEntityManager.getUrlResourceWithAuthorities();

LinkedHashMap requestMap = new LinkedHashMap(resourceList.size());
for (Resource resource : resourceList) {
requestMap.put(resource.getValue(), resource.getAuthNames());
}
return requestMap;
}
中的此方法:
resource.getAuthNames():
return ReflectionUtils.convertElementPropertyToString(authorityList, "displayName", ",");
displayName修改为name

你可能感兴趣的:(应用)