Exception java.lang.NoSuchMethodError: org.apache.wicket.AttributeModifier.append(Ljava/lang/String;Ljava/io/Serializable;)

走远了吗. 提交于 2019-12-25 06:47:19

问题


I tried to use an ObjectAutoCompleteBuilder to build ObjectAutoCompleteField as below:

ObjectAutoCompleteBuilder builder = new ObjectAutoCompleteBuilder(provider);
    builder.autoCompleteRenderer(renderer);

    final ObjectAutoCompleteField autocompleteField = builder.build("searchResource" , new Model());
    final TextField searchResource = autocompleteField.getSearchTextField();
    searchResource.setRequired(true);

but it has thrown this exception :

java.lang.NoSuchMethodError: org.apache.wicket.AttributeModifier.append(Ljava/lang/String;Ljava/io/Serializable;)Lorg/apache/wicket/behavior/AttributeAppender;

Does anyone have any idea why?


回答1:


You're using the wrong version of Wicket (1.4.17) for the WicketStuff project you're using (1.5.4).

From the WicketStuff wiki:

Our release process allows end users an easy way to track a project relative to the wicket release cycle.

For example, if a user sees a org.wicketstuff:someproject artifact with a version of 1.4.16.1 they can know immediately that it is based on wicket 1.4.16 and that it is the first point release (the 1.4.16 version would have been the original release).

So you need Wicket 1.5 - or find a version of autocomplete based on 1.4.17.



来源:https://stackoverflow.com/questions/9125704/exception-java-lang-nosuchmethoderror-org-apache-wicket-attributemodifier-appen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!