为什么我得到FormProxyObject错误?

时间:2016-10-25 13:35:15

标签: java zk

我的代码简短:

Executions.createComponents(" page / articles / translation / editTranslation.zul",null,args); - >调用zul文件,其中是一个表单。

editTranslation:

<window id="editTranslation"
        title="Nyelvesítés szerkesztése"
        width="50%" closable="true"
        apply="org.zkoss.bind.BindComposer"
        height="auto" border="normal" minimizable="false"
        mode="modal" maximizable="false"
        onCancel="@command('cancel')"
        viewModel="@id('vm') @init('hu.gamax.viewmodel.articles.translation.EditTranslationViewModel')" >
    <grid hflex="max" style="border: none" oddRowSclass="non-odd"
          form="@id('fx') @load(vm.trans) @save(vm.trans, before='save')">
        <columns>
            <column hflex="min" />
            <column hflex="max" />
        </columns>
        <rows style="background: #fff;">
            <row>
                <label value="${labels.article.translation.title}"/>
                <textbox value="@bind(fx.title)" onChange="@command('unpublished')" width="100%"/>
            </row>
        </rows>
      </grid>
    </window>
</zk>

及其viewModel:

@Init
public void init(@ExecutionArgParam("translation") Translation translation,
                 @ExecutionArgParam("filter") FilterGUI filter,
                 @ExecutionArgParam("id") String articleId) throws NamingException {
    System.err.println("------EditTranslationViewModel init-----");
    initTranslation(translation);
    System.err.println("------EditTranslationViewModel init END-----");
}

    private void initTranslation(Translation translation){
    Translation trans = new Translation();
    trans.setAbstract(translation.getAbstract());
    trans.setBackground(translation.getBackground());
    trans.setTitle(translation.getTitle());
    this.trans = trans;

}

我不知道为什么我总是得到formproxy错误....我新的zk框架...我试图为类或翻译类的getter-setter添加Immutable ...并添加空参数构造函数模型类,但它不工作....谁能帮助我?非常感谢!!!

- - - - --- UPDATE 我得到了这个错误的堆栈跟踪:(但是对于vm工作代码和vm.trans不....当我将@Immutable添加到getTrans()时)。我不知道为什么:S 这是一个很大的堆栈跟踪,但我希望我能得到更重要的部分并复制到这里。

Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: org/zkoss/bind/proxy/FormProxyObject
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:170)
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:507)
... 123 more
Caused by: java.lang.NoClassDefFoundError: org/zkoss/bind/proxy/FormProxyObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:182)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164)
... 124 more
Caused by: java.lang.ClassNotFoundException: org.zkoss.bind.proxy.FormProxyObject from [Module "deployment.kit-ear.ear.kit-ejb.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
... 131 more

0 个答案:

没有答案