2015-02-06 108 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