2015-02-06 77 views
3

我升级2.3应用2.4.4,我在启动时得到一个奇怪的错误:Grails的2.4.4无法创建codecLookup豆

Caused by BeanCreationException: Error creating bean with name 'codecLookup': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have text; it must not be null, empty, or blank 
->> 788 | callContextInitialized in org.eclipse.jetty.server.handler.ContextHandler 

有没有人见过这个还是可以给我任何可能导致它的指针?

回答

3

我明白了这一点。我在的grails-app/utils的一对夫妇的子类中定义沿着一个抽象基编解码器,即

grails-app/utils/ 
       BaseCodec.groovy 
       MyCodec.groovy 

abstract class BaseCodec { 
... 
} 

class MyCodec extends BaseCodec { 
... 
} 

然而,在这2.3+曾在2.4 Grails的不喜欢utils的抽象类,所以我把它to src/groovy:

src/groovy/BaseCodec.groovy 
grails-app/utils/MyCodec.groovy 

这解决了错误。我认为从现在开始,所有抽象的'grails托管'类(编解码器,服务,域等)都应该放在src/groovy