0

只是尝试使用在 eclipse 中加载的 Orbeon API:

在重新配置构建路径并定义所有未更新的 jars 依赖项之后,我终于被这个未正确加载的 scala 类所困扰?

请问有什么帮助吗?

[scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContainingDocument.java:62: error: not found: type XBLContainer
   [scalac] public class XFormsContainingDocument extends XBLContainer implements XFormsDocumentLifecycle, Cacheable, XFormsObject {
   [scalac]                                               ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/resources/ResourceNotFoundException.java:21: error: not found: type OXFException
   [scalac] public class ResourceNotFoundException extends OXFException {
   [scalac]                                                ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/common/PEVersion.scala:57: error: fruitless type test: a value of type Throwable cannot also be a org.orbeon.oxf.resources.ResourceNotFoundException
   [scalac]                         case e: ResourceNotFoundException ?
   [scalac]                                 ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/pipeline/api/ExternalContext.java:164: error: not found: type WebAppContext
   [scalac]     WebAppContext getWebAppContext();
   [scalac]     ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/processor/ProcessorImpl.java:108: error: not found: type PropertySet
   [scalac]     protected PropertySet getPropertySet() {
   [scalac]               ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/controller/PageFlowControllerProcessor.scala:224: error: type mismatch;
   [scalac]  found   : Any
   [scalac]  required: String
   [scalac]                     Seq(PageOrServiceElement(None, submissionPath, Pattern.compile(submissionPath), None, submissionModel, None, configRoot, SubmissionPublicMethods, isPage = true))
   [scalac]                                                    ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/controller/PageFlowControllerProcessor.scala:275: error: could not find implicit value for parameter propertySet: org.orbeon.oxf.properties.PropertySet
   [scalac]                 case page: PageOrServiceElement ? PageOrServiceRoute(page, compile)
   [scalac]                                                                     ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/controller/PageFlowControllerProcessor.scala:91: error: fruitless type test: a value of type Throwable cannot also be a org.orbeon.oxf.resources.ResourceNotFoundException
   [scalac]                 case e: ResourceNotFoundException ? e.resource
   [scalac]                         ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/controller/PageFlowControllerProcessor.scala:171: error: fruitless type test: a value of type Throwable cannot also be a org.orbeon.oxf.resources.ResourceNotFoundException
   [scalac]                         case e: ResourceNotFoundException                        ? if (route.isPage) runNotFoundRoute(Some(t)) else sendNotFound(Some(t))
   [scalac]                                 ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/XFormsAPI.scala:219: error: value models is not a member of org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]         containingDocument.models find (_.getId == modelId)
   [scalac]                            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContainingDocument.java:591: error: not found: type RequestStats
   [scalac]     public RequestStats getRequestStats() {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/model/DataModel.scala:181: error: value getInstanceForNode is not a member of org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]         Option(containingDocument.getInstanceForNode(nodeInfo)) map (_.getEffectiveId)
   [scalac]                                   ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/model/DataModel.scala:190: error: value getInstanceForNode is not a member of org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]         Option(containingDocument.getInstanceForNode(nodeInfo)) match {
   [scalac]                                   ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/model/DataModel.scala:193: error: value markModified is not a member of Any
   [scalac]                 modifiedInstance.markModified()
   [scalac]                                  ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/model/DataModel.scala:194: error: value model is not a member of Any
   [scalac]                 modifiedInstance.model.markValueChange(nodeInfo, isCalculate)
   [scalac]                                  ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/model/DataModel.scala:197: error: type mismatch;
   [scalac]  found   : Any
   [scalac]  required: org.orbeon.oxf.xforms.event.XFormsEventTarget
   [scalac]                 Dispatch.dispatchEvent(new XXFormsValueChangedEvent(modifiedInstance, nodeInfo, oldValue, newValue))
   [scalac]                                                                     ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsModel.java:58: error: not found: type XFormsEventObserver
   [scalac] public class XFormsModel extends XFormsModelBase implements XFormsEventObserver, XFormsObjectResolver {
   [scalac]                                                             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsModel.java:210: error: not found: type Model
   [scalac]     public Model getStaticModel() {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/fb/ControlOps.scala:581: error: constructor cannot be instantiated to expected type;
   [scalac]  found   : (T1, T2)
   [scalac]  required: Nothing
   [scalac]             controlId ? findControlIdByName(getFormDoc, controlName)
   [scalac]             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsModel.java:206: error: not found: type XBLContainer
   [scalac]     public XBLContainer container() {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/ControlTree.java:258: error: not found: type XFormsContainerControl
   [scalac]     public XFormsContainerControl getRoot() {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/pipeline/InitUtils.scala:92: error: fruitless type test: a value of type Throwable cannot also be a org.orbeon.oxf.resources.ResourceNotFoundException
   [scalac]                     case e: ResourceNotFoundException ?
   [scalac]                             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/portlet/Portlet2ExternalContext.java:73: error: not found: type WebAppContext
   [scalac]     Portlet2ExternalContext(PipelineContext pipelineContext, WebAppContext webAppContext, PortletRequest portletRequest, boolean amendRequest) {
   [scalac]                                                              ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/processor/EmailProcessor.scala:74: error: could not find implicit value for parameter propertySet: org.orbeon.oxf.properties.PropertySet
   [scalac]             valueFromElementOrProperty(messageElement, SMTPHost) getOrElse
   [scalac]                                       ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/processor/EmailProcessor.scala:104: error: could not find implicit value for parameter propertySet: org.orbeon.oxf.properties.PropertySet
   [scalac]                 valueFromElementOrProperty(messageElement, Encryption) match {
   [scalac]                                           ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/processor/EmailProcessor.scala:134: error: could not find implicit value for parameter propertySet: org.orbeon.oxf.properties.PropertySet
   [scalac]             valueFromElementOrProperty(messageElement, SMTPPort) orElse defaultPort foreach updatePort
   [scalac]                                       ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/servlet/ServletExternalContext.java:697: error: not found: type WebAppContext
   [scalac]     public ServletExternalContext(PipelineContext pipelineContext, WebAppContext webAppContext, HttpServletRequest request, HttpServletResponse response) {
   [scalac]                                                                    ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/xbl/XBLContainer.scala:76: error: fruitless type test: a value of type org.orbeon.oxf.xforms.xbl.XBLContainer cannot also be a org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]     val containingDocument = ancestorsIterator collectFirst { case cd: XFormsContainingDocument ? cd } get
   [scalac]                                                                        ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/BindingContext.scala:166: error: value getInstanceForNode is not a member of org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]             { case node: NodeInfo ? model.containingDocument.getInstanceForNode(node) } orNull
   [scalac]                                                              ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/XFormsInstance.scala:155: error: type mismatch;
   [scalac]  found   : org.orbeon.oxf.xforms.XFormsModel
   [scalac]  required: org.orbeon.oxf.xforms.event.XFormsEventObserver
   [scalac]     def parentEventObserver: XFormsEventObserver = model
   [scalac]                                                    ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/ControlTree.java:280: error: not found: type XFormsControl
   [scalac]     public Map<String, XFormsControl> getRepeatControls() {
   [scalac]                        ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/XFormsInstance.scala:223: error: value getEffectiveId is not a member of type parameter B
   [scalac]                 newRepeatControl ? Option(controls.getObjectByEffectiveId(repeatControl.getEffectiveId).asInstanceOf[XFormsRepeatControl])
   [scalac]                                                                                         ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsModel.java:65: error: not found: type Model
   [scalac]     public final Model staticModel;
   [scalac]                  ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/analysis/XFormsExtractorContentHandler.java:138: error: not found: type AnnotatedTemplate
   [scalac]             AnnotatedTemplate templateUnderConstruction,
   [scalac]             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsSetindexAction.scala:62: error: value synchronizeAndRefresh is not a member of org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]             interpreter.containingDocument.synchronizeAndRefresh()
   [scalac]                                            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java:405: error: not found: type XFormsObject
   [scalac]     public XFormsObject resolveObject(Element actionElement, String targetStaticOrAbsoluteId) {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsControls.java:430: error: not found: type XFormsControl
   [scalac]     public XFormsControl getFocusedControl() {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsControls.java:434: error: not found: type XFormsControl
   [scalac]     public void setFocusedControl(XFormsControl focusedControl) {
   [scalac]                                   ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/ControlTree.java:270: error: not found: type XFormsControl
   [scalac]     public XFormsControl getControl(String effectiveId) {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/control/Focus.scala:120: error: value isFocusable is not a member of Any
   [scalac]                     case Some(newReference) if ! newReference.isFocusable ?
   [scalac]                                                               ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/control/Focus.scala:124: error: value ne is not a member of Any
   [scalac]                     case Some(newReference) if newReference ne focusedBefore ?
   [scalac]                                                             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/control/Focus.scala:129: error: type mismatch;
   [scalac]  found   : Any
   [scalac]  required: org.orbeon.oxf.xforms.control.XFormsControl
   [scalac]                         onFocus(newReference)
   [scalac]                                 ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/XFormsAPI.scala:99: error: value >= is not a member of Nothing
   [scalac]                 { case newIndex if newIndex >= 0 ? newIndex }
   [scalac]                                             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java:80: error: not found: type XBLContainer
   [scalac]     public XBLContainer container() {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/submission/XFormsModelSubmission.java:65: error: not found: type XFormsEventTarget
   [scalac] public class XFormsModelSubmission extends XFormsModelSubmissionBase implements XFormsEventTarget, XFormsEventObserver {
   [scalac]                                                                                 ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/submission/XFormsModelSubmission.java:65: error: not found: type XFormsEventObserver
   [scalac] public class XFormsModelSubmission extends XFormsModelSubmissionBase implements XFormsEventTarget, XFormsEventObserver {
   [scalac]                                                                                                    ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/XFormsAPI.scala:269: error: type mismatch;
   [scalac]  found   : org.orbeon.oxf.xforms.submission.XFormsModelSubmission
   [scalac]  required: org.orbeon.oxf.xforms.event.XFormsEventTarget
   [scalac]         try Dispatch.dispatchEvent(new XFormsSubmitEvent(submission, properties))
   [scalac]                                                          ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/control/controls/XFormsCaseControl.java:23: error: not found: type XFormsNoSingleNodeContainerControl
   [scalac] public class XFormsCaseControl extends XFormsNoSingleNodeContainerControl {
   [scalac]                                        ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/control/controls/XXFormsDialogControl.java:31: error: not found: type XFormsNoSingleNodeContainerControl
   [scalac] public class XXFormsDialogControl extends XFormsNoSingleNodeContainerControl {
   [scalac]                                           ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XXFormsShowAction.scala:51: error: type mismatch;
   [scalac]  found   : org.orbeon.oxf.xforms.control.controls.XXFormsDialogControl
   [scalac]  required: org.orbeon.oxf.xforms.event.XFormsEventTarget
   [scalac]         val newEvent = new XXFormsDialogOpenEvent(properties, targetDialog, neighborEffectiveId.orNull, constrainToViewport)
   [scalac]                                                               ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/XFormsAction.scala:96: error: value synchronizeAndRefresh is not a member of org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]             context.containingDocument.synchronizeAndRefresh()
   [scalac]                                        ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java:445: error: not found: type Scope
   [scalac]     public Scope getActionScope(Element actionElement) {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContextStack.java:267: error: not found: type Scope
   [scalac]                             Element bindingElement, NamespaceMapping bindingElementNamespaceMapping, String sourceEffectiveId, Scope scope, boolean handleNonFatal) {
   [scalac]                                                                                                                                ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContextStack.java:244: error: not found: type Scope
   [scalac]     public void pushBinding(Element bindingElement, String sourceEffectiveId, Scope scope, boolean handleNonFatal) {
   [scalac]                                                                               ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContextStack.java:240: error: not found: type Scope
   [scalac]     public void pushBinding(Element bindingElement, String sourceEffectiveId, Scope scope) {
   [scalac]                                                                               ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContextStack.java:122: error: not found: value XFormsFunction
   [scalac]     public XFormsFunction.Context getFunctionContext(String sourceEffectiveId) {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XFormsLoadAction.java:30: error: not found: type XFormsAction
   [scalac] public class XFormsLoadAction extends XFormsAction {
   [scalac]                                       ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XFormsResetAction.java:26: error: not found: type XFormsAction
   [scalac] public class XFormsResetAction extends XFormsAction {
   [scalac]                                        ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XFormsMessageAction.java:32: error: not found: type XFormsAction
   [scalac] public class XFormsMessageAction extends XFormsAction {
   [scalac]                                          ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XFormsInsertAction.java:42: error: not found: type XFormsAction
   [scalac] public class XFormsInsertAction extends XFormsAction {
   [scalac]                                         ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XFormsDeleteAction.java:36: error: not found: type XFormsAction
   [scalac] public class XFormsDeleteAction extends XFormsAction {
   [scalac]                                         ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XXFormsHideAction.java:25: error: not found: type XFormsAction
   [scalac] public class XXFormsHideAction extends XFormsAction {
   [scalac]                                        ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XXFormsInvalidateInstanceAction.java:27: error: not found: type XFormsAction
   [scalac] public class XXFormsInvalidateInstanceAction extends XFormsAction {
   [scalac]                                                      ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XXFormsInvalidateInstancesAction.java:25: error: not found: type XFormsAction
   [scalac] public class XXFormsInvalidateInstancesAction extends XFormsAction {
   [scalac]                                                       ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/actions/XXFormsJoinSubmissions.java:21: error: not found: type XFormsAction
   [scalac] public class XXFormsJoinSubmissions extends XFormsAction {
   [scalac]                                             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/RRRActions.scala:30: error: type mismatch;
   [scalac]  found   : org.orbeon.oxf.xforms.XFormsModel
   [scalac]  required: org.orbeon.oxf.xforms.event.XFormsEventTarget
   [scalac]     def createEvent(model: XFormsModel, applyDefaults: Boolean) = new XFormsRebuildEvent(model)
   [scalac]                                                                                          ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/RRRActions.scala:39: error: overloaded method constructor XFormsRecalculateEvent with alternatives:
   [scalac]   (target: org.orbeon.oxf.xforms.event.XFormsEventTarget,applyDefaults: Boolean)org.orbeon.oxf.xforms.event.events.XFormsRecalculateEvent <and>
   [scalac]   (target: org.orbeon.oxf.xforms.event.XFormsEventTarget,properties: org.orbeon.oxf.xforms.event.XFormsEvent.PropertyGetter)org.orbeon.oxf.xforms.event.events.XFormsRecalculateEvent
   [scalac]  cannot be applied to (org.orbeon.oxf.xforms.XFormsModel, Boolean)
   [scalac]     def createEvent(model: XFormsModel, applyDefaults: Boolean) = new XFormsRecalculateEvent(model, applyDefaults)
   [scalac]                                                                   ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/RRRActions.scala:44: error: type mismatch;
   [scalac]  found   : org.orbeon.oxf.xforms.XFormsModel
   [scalac]  required: org.orbeon.oxf.xforms.event.XFormsEventTarget
   [scalac]     def createEvent(model: XFormsModel, applyDefaults: Boolean) = new XFormsRevalidateEvent(model)
   [scalac]                                                                                             ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContextStack.java:71: error: not found: type XBLContainer
   [scalac]     public final XBLContainer container;
   [scalac]                  ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContextStack.java:201: error: not found: type VariableAnalysisTrait
   [scalac]     public BindingContext.VariableInfo scopeVariable(VariableAnalysisTrait staticVariable, String sourceEffectiveId, boolean handleNonFatal) {
   [scalac]                                                      ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java:105: error: not found: type ElementAnalysis
   [scalac]     public void runAction(ElementAnalysis actionAnalysis) {
   [scalac]                           ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsActionAction.scala:64: error: value execute is not a member of Object
   [scalac]             XFormsActions.getScriptAction.execute(actionContext)
   [scalac]                                           ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsRefreshAction.scala:45: error: type mismatch;
   [scalac]  found   : org.orbeon.oxf.xforms.XFormsModel
   [scalac]  required: org.orbeon.oxf.xforms.event.XFormsEventTarget
   [scalac]         Dispatch.dispatchEvent(new XFormsRefreshEvent(model))
   [scalac]                                                       ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsToggleAction.scala:31: error: fruitless type test: a value of type org.orbeon.oxf.xforms.control.XFormsControl cannot also be a org.orbeon.oxf.xforms.control.controls.XFormsCaseControl
   [scalac]             case Some(caseControl: XFormsCaseControl) ?
   [scalac]                                    ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsToggleAction.scala:49: error: value synchronizeAndRefresh is not a member of org.orbeon.oxf.xforms.XFormsContainingDocument
   [scalac]             XFormsAPI.containingDocument.synchronizeAndRefresh()
   [scalac]                                          ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsToggleAction.scala:51: error: value parent is not a member of org.orbeon.oxf.xforms.control.controls.XFormsCaseControl
   [scalac]         if (caseControl.parent.isRelevant && ! caseControl.isSelected) {
   [scalac]                         ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContainingDocument.java:1054: error: not found: type ScriptInterpreter
   [scalac]     public ScriptInterpreter getScriptInterpreter() {
   [scalac]            ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContainingDocument.java:787: error: not found: type XFormsEvent
   [scalac]     public void addScriptToRun(org.orbeon.oxf.xforms.Script script, XFormsEvent event, XFormsEventObserver eventObserver) {
   [scalac]                                                                     ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/XFormsContainingDocument.java:787: error: not found: type XFormsEventObserver
   [scalac]     public void addScriptToRun(org.orbeon.oxf.xforms.Script script, XFormsEvent event, XFormsEventObserver eventObserver) {
   [scalac]                                                                                        ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java:55: error: not found: type XFormsEvent
   [scalac]     public final XFormsEvent event;
   [scalac]                  ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java:56: error: not found: type XFormsEventObserver
   [scalac]     public final XFormsEventObserver eventObserver;
   [scalac]                  ^
   [scalac] /Developer/wksp_juno/orbeon-forms/src/main/scala/org/orbeon/oxf/xforms/action/actions/XXFormsShowAction.scala:32: error: fruitless type test: a value of type org.orbeon.oxf.xforms.control.XFormsControl cannot also be a org.orbeon.oxf.xforms.control.controls.XXFormsDialogControl

.... .... [scalac] ^ [scalac] 发现 231 个错误

4

2 回答 2

1

看起来您的 Eclipse 可能未设置为编译 Scala 代码。也许最简单的方法是使用Scala IDE。Scala IDE 人员创建了一个关于 Scala IDE 安装的视频,您可能会觉得它很有用。

于 2013-04-15T17:19:46.273 回答
0

今天,我能够在 Eclipse 中设置 Orbeon 项目,并且能够在服务器上运行它并允许我调试代码。

我创建 wiki 是为了帮助其他开发人员设置相同的东西,并尝试通过调试来理解项目。

请参考以下步骤来设置项目:

  1. 从以下链接下载 eclipse Scala-IDE:http: //scala-ide.org/

  2. 解压缩存档并将其保存在文件系统中。

  3. 打开 eclipse -> 文件菜单 -> 单击导入 -> 从 Git 中选择项目 -> 下一步。

  4. Entet URI 为 git@github.com:orbeon/orbeon-forms.git,并选择 CE 4.5 Branch,然后选择下一步。

  5. 选择新建项目向导,然后单击完成。

  6. 现在项目选择向导,选择新的 Scala 项目。命名为 Orbeon-Forms。

  7. 如果您在项目中看不到代码,则右键单击项目 -> 导入 -> 来自文件系统的现有项目 -> 选择克隆 Orbeon 项目的位置。-> 单击完成。

  8. 现在,在项目中创建资源本地文件夹,并将资源打包文件夹的内容复制到资源本地。

  9. 现在在项目中创建递归文件夹作为此路径:/build/orbeon-war/WEB-INF/classes。

  10. 现在,右键单击项目-> 选择属性-> 选择构建路径。

11.现在,将默认输出文件夹设置为Orbeon-Forms/build/orbeon-war/WEB-INF/classes

  1. 删除所有源文件夹,并添加 src/main/java、src/main/scala、src/main/resource、src/main/resource-packaged、src/main/resource-local。

  2. 现在转到库选项卡,然后删除所有罐子。(注意:不要删除 JRE 和 Scala 库。)

  3. 现在添加 lib 文件夹中的所有 jar。并单击应用。

  4. 现在单击资源,文本文件编码。单击其他,并将其更改为“UTF-8”。

  5. 现在关闭属性窗口。

  6. 现在你可能会得到一些 mongodb 和 GridFS 的 jar 的交叉编译错误。从您的构建路径中删除这些 jar。

  7. 现在,您将在问题窗口中的几个文件中遇到错误。

  8. 现在,我已经删除了 MongoDBPersistence.scala 文件。对于其他文件,我评论了代码。

  9. 现在打开 LoggerFactory.scala 文件,并注释以下行:_String log4jConfigURL = Properties.instance().getPropertySet().getStringOrURIAsString(LOG4J_DOM_CONFIG_PROPERTY, false);_

并在注释行之后复制粘贴以下行: String log4jConfigURL = "oxf:/default-log4j.xml";

注意:如果您不进行上述更改,您将在启动服务器时出错。

  1. 现在,清理您的项目并构建它。eClipse 应该编译所有的 scala 和 java 文件,在下面生成类文件

Orbeon-Forms/build/orbeon-war/WEB-INF/classes。

  1. 现在,右键单击 build.xml -> 属性 -> 运行/调试设置 -> 单击新建 -> 选择 Ant Build。

  2. 名为编辑配置的新窗口将打开。

  3. 单击属性选项卡 -> 取消选中“使用 Ant 运行时首选项中指定的全局属性”。

  4. 单击添加属性。命名为skip.compilation,值为true。单击确定,然后关闭配置。(注意:现在 Ant 不会编译 Scala 和 Java 文件。)

  5. 现在,从 Eclipse 运行 orbeon-war ant target。构建完成后,您应该能够看到构建成功。

  6. 我使用 Apache Tomcat 作为服务器。转到 Tomcat 目录的 conf 目录下的 server.xml。

  7. 在下面添加以下上下文:

注意: docBase 的值将根据您在文件系统中的项目位置而改变。

  1. 现在打开命令提示符,然后转到您的 /bin。

  2. 运行,catalina jpda 启动。

  3. 它显示服务器已启动。

  4. 在浏览器中打开 localhost:8080/orbeon。您将看到 Orbeon 主页。

  5. 现在,转到 eclipse -> 运行菜单 -> 调试配置 -> 选择远程 Java 应用程序 -> 点击“+”号。

  6. 现在输入主机作为 localhost 和端口作为 8000。这将允许远程调试。

于 2014-04-11T21:43:03.063 回答