Just trying to use Orbeon API loaded in eclipse :
After a reconfigure of the build path and defining all the jars dependencies that weren't updated, I 'm finally stuck with this scala classes that are not correctly loaded ?
Any help please ?
[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 errors found
It looks like your Eclipse might not be setup to compile the Scala code. Maybe the simplest way to get there is to use Scala IDE. The Scala IDE folks created a video about the installation of Scala IDE, which you You might find useful.
Today, I am able to setup Orbeon Project inside eclipse, and I am able to run it against the server and allow me to debug the code.
I have created wiki in order to help other Developers to setup the same thing, and try to understand the project by debugging.
Please refer follow steps in order to setup the project:
Download eclipse Scala-IDE from the link: http://scala-ide.org/
Unzip the archive and save it in your file system.
Open eclipse -> File Menu -> Click On Import -> Select Projects From Git -> Next.
Entet URI as git#github.com:orbeon/orbeon-forms.git, and select CE 4.5 Branch, and Select next.
Select New Project Wizard, and Click on Finish.
Now Project Selection Wizard, Select New Scala Project. Name as Orbeon-Forms.
If you do not see code inside project then Right Click on Project -> Import -> Existing Project From File System -> Select the location where you clone the Orbeon Project. -> Click On Finish.
Now, Create resource-local folder inside the project, and copy the content of resource-packaged folder into resource-local.
Now create recursive folder as this path inside project: /build/orbeon-war/WEB-INF/classes.
Now, Right click on project -> Select Properties -> Select Build Path.
11.Now, setup your Default output folder to Orbeon-Forms/build/orbeon-war/WEB-INF/classes.
Remove all source folder, and add src/main/java, src/main/scala, src/main/resource, src/main/resource-packaged, src/main/resource-local.
Now Go to the, Libraries tab, and remove all jars. (Note: Do not remove JRE and Scala Library.)
Now add all jars from lib folder. and Click Apply.
Now Click on Resource, Text File Encoding. Click on other, and change it to "UTF-8".
Now Close the properties windows.
Now you may get, cross-compiled error for some jars for mongodb and GridFS. Remove those jars from your Build Path.
Now, you will get error in few files in Problem Window.
Right now, I have removed MongoDBPersistence.scala file. and for other file, I comment the code.
Now open, LoggerFactory.scala file, and comment following line:
_String log4jConfigURL = Properties.instance().getPropertySet().getStringOrURIAsString(LOG4J_DOM_CONFIG_PROPERTY, false);_
And copy paste the following line after that commented line:
String log4jConfigURL = "oxf:/default-log4j.xml";
Note: If you do not do above change, you will get error while starting your server.
Now, clean your project, and build it. eClipse should compile all scala and java file, generate class files under
Orbeon-Forms/build/orbeon-war/WEB-INF/classes.
Now, Right click on build.xml -> Properties -> Run/Debug Settings -> Click on New -> Select Ant Build.
New Window named Edit Configuration will open up.
Click on Properties Tab -> Uncheck "Use Global Properties as specified in Ant runtime Preference".
Click on Add Property. Give name skip.compilation and value true. Click Ok, and close the Configuration. (Note: Now Ant will not Compile Scala and Java Files.)
Now, run orbeon-war ant target from eclipse. You should be able to see Build Successfully after build finished.
I am using Apache Tomcat as server. Go to server.xml under conf directory of your Tomcat directory.
Add following context under :
Note: value for docBase will changed based on the your project location in your file system.
Now open command prompt, and go to your /bin.
Run, catalina jpda start.
It shows server has been started.
Open, localhost:8080/orbeon in your browser. You will see Orbeon Home page.
Now, Go to eclipse -> Run Menu -> Debug Configuration -> Select Remote Java Application -> click on "+" Sign.
Now enter host as localhost and port as 8000. This will allow Remote Debugging.
Related
This is the problem that is displayed in my screen
*Launching lib/main.dart on iPhone 13 in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: U39MW8579G
Xcode build done. 20.7s
Failed to build iOS app
Error output from Xcode build:
↳
objc[15751]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x21c339eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065c84f8). One of the two will be used. Which one is undefined.
objc[15751]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x21c339f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065c8548). One of the two will be used. Which one is undefined.
objc[15751]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x21c339f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065c8598). One of the two will be used. Which one is undefined.
objc[15751]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x21c339fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065c85e8). One of the two will be used. Which one is undefined.
objc[15751]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x21c339ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065c8638). One of the two will be used. Which one is undefined.
objc[15751]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x21c33a040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065c8688). One of the two will be used. Which one is undefined.
2022-05-18 00:21:30.270 xcodebuild[15751:144850] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-05-18 00:21:30.271 xcodebuild[15751:144850] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/3x/qxdf5rsj4c71yp16yqblsc640000gn/T/flutter_tools.k4uQNy/flutter_ios_build_temp_dirSO7Zep/temporary_xcresult_bundle
/Users/sebastiangonzalez/Documents/flutter_setup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/ios/Classes/FlutterLocalNotificationsPlugin.m:515:52: warning: 'cancelLocalNotification:' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter removePendingNotificationRequestsWithIdentifiers:] [-Wdeprecated-declarations]
[[UIApplication sharedApplication] cancelLocalNotification:localNotification];
^
In module 'UIKit' imported from /Users/sebastiangonzalez/Documents/trabajo/dandy_refactor/second/dandy-mobile-app/ios/Pods/Target Support Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:240:1: note: 'cancelLocalNotification:' has been explicitly marked deprecated here
- (void)cancelLocalNotification:(UILocalNotification *)notification API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenter removePendingNotificationRequestsWithIdentifiers:]", ios(4.0, 10.0)) API_UNAVAILABLE(tvos);
^
/Users/sebastiangonzalez/Documents/flutter_setup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/ios/Classes/FlutterLocalNotificationsPlugin.m:529:44: warning: 'cancelAllLocalNotifications' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter removeAllPendingNotificationRequests] [-Wdeprecated-declarations]
[[UIApplication sharedApplication] cancelAllLocalNotifications];
^
In module 'UIKit' imported from /Users/sebastiangonzalez/Documents/trabajo/dandy_refactor/second/dandy-mobile-app/ios/Pods/Target Support Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:241:1: note: 'cancelAllLocalNotifications' has been explicitly marked deprecated here
- (void)cancelAllLocalNotifications API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenter removeAllPendingNotificationRequests]", ios(4.0, 10.0)) API_UNAVAILABLE(tvos);
^
/Users/sebastiangonzalez/Documents/flutter_setup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/ios/Classes/FlutterLocalNotificationsPlugin.m:741:9: warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest [-Wdeprecated-declarations]
UILocalNotification *launchNotification = (UILocalNotification *)[launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
^
In module 'UIKit' imported from /Users/sebastiangonzalez/Documents/trabajo/dandy_refactor/second/dandy-mobile-app/ios/Pods/Target Support Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalNotification.h:18:12: note: 'UILocalNotification' has been explicitly marked deprecated here
#interface UILocalNotification : NSObject<NSCopying, NSCoding>
^
/Users/sebastiangonzalez/Documents/flutter_setup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/ios/Classes/FlutterLocalNotificationsPlugin.m:741:52: warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest [-Wdeprecated-declarations]
UILocalNotification *launchNotification = (UILocalNotification *)[launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
^
In module 'UIKit' imported from /Users/sebastiangonzalez/Documents/trabajo/dandy_refactor/second/dandy-mobile-app/ios/Pods/Target Support Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalNotification.h:18:12: note: 'UILocalNotification' has been explicitly marked deprecated here
#interface UILocalNotification : NSObject<NSCopying, NSCoding>
^
/Users/sebastiangonzalez/Documents/flutter_setup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/ios/Classes/FlutterLocalNotificationsPlugin.m:741:102: warning: 'UIApplicationLaunchOptionsLocalNotificationKey' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:] [-Wdeprecated-declarations]
UILocalNotification *launchNotification = (UILocalNotification *)[launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
^
In module 'UIKit' imported from /Users/sebastiangonzalez/Documents/trabajo/dandy_refactor/second/dandy-mobile-app/ios/Pods/Target Support Files/flutter_local_notifications/flutter_local_notifications-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:513:50: note: 'UIApplicationLaunchOptionsLocalNotificationKey' has been explicitly marked deprecated here
UIKIT_EXTERN UIApplicationLaunchOptionsKey const UIApplicationLaunchOptionsLocalNotificationKey NS_SWIFT_NAME(localNotification) API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenterDelegate didReceiveNotificationResponse:withCompletionHandler:]", ios(4.0, 10.0)) API_UNAVAILABLE(tvos); // userInfo contains a UILocalNotification
^
/Users/sebastiangonzalez/Documents/flutter_setup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/ios/Classes/FlutterLocalNotificationsPlugin.m:751:1: warning: implementing deprecated method [-Wdeprecated-implementations]
- (void)application:(UIApplication*)application
^
In module 'Flutter' imported from /Users/sebastiangonzalez/Documents/flutter_setup/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/ios/Classes/FlutterLocalNotificationsPlugin.h:1:
/Users/sebastiangonzalez/Documents/flutter_setup/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_armv7/Flutter.framework/Headers/FlutterPlugin.h:104:1: note: method 'application:didReceiveLocalNotification:' declared here
- (void)application:(UIApplication*)application
^
35 warnings generated.
: Error: Expected a String, but got 'UIKit'.
import UIKit
^^^^^
: Error: Expected ';' after this.
import UIKit
^^^^^^
: Error: Expected an identifier, but got 'import'.
Try inserting an identifier before 'import'.
import Flutter
^^^^^^
: Error: Expected ';' after this.
import UIKit
^^^^^
: Error: Directives must appear before any declarations.
Try moving the directive before any declarations.
import Flutter
^^^^^^
: Error: Expected a String, but got 'Flutter'.
import Flutter
^^^^^^^
: Error: Expected ';' after this.
import Flutter
^^^^^^
: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
import Flutter
^^^^^^^
: Error: Expected ';' after this.
import Flutter
^^^^^^^
: Error: A class declaration must have a body, even if it is empty.
Try adding an empty body.
#objc class AppDelegate: FlutterAppDelegate {
^^^^^^^^^^^
: Error: Expected a declaration, but got ':'.
#objc class AppDelegate: FlutterAppDelegate {
^
: Error: A function declaration needs an explicit list of parameters.
Try adding a parameter list to the function declaration.
#objc class AppDelegate: FlutterAppDelegate {
^^^^^^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
MethodChannel methodChannel =
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
MethodChannel methodChannel =
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
MethodChannel methodChannel =
^^^^^^^^^^^^^
: Error: Type 'UIKit' not found.
import UIKit
^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel navigation = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel platform = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel textInput = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: Type 'BasicMessageChannel' not found.
static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: Expected 0 type arguments.
static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>(
^
: Error: Type 'BasicMessageChannel' not found.
static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>(
^^^^^^^^^^^^^^^^^^^
: Error: Expected 0 type arguments.
static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>(
^
: Error: Type 'BasicMessageChannel' not found.
static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: Expected 0 type arguments.
static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>(
^
: Error: Type 'BasicMessageChannel' not found.
static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: Expected 0 type arguments.
static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>(
^
: Error: Type 'MethodChannel' not found.
static const MethodChannel platform_views = MethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel skia = MethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel mouseCursor = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel restoration = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel deferredComponent = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static const MethodChannel localization = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
static void setChannel(MethodChannel newChannel) {
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
late MethodChannel _channel;
^^^^^^^^^^^^^
: Error: Type 'MethodChannel' not found.
MethodChannel methodChannel =
^^^^^^^^^^^^^
: Error: Undefined name 'UIApplicationMain'.
#UIApplicationMain
^^^^^^^^^^^^^^^^^
: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
#UIApplicationMain
^
: Error: Undefined name 'objc'.
#objc class AppDelegate: FlutterAppDelegate {
^^^^
: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
#objc class AppDelegate: FlutterAppDelegate {
^
: Error: Method not found: 'OptionalMethodChannel'.
static const MethodChannel navigation = OptionalMethodChannel(
^^^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'OptionalMethodChannel'.
static const MethodChannel platform = OptionalMethodChannel(
^^^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'OptionalMethodChannel'.
static const MethodChannel textInput = OptionalMethodChannel(
^^^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'BasicMessageChannel'.
static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'BasicMessageChannel'.
static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>(
^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'BasicMessageChannel'.
static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'BasicMessageChannel'.
static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'MethodChannel'.
static const MethodChannel platform_views = MethodChannel(
^^^^^^^^^^^^^
: Error: Method not found: 'MethodChannel'.
static const MethodChannel skia = MethodChannel(
^^^^^^^^^^^^^
: Error: Method not found: 'OptionalMethodChannel'.
static const MethodChannel mouseCursor = OptionalMethodChannel(
^^^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'OptionalMethodChannel'.
static const MethodChannel restoration = OptionalMethodChannel(
^^^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'OptionalMethodChannel'.
static const MethodChannel deferredComponent = OptionalMethodChannel(
^^^^^^^^^^^^^^^^^^^^^
: Error: Method not found: 'OptionalMethodChannel'.
static const MethodChannel localization = OptionalMethodChannel(
^^^^^^^^^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
MethodChannel methodChannel =
^^^^^^^^^^^^^
: Error: Couldn't find constructor 'MethodChannel'.
const MethodChannel('plugins.flutter.io/path_provider_android');
^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
MethodChannel methodChannel =
^^^^^^^^^^^^^
: Error: Couldn't find constructor 'MethodChannel'.
const MethodChannel('plugins.flutter.io/path_provider_ios');
^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
MethodChannel methodChannel =
^^^^^^^^^^^^^
: Error: Couldn't find constructor 'MethodChannel'.
const MethodChannel('plugins.flutter.io/path_provider_macos');
^^^^^^^^^^^^^
: Error: 'override' isn't a type.
override func application(
^^^^^^^^
: Error: Expected ';' after this.
override func application(
^^^^
: Error: Expected ',' before this.
_ application: UIApplication,
^^^^^^^^^^^
: Error: Undefined name 'UIApplication'.
_ application: UIApplication,
^^^^^^^^^^^^^
: Error: Expected ',' before this.
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
^^^^^^^^^^^^^
: Error: Undefined name 'UIApplication'.
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
^^^^^^^^^^^^^
: Error: Expected ']' before this.
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
^
: Error: Expected an identifier, but got ')'.
Try inserting an identifier before ')'.
) -> Bool {
^
: Error: Expected ':' before this.
) -> Bool {
^
: Error: Undefined name '_'.
_ application: UIApplication,
^
: Error: Undefined name 'didFinishLaunchingWithOptions'.
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: Error: Expected named argument.
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
^
: Error: Method not found: 'application'.
override func application(
^^^^^^^^^^^
: Error: Expected an identifier, but got '>'.
Try inserting an identifier before '>'.
) -> Bool {
^
: Error: Undefined name 'Bool'.
) -> Bool {
^^^^
: Error: Expected ';' after this.
) -> Bool {
^^^^
: Error: 'with' can't be used as an identifier because it's a keyword.
Try renaming this to be an identifier that isn't a keyword.
GeneratedPluginRegistrant.register(with: self)
^^^^
: Error: Undefined name 'self'.
GeneratedPluginRegistrant.register(with: self)
^^^^
: Error: Undefined name 'GeneratedPluginRegistrant'.
GeneratedPluginRegistrant.register(with: self)
^^^^^^^^^^^^^^^^^^^^^^^^^
: Error: Expected ';' after this.
GeneratedPluginRegistrant.register(with: self)
^
^^^^^^^^^^^
: Error: Expected identifier, but got 'super'.
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
^^^^^
: Error: Expected ';' after this.
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
^
: Error: 'MethodChannel' isn't a type.
static const MethodChannel navigation = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
static const MethodChannel platform = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
static const MethodChannel textInput = OptionalMethodChannel(
^^^^^^^^^^^^^
: Error: 'BasicMessageChannel' isn't a type.
static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: 'BasicMessageChannel' isn't a type.
static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>(
^^^^^^^^^^^^^^^^^^^
: Error: 'BasicMessageChannel' isn't a type.
static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: 'BasicMessageChannel' isn't a type.
static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>(
^^^^^^^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
static const MethodChannel platform_views = MethodChannel(
^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
static const MethodChannel skia = MethodChannel(
^^^^^^^^^^^^^
: Error: 'MethodChannel' isn't a type.
static const MethodChannel mouseCursor = OptionalMethodChannel(
^^^^^^^^^^^^^
MethodChannel('flutter/service_worker');
^^^^^^^^^^^^^
: Error: Method not found: 'MethodChannel'.
const MethodChannel methodChannel = MethodChannel('flutter/service_worker');
^^^^^^^^^^^^^
Failed to package /Users/sebastiangonzalez/Documents/trabajo/dandy_refactor/second/dandy-mobile-app.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/firebase_messaging/firebase_messaging.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/flutter_local_notifications/flutter_local_notifications.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/firebase_analytics/firebase_analytics.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/path_provider_ios/path_provider_ios.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/firebase_core/firebase_core.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/nanopb/nanopb.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/google_maps_flutter/google_maps_flutter.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/Pods_Runner.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/GoogleAppMeasurement/AdIdSupport/GoogleAppMeasurementIdentitySupport.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/FirebaseMessaging/FirebaseMessaging.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/FirebaseInstallations/FirebaseInstallations.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/GoogleAppMeasurement/WithoutAdIdSupport/GoogleAppMeasurement.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/FirebaseAnalytics/AdIdSupport/FirebaseAnalytics.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/PromisesObjC/FBLPromises.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/FirebaseCore/FirebaseCore.framework'
note: Removed stale file '/Users/sebastiangonzalez/Library/Developer/Xcode/DerivedData/Runner-grkmwieiubhlopdwgnkcaggqjvhf/Build/Products/Debug-iphoneos/GoogleUtilities/GoogleUtilities.framework'
Result bundle written to path:
/var/folders/3x/qxdf5rsj4c71yp16yqblsc640000gn/T/flutter_tools.k4uQNy/flutter_ios_build_temp_dirSO7Zep/temporary_xcresult_bundle
Could not build the precompiled application for the device.
Error launching application on iPhone 13.
Exited (sigterm)*
I had a project running in flutter. I updated Xcode and this happened. I try what is in this link but nothing work:
https://developer.apple.com/forums/thread/698628
Using streamsupport with a Java 7 javac compiler I encounter the following compile error:
[ERROR] method map in interface java8.util.stream.Stream<T>
cannot be applied to given types; [ERROR] required:
java8.util.function.Function<? super java.lang.Object,? extends
R>
[ERROR] found: <anonymous
java8.util.function.Function<java.lang.Integer,java.lang.String>> [ERROR] reason: no instance(s) of type variable(s) R exist so that
argument type <anonymous
java8.util.function.Function<java.lang.Integer,java.lang.String>> conforms to formal parameter type java8.util.function.Function<?
super java.lang.Object,? extends R>
My code is
List<Object> listSum = RefStreams.iterate(0, new UnaryOperator<Integer>() {
#Override
public Integer apply(Integer n) {
return n+1;
}
}).limit(10000).map(new Function<Integer,String>() {
#Override
public String apply(Integer n) {
return String.format("%04d", n);
}
}).collect(Collectors.toList());
I want to know what to do and why this error occurred? Thanks
You'll have to be prepared that type inference in Java 6 / 7 compilers is not up to par with Java 8 / Java 9 compilers.
So, sometimes a statement / expression that compiles with 8 can't be compiled unchanged with 6 or 7. Providing a type witness usually helps the compiler figure out the correct types in Java 6 / 7.
I would do it this way (this works for me with javac from Oracle JDK 1.7.0_80):
List<String> list = RefStreams.<Integer, Integer>iterate(0, new UnaryOperator<Integer>() {
#Override
public Integer apply(Integer n) {
return n + 1;
}
}).limit(10000).map(new Function<Integer, String>() {
#Override
public String apply(Integer n) {
return String.format("%04d", n);
}
}).collect(Collectors.<String>toList());
Note the two type witnesses here:
RefStreams.<Integer, Integer>iterate and Collectors.<String>toList.
The first is there to help the compiler infer the correct type for the map call and the second is there so that the result is correctly inferred as List<String> instead of List<Object>.
I have downloaded grails executor plugin from https://github.com/basejump/grails-executor and placed it in the plugin folder of our application. When we trying to compile it using eclipse, we get the following errors:
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:21: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submit(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:21: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submit(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:22: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutSession(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:22: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutSession(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:23: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutPersistence(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:23: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutPersistence(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:27: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submit(java.lang.Runnable task, java.lang.Object result) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:28: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutSession(java.lang.Runnable task, java.lang.Object result) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:29: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutPersistence(java.lang.Runnable task, java.lang.Object result) { return (java.util.concurrent.Future<'T'>)null;}
^
D:\WORKSPACE\Project_10303\src\java\AES1Delegate.java:20: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release
BASE64Encoder encoder = new BASE64Encoder();
^
D:\WORKSPACE\Project_10303\src\java\AES1Delegate.java:20: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release
BASE64Encoder encoder = new BASE64Encoder();
^
D:\WORKSPACE\Project_10303\src\java\AES1Delegate.java:31: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release
BASE64Decoder decoder = new BASE64Decoder();
^
D:\WORKSPACE\Project_10303\src\java\AES1Delegate.java:31: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release
BASE64Decoder decoder = new BASE64Decoder();
^
D:\WORKSPACE\Project_10303\src\java\FileConverter.java:98: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release
return new sun.misc.BASE64Encoder().encode(enc);
^
D:\WORKSPACE\Project_10303\src\java\FileConverter.java:120: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release
byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str);
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextCallableWrapper.java:12: grails.plugin.executor.PersistenceContextCallableWrapper is not abstract and does not override abstract method call() in java.util.concurrent.Callable
public class PersistenceContextCallableWrapper
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextCallableWrapper.java:19: call() in grails.plugin.executor.PersistenceContextCallableWrapper cannot implement call() in java.util.concurrent.Callable; attempting to use incompatible return type
found : java.lang.Object
required: T
public java.lang.Object call() { return null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:21: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submit(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:22: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutSession(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:23: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutPersistence(java.util.concurrent.Callable<'T'> task) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:27: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submit(java.lang.Runnable task, java.lang.Object result) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:28: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutSession(java.lang.Runnable task, java.lang.Object result) { return (java.util.concurrent.Future<'T'>)null;}
^
C:\Users\laxmia\.grails\1.0.3\projects\Project_10303\generated-java-source\grails\plugin\executor\PersistenceContextExecutorWrapper.java:29: cannot find symbol
symbol : class T
location: class grails.plugin.executor.PersistenceContextExecutorWrapper
public java.util.concurrent.Future<'T'> submitWithoutPersistence(java.lang.Runnable task, java.lang.Object result) { return (java.util.concurrent.Future<'T'>)null;}
Where ever <'T'> and T is mentioned we are getting the compilation error. how to resolve this?
Please: Remove the '(quotes) in <'T'>
I can run this code on Dart VM:
#MirrorsUsed(metaTargets: Tag)
import 'dart:mirrors';
class Tag {
final Symbol name;
const Tag(this.name);
}
#proxy
#Tag(#[])
class Tagged {
noSuchMethod(Invocation invocation) {
InstanceMirror instanceMirror = reflect(this);
ClassMirror classMirror = instanceMirror.type;
classMirror.metadata.forEach((em) {
if (em.reflectee is Tag && em.reflectee.name == invocation.memberName)
print(invocation.positionalArguments);
});
}
}
void main() {
var tagged = new Tagged();
tagged[42];
tagged.foo();
tagged["Dart"];
}
output:
[42]
[Dart]
But when i try to compile it with dart2js it fails with this error:
[Error from Dart2JS]:
bin\dart2jswithbracketanotation.dart:9:7:
Expected identifier, but got '['.
#Tag(#[])
So which one has the bug?:
(Dart VM) because I can run it at all.
(dart2js) because it doesn't compile to js.
update: I reported this bug
I think it's a bug in Dart2JS because an operator should be allowed at this position.
I get the above mentioned warning in the following code:
[DBus (name = "example.Hello")]
public class HelloDbusServer : Object {
private bool is_test = false;
public HelloDbusServer.test() {
is_test = true;
}
[DBus (name = "sayHello")]
public string say_hello() {
if (is_test) {
return "hello (test)";
}
return "hello";
}
}
void on_bus_aquired(DBusConnection conn) {
try {
conn.register_object ("/example/Hello", new HelloDbusServer());
} catch (IOError e) {
stderr.printf ("Could not register dbus service!\n");
Posix.exit(1);
}
}
void on_bus_aquired_test(DBusConnection conn) {
try {
conn.register_object ("/example/Hello", new HelloDbusServer.test());
} catch (IOError e) {
stderr.printf ("Could not register dbus service!\n");
Posix.exit(1);
}
}
void on_bus_name_lost(DBusConnection conn) {
stderr.printf ("Could not aquire dbus name!\n");
Posix.exit(2);
}
void main (string[] args) {
BusType bt = BusType.SYSTEM;
BusAcquiredCallback cb = on_bus_aquired;
if ((args.length > 1) && (args[1] == "test"))
{
bt = BusType.SESSION;
cb = on_bus_aquired_test;
stderr.printf ("Running in test mode on session bus.\n");
}
Bus.own_name (bt, "example.Hello", BusNameOwnerFlags.NONE,
cb,
() => {},
on_bus_name_lost);
new MainLoop().run();
}
The warning pops up for the variable "cb" at the method call "Bus.own_name (bt, "example.Hello", BusNameOwnerFlags.NONE, cb, () => {}, on_bus_name_lost)".
I already searched for a solution and tried all kinds of things with "owned" and closures as mentioned in some tips in the net, but I did not manage to fix this issue.
Thanks for any help.
Thank you for the answer #1.
I tried both solutions already.
Using "(owned)" I got this warning:
/.../helloFromDBus.vala.c: In function ‘_vala_main’:
/.../helloFromDBus.vala.c:402:2: warning: passing argument 3 of ‘g_cclosure_new’ from incompatible pointer type [enabled by default]
/usr/include/glib-2.0/gobject/gclosure.h:206:11: note: expected ‘GClosureNotify’ but argument is of type ‘GDestroyNotify’
I did not realy understand the warning.
A try was fixing the signature of the "on_bus_aquired..." method to be in line with the "BusAcquiredCallback" delegate.
I added "string name" as second parameter. Then I got the same warning as above.
Using "(con) => { cb (con); }" lead to the error:
helloFromDBus.vala:50.18-50.25: error: Too few arguments, method `GLib.BusAcquiredCallback' does not take 1 arguments
(con) => { cb (con); },
Fixing the signature as mention above and using "(con, name) => { cb (con, name); }" gave the following warning:
/.../helloFromDBus.vala.c: In function ‘_vala_main’:
/.../helloFromDBus.vala.c:448:2: warning: passing argument 3 of ‘g_cclosure_new’ from incompatible pointer type [enabled by default]
/usr/include/glib-2.0/gobject/gclosure.h:206:11: note: expected ‘GClosureNotify’ but argument is of type ‘void (*)(void *)’
I did not realy understand this warning either.
Any help to fix these warning?
The best way is usually to transfer your reference using (owned):
Bus.own_name (bt,
"example.Hello",
BusNameOwnerFlags.NONE,
(owned) cb,
() => {},
on_bus_name_lost);
After which cb will be null.
If that's not acceptable (because you still need your copy of cb for something), you can wrap the callback in a closure:
Bus.own_name (bt,
"example.Hello",
BusNameOwnerFlags.NONE,
(con, name) => { cb (con, name); },
() => {},
on_bus_name_lost);
The reason copying is discouraged is that the context information (user_data at the C level) isn't reference counted, so you can't really have two owned references to it at the same time.