org.springframework.orm.hibernate3.HibernateSystemException:调用 getter 时发生 IllegalArgumentException
我面临如下所示的问题,
IllegalArgumentException occurred calling getter of org.springframework.security.oauth.examples.sparklr.models.Authority.user;
nested exception is org.hibernate.PropertyAccessException:
IllegalArgumentException occurred calling getter of org.springframework.security.oauth.examples.sparklr.models.Authority.user
我的休眠依赖项是:
- hibernate-core 3.3.2.GA
- hibernate-annotations 3.4.0.GA
- hibernate-commons-annotations 3.3.0.ga
- hibernate-entitymanager 3.4.0.GA
public class User implements UserDetails,Serializable {
/** Serial Version UID. */
private static final long serialVersionUID = -558892839L;
/** Use a WeakHashMap so entries will be garbage collected once all entities
referring to a saved hash are garbage collected themselves. */
private static final Map<Serializable, String> SAVED_HASHES =
Collections.synchronizedMap(new WeakHashMap<Serializable, String>());
/** hashCode temporary storage. */
private volatile String hashCode;
/** Field mapping. */
private Boolean accountnonexpired;
/** Field mapping. */
private Boolean accountnonlocked;
/** Field mapping. */
private List<Authority> authorities = new ArrayList<Authority>();
/** Field mapping. */
private Boolean credentialsnonexpired;
/** Field mapping. */
private Boolean enabled;
/** Field mapping. */
private String id;
/** Field mapping. */
private String password;
public class Authority implements Serializable ,GrantedAuthority {
/** Serial Version UID. */
private static final long serialVersionUID = -558892840L;
/** Use a WeakHashMap so entries will be garbage collected once all entities
referring to a saved hash are garbage collected themselves. */
private static final Map<Serializable, Serializable> SAVED_HASHES =
Collections.synchronizedMap(new WeakHashMap<Serializable, Serializable>());
/** hashCode temporary storage. */
private volatile Serializable hashCode;
/** Field mapping. */
private String authority;
/** Field mapping. */
private User user;
我该如何解决谢谢你太喜欢了
i face a problem shown below
IllegalArgumentException occurred calling getter of org.springframework.security.oauth.examples.sparklr.models.Authority.user;
nested exception is org.hibernate.PropertyAccessException:
IllegalArgumentException occurred calling getter of org.springframework.security.oauth.examples.sparklr.models.Authority.user
my hibernate dependencies are:
- hibernate-core 3.3.2.GA
- hibernate-annotations 3.4.0.GA
- hibernate-commons-annotations 3.3.0.ga
- hibernate-entitymanager 3.4.0.GA
public class User implements UserDetails,Serializable {
/** Serial Version UID. */
private static final long serialVersionUID = -558892839L;
/** Use a WeakHashMap so entries will be garbage collected once all entities
referring to a saved hash are garbage collected themselves. */
private static final Map<Serializable, String> SAVED_HASHES =
Collections.synchronizedMap(new WeakHashMap<Serializable, String>());
/** hashCode temporary storage. */
private volatile String hashCode;
/** Field mapping. */
private Boolean accountnonexpired;
/** Field mapping. */
private Boolean accountnonlocked;
/** Field mapping. */
private List<Authority> authorities = new ArrayList<Authority>();
/** Field mapping. */
private Boolean credentialsnonexpired;
/** Field mapping. */
private Boolean enabled;
/** Field mapping. */
private String id;
/** Field mapping. */
private String password;
public class Authority implements Serializable ,GrantedAuthority {
/** Serial Version UID. */
private static final long serialVersionUID = -558892840L;
/** Use a WeakHashMap so entries will be garbage collected once all entities
referring to a saved hash are garbage collected themselves. */
private static final Map<Serializable, Serializable> SAVED_HASHES =
Collections.synchronizedMap(new WeakHashMap<Serializable, Serializable>());
/** hashCode temporary storage. */
private volatile Serializable hashCode;
/** Field mapping. */
private String authority;
/** Field mapping. */
private User user;
how can i solve thank you so much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从您显示的代码来看,您没有
Authority
的user
属性的 getter。尝试添加
from the code you have shown, you don't have a getter for the
user
property ofAuthority
.Try adding