gpt4 book ai didi

grails - Grails/Groovy转换异常

转载 作者:行者123 更新时间:2023-12-02 14:55:18 25 4
gpt4 key购买 nike

当我尝试使用最新的grails快照编译附加的groovy类时,出现以下异常。我今天从构建服务器上下来。异常(exception)中的主要注释是:如果这不是您自己做的,请将此错误报告给转换的编写者。

异常(exception):

/u01/workspace/grails/grails-spring-social-core/grails-app/domain/grails/plugins/springsocial/UserConnection.groovy: -1: A transform used a generics containing ClassNode grails.plugins.springsocial.UserConnection for the method public static grails.plugins.springsocial.UserConnection create() { ... }
directly. You are not suppposed to do this. Please create a new ClassNode refering to the old ClassNode and use the new ClassNode instead of the old one. Otherwise the compiler will create wrong descriptors and a potential NullPointerException in TypeResolver in the OpenJDK. If this is not your own doing, please report this bug to the writer of the transform.



因此,这看起来像是几个已报告的grails错误,但是它们在插件中被当作bug忽略了。这是grails问题还是常规问题?

谈到这可能是一个令人毛骨悚然的错误...但是这让我头疼。

http://comments.gmane.org/gmane.comp.lang.groovy.devel/26130

根本原因是什么?同样,这是grails变换的问题还是这是一个令人讨厌的编译器异常?以下类是我要编译的类:
package grails.plugins.springsocial

import groovy.transform.EqualsAndHashCode

@EqualsAndHashCode(includeFields=true)
class UserConnection implements Serializable {

String userId
String providerId
String providerUserId
String displayName
String profileUrl
String imageUrl
String accessToken
String secret
String refreshToken
Long rank
Long expireTime

static constraints = {
userId nullable: false
providerId nullable: false
providerUserId nullable: false
displayName nullable: true
profileUrl nullable: true
imageUrl nullable: true
accessToken nullable: false
secret nullable: true
refreshToken nullable: true
rank nullable: false
expireTime nullable: true
}

static mapping = {
table "UserConnection"
version false

id composite:['userId', 'providerId', 'providerUserId']

userId column:'userId',length:64
providerId column:'providerId',length:128
providerUserId column:'providerUserId',length:128
displayName column:'displayName'
profileUrl column:'profileUrl'
imageUrl column:'imageUrl'
accessToken column:'accessToken'
secret column:'secret'
refreshToken column:'refreshToken'
rank column:'rank'
expireTime column:'expireTime'
}
}

谢谢您的帮助!

最佳答案

最终成为Groovy 1.8.3问题。我降级为1.8.2,不再遇到此问题。

关于grails - Grails/Groovy转换异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7829549/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com