0

我正在尝试在处女座上运行 iDempiere。我加载了多个包没有问题。和加载正常org.adempiere.serverorg.idempiere.webservices但是在加载org.adempiere.ui.zk捆绑包时,我NoClassDefFoundErrororg.adempiere.base捆绑包中得到了一个。基本包在加载时没有引起任何问题org.adempiere.server,它也需要它。

奇怪的是,javax.print.attribute.standard.MediaSize$NA找不到的类是标准的Java类。

当执行时clexport,该类被导出。org.eclipse.osgi 当执行时clload,该类可以被其他包加载。

错误堆栈:

[2012-10-24 20:34:23.592] INFO  fs-watcher                   o.e.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener     ApplicationConditionallyDeploying path 'D:\VIRGO-~1.REL\pickup\org.adempiere.ui.zk_1.0.0.v20121024-1809\'. 
[2012-10-24 20:34:23.777] INFO  start-signalling-1           org.compiere.web.AdempiereMonitorFilter                            
[2012-10-24 20:34:23.809] ERROR start-signalling-1           o.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]   StandardWrapper.Throwable java.lang.NoClassDefFoundError: javax/print/attribute/standard/MediaSize$NA
    at org.compiere.util.Language.<clinit>(Language.java:101)
    at org.compiere.util.Ini.<clinit>(Ini.java:85)
    at org.compiere.util.WebEnv.initWeb(WebEnv.java:162)
    at org.compiere.util.WebEnv.initWeb(WebEnv.java:129)
    at org.compiere.web.AdempiereMonitor.init(AdempiereMonitor.java:1049)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:125)
    at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:95)
    at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)
    at org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStarted(StandardArtifactStateMonitor.java:271)
    at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:319)
    at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:316)
    at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:252)
    at org.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:140)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: javax.print.attribute.standard.MediaSize$NA in KernelBundleClassLoader: [bundle=org.adempiere.base_1.0.0.v20121024-1809]
    at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:139)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 25 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.print.attribute.standard.MediaSize$NA
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
    ... 26 common frames omitted

知道是什么原因造成的吗?

4

1 回答 1

3

我看到一个:

Caused by: java.lang.ClassNotFoundException: javax.print.attribute.standard.MediaSize$NA

这是 CNFE 而不是 NoClassDefFoundError

在模块“org.adempiere.base_1.0.0.v20121024-1809”中,您需要:

Import-Package: javax.print.attribute.standard

FWIW 这是为该模块添加/合并到 MANIFEST.MF 中的条目。

于 2012-10-25T10:01:05.340 回答