当 Grails 域类从 EJB 扩展时出现的问题
当我有一个从作为 EJB 的 UserT 类扩展的 grails 域类 User 时,在 User() 实例化中会抛出错误。我不明白这个问题的原因,请帮助我并解释为什么需要 init 方法以及它应该在哪里。以下是错误代码:
Error creating bean with name 'gn.User': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gn.User]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.jobs.users.UserT: method <init>()V not found
When I has a grails domain class User that extends from a UserT class that is an EJB, in the User() instantiation throw an error. I understand not the cause of this problem, please help me for it and explain me why require the init method and where should be it. The follow is the error code:
Error creating bean with name 'gn.User': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gn.User]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.jobs.users.UserT: method <init>()V not found
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
超类有默认构造函数吗?我认为它需要一个。
Does the super class have a default constructor? I think it needs one.