ctron / de.dentrassi.camel.milo

This component is now available in Camel 2.19.0
https://camel.apache.org
Apache License 2.0
7 stars 6 forks source link

Not building with current milo version #3

Closed gbrost closed 7 years ago

gbrost commented 7 years ago

Hi,

great project idea, we really could use this. However, if i try to build with most current milo, i get this error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project camel-milo: Compilation failure: Compilation failure: [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[30,45] cannot find symbol [ERROR] symbol: class UaNodeManager [ERROR] location: package org.eclipse.milo.opcua.sdk.server.api [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[31,47] package org.eclipse.milo.opcua.sdk.server.model does not exist [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[32,47] package org.eclipse.milo.opcua.sdk.server.model does not exist [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[33,47] package org.eclipse.milo.opcua.sdk.server.model does not exist [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[64,23] cannot find symbol [ERROR] symbol: class UaNodeManager [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[67,23] cannot find symbol [ERROR] symbol: class UaFolderNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[68,23] cannot find symbol [ERROR] symbol: class UaObjectNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[28,45] cannot find symbol [ERROR] symbol: class UaNodeManager [ERROR] location: package org.eclipse.milo.opcua.sdk.server.api [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[29,47] package org.eclipse.milo.opcua.sdk.server.model does not exist [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[30,47] package org.eclipse.milo.opcua.sdk.server.model does not exist [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[45,17] cannot find symbol [ERROR] symbol: class UaObjectNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelServerItem [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[46,17] cannot find symbol [ERROR] symbol: class UaVariableNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelServerItem [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[51,59] cannot find symbol [ERROR] symbol: class UaNodeManager [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelServerItem [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[52,31] cannot find symbol [ERROR] symbol: class UaObjectNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelServerItem [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[54,8] org.apache.camel.component.milo.server.internal.CamelNamespace is not abstract and does not override abstract method browse(org.eclipse.milo.opcua.sdk.server.api.AccessContext,org.eclipse.milo.opcua.stack.core.types.builtin.NodeId) in org.eclipse.milo.opcua.sdk.server.api.ViewManager [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[77,42] cannot find symbol [ERROR] symbol: method getNodeManager() [ERROR] location: variable server of type org.eclipse.milo.opcua.sdk.server.OpcUaServer [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[87,43] cannot find symbol [ERROR] symbol: class UaFolderNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[95,48] cannot find symbol [ERROR] symbol: class UaObjectNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[119,9] method does not override or implement a method from a supertype [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[121,23] cannot find symbol [ERROR] symbol: class UaNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[138,31] cannot find symbol [ERROR] symbol: class UaNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelNamespace.java:[155,39] cannot find symbol [ERROR] symbol: class UaNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelNamespace [ERROR] /home/gbrost/GIT/de.dentrassi.camel.milo/camel-milo/src/main/java/org/apache/camel/component/milo/server/internal/CamelServerItem.java:[62,33] cannot find symbol [ERROR] symbol: class UaVariableNode [ERROR] location: class org.apache.camel.component.milo.server.internal.CamelServerItem [ERROR] -> [Help 1]

Could you give me hand there?

Thanks Gerd

ctron commented 7 years ago

Yes. I will try to fix this today. In the last days Milo wasn't really stable, from an API perspective.

ctron commented 7 years ago

I just checked, the problem should be solved by the changes I already made last week.

Simply re-open this issued if you still encounter any issues.

gbrost commented 7 years ago

Thank you very much! It is building now. Just one question: Did you ever encounter the problem that a milo-based route does not start? I tried to deploy the example route from your project. The log outputs:

2016-11-28 15:00:34,454 | INFO | FelixStartLevel | BlueprintContainerImpl | 34 - org.apache.aries.blueprint.core - 1.6.1 | Bundle camel-opc-timer-to-rest.xml/0.0.0 is waiting for namespace handlers [http://camel.apache.org/schema/blueprint]

And bundle:diag prints:

Bundle 255

Status: GracePeriod Blueprint 11/28/16 3:48 PM Missing dependencies: (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://camel.apache.org/schema/blueprint))

Thanks!

gbrost commented 7 years ago

Sorry, posted my reply in german language first, out of habit. Translated to english now.

ctron commented 7 years ago

Looks like you are missing OSGi blueprint support. This is available in karaf as "camel-blueprint" IIRC.

gbrost commented 7 years ago

I get the feeling this is a "wrong error message" problem or a bug in my karaf version. I describe the problem here. I was just wondering if this could somehow be related to milo, since other routes seem to deploy fine.

ctron commented 7 years ago

I get a "page not found" by this link.

gbrost commented 7 years ago

Sorry, i messed up the link. I fixed it, please try again :)

ctron commented 7 years ago

Hm .. I see. This seems rather strange to me. Can you make some sort of reproducer, like a few lines of instructions how to get to this problem.

gbrost commented 7 years ago

I now found the root of the problem. You are dependent on Camel 2.18, right? I was on a branch where we did not upgrade yet. Upgrading to Camel 2.18 fixes the problem. Thank you very much!

gbrost commented 7 years ago

Sorry for needing your help again: I had my test route up and running (at least it was contacting my OPC-UA server). I restarted karaf and now it get this error:

2016-11-29 15:31:46,786 | ERROR | lixDispatchQueue | camel-milo | 158 - de.dentrassi.camel.milo.camel-milo - 0.1.0.SNAPSHOT | FrameworkEvent ERROR - de.dentrassi.camel.milo.camel-milo org.osgi.framework.BundleException: Unable to resolve de.dentrassi.camel.milo.camel-milo [158](R 158.0): missing requirement [de.dentrassi.camel.milo.camel-milo [158](R 158.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=19.0.0)(!(version>=20.0.0))) Unresolved requirements: [[de.dentrassi.camel.milo.camel-milo [158](R 158.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=19.0.0)(!(version>=20.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:5063)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4253)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:188)[org.apache.felix.framework-5.4.0.jar:] at java.lang.Thread.run(Thread.java:745)[:1.8.0_111] 2016-11-29 15:31:46,789 | ERROR | lixDispatchQueue | xml | 140 - camel-opc-timer-to-rest.xml - 0.0.0 | FrameworkEvent ERROR - camel-opc-timer-to-rest.xml org.osgi.framework.BundleException: Unable to resolve camel-opc-timer-to-rest.xml [140](R 140.0): missing requirement [camel-opc-timer-to-rest.xml [140](R 140.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.camel.component.milo.client) Unresolved requirements: [[camel-opc-timer-to-rest.xml [140](R 140.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.camel.component.milo.client)] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:5063)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4253)[org.apache.felix.framework-5.4.0.jar:] at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:188)[org.apache.felix.framework-5.4.0.jar:]

Obviously com.google.common.base is missing. But how could it be running before? Could you give me a hand finding the root of the problem?

ctron commented 7 years ago

How did you install the milo component? Using the Karaf feature? It should already declare the dependency on Guava.