无法从Adempiere Class创建Model Class

时间:2015-07-29 08:06:54

标签: java adempiere

我有这个表C_InvoiceTaxDetail,我正在尝试创建一个名为MInvoiceTaxDetail的模型类。

现在我创建了类,将它放在org.compiere.model和扩展X_C_InvoiceTaxDetail类中。 但仍然aftersave方法只有在我将它放在X_C_InvoiceTaxDetail中并且如果我将它放在MInvoiceTaxDetail中时会产生以下错误:

===========> GridTable.dataSave: Persistency Issue - C_INVOICETAX_DETAIL: org/compiere/model/MINVOICETAXDETAIL (wrong name: org/compiere/model/MInvoiceTaxDetail) [20]
java.lang.NoClassDefFoundError: org/compiere/model/MINVOICETAXDETAIL (wrong name: org/compiere/model/MInvoiceTaxDetail)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:191)
    at org.compiere.model.MTable.getPOclass(MTable.java:360)
    at org.compiere.model.MTable.getClass(MTable.java:300)
    at org.compiere.model.MTable.getPO(MTable.java:537)
    at org.compiere.model.GridTable.dataSavePO(GridTable.java:2049)
    at org.compiere.model.GridTable.dataSave(GridTable.java:1467)
    at org.compiere.model.GridTab.dataSave(GridTab.java:983)
    at org.compiere.apps.APanel.cmd_save(APanel.java:2045)
    at org.compiere.apps.APanel.actionPerformed(APanel.java:1708)
    at org.compiere.apps.AppsAction.actionPerformed(AppsAction.java:286)

1 个答案:

答案 0 :(得分:-1)

确保在添加新类后运行Generate Model实用程序。您可以在Adempiere维基链接中找到完整的详细信息。