技术文章 - CS382596

建模的 enumeratedType 已使用 tools.xml 编译(成功)但由于错误“未解决的编译问题:”而无法使用

已修改: 31-Jan-2023   


注意:本文已使用机器翻译软件翻译,以方便非英语客户阅读。但翻译内容可能包含语法错误或不准确之处。请注意, PTC对本文所含信息的翻译准确性及使用后果不承担任何责任。请在 此处 查看本文的英文原始版本以便参考。有关机器翻译的更多详情,请单击 此处
感谢您告诉我们。我们将尽快审阅此译文。

适用于

  • Windchill PDMLink 12.0.2.8

说明

  • 建模类已成功编译但由于错误而无法使用
"The import com.ptc.windchill.annotations.metadata.GenAsEnumeratedType cannot be resolved"

或者
Caused by: java.lang.Error: Unresolved compilation problem:
    GenAsEnumeratedType is not an annotation type

    at ext.ts.the.modelled.enums.MySize.<init>(MySize.java:21)
    at ext.ts.the.modelled.enums._MySize.<clinit>(_MySize.java:8)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:315)
    at wt.workflow.definer.WfVariableInfo.getVariableClass(WfVariableInfo.java:1009)
    at com.ptc.windchill.enterprise.initiateworkflow.service.impl.InitiateWorkflowServiceImpl.getTemplate(InitiateWorkflowServiceImpl.java:254)
    at com.ptc.enterprise.initiateworkflow.rest.InitiateWorkflowResource.getTemplate(InitiateWorkflowResource.java:177)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138)
    at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:546)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:435)
    at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:396)
    at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:398)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:365)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:338)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:440)
    ... 50 more
  • compiling with
    ant -f bin\tools.xml class -Dclass.includes=ext/ts/the/modelled/enums/**

这是文章 382596 的 PDF 版本,可能已过期。最新版本 CS382596