Comments (10)
I don't know enough about OSGi to know what the correct fix is. Can you try removing it from the sdk-server project and see if everything still works for you?
from milo.
I also just looked a bit into it. It seems that milo does also import "sun.misc", although that seems never to be used? Or did I just miss it?
from milo.
I don't see "sun.misc" used anywhere either. I suspect it was once used for something like generating certificates, but I don't see it appearing anywhere now...
from milo.
Ok ... there also is sun.nio.ch
.. which seems to be unused.
But I do spot a reference to sun.security
.. maybe have a look.
The other two could be removed?!
from milo.
I made a PR #60 for the two packages.
from milo.
@JulianSchuette this should be fixed in master now... if you have a chance give it a try and let us know.
from milo.
@JulianSchuette I also did update the camel Milo repository. The layout is a bit different now, but you can create a Karat feature and archive now. Just do a local build of Milo first.
from milo.
Thank you guys! I can install and run the camel-milo
feature (which pulls in the milo
feature) in Karaf. However, when testing the following route, there is a CNF exception.
I guess the reason is that both bundles, sdk-core
and sdk-server
export the same package org.eclipse.milo.opcua.core
. OSGi resolves packages only to exactly one bundle - in this case it's sdk-core
, but the missing class NamespaceTable
is contained in sdk-server
. Exporting a package from several bundles is not a good idea in most cases and should be refactored, but I do not want to mess with your code or might be completey wrong here. There are ways to force OSGi to ignore the problem using Require-Bundle
, but that would be a hack.
Would it be possible to move classes in org.eclipse.milo.opcua.sdk.core
to bundle sdk-core
?
Camel route using milo:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route id="testroute">
<from uri="paho:javaonedemo/eclipse-greenhouse-9home/sensors/temperature?brokerUrl=tcp://iot.eclipse.org:1883"/>
<log message="Temp ${body}"/>
<convertBodyTo type="java.lang.String"/>
<to uri="milo-server:MyItem"/>
</route>
</camelContext>
</blueprint>
CNFException:
java.lang.NoClassDefFoundError: org/eclipse/milo/opcua/sdk/core/NamespaceTable
at org.eclipse.milo.opcua.sdk.server.NamespaceManager.<init>(NamespaceManager.java:45)
at org.eclipse.milo.opcua.sdk.server.OpcUaServer.<init>(OpcUaServer.java:89)
at org.apache.camel.component.milo.server.MiloServerComponent.doStart(MiloServerComponent.java:136)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3371)
at org.apache.camel.impl.DefaultCamelContext.initComponent(DefaultCamelContext.java:431)
at org.apache.camel.impl.DefaultCamelContext.lambda$getComponent$9(DefaultCamelContext.java:411)
Package org.eclipse.milo.opcua.core
is exported twice:
karaf@root()> package:exports -d
Package Name | Version | Exporting bundles (ID)
---------------------------------------------------------------------------
org.eclipse.milo.opcua.sdk.core | 0.1.0 | 243 244
karaf@root()> la
START LEVEL 100 , List Threshold: 0
ID | State | Lvl | Version | Name
[...]
243 | Active | 80 | 0.1.0.SNAPSHOT | sdk-core
244 | Active | 80 | 0.1.0.SNAPSHOT | sdk-server
[...]
from milo.
@JulianSchuette You are always one step ahead of what I am trying to do 😉
I will look into this. But I fully agree. Different artifacts should not export different bundles.
from milo.
I am going to track this in a separate issue.
from milo.
Related Issues (20)
- Security upgrade to netty-4.1.105.Final
- CertificateValidationUtil issuer certificate KeyUsage checks
- How to read CustomStructType? HOT 1
- Remove dependency on lombok
- milo version 0.6.11 monitors the approximate limit of the number of PLC points HOT 1
- URI Reading Error HOT 8
- Port forwarding HOT 1
- Milo 0.6.12 Gradle ambiguity error for guava 33 HOT 4
- EndpointDescription is only chosen based on path, not hostname, preventing different certificates per-endpoint HOT 2
- status=Bad_Timeout HOT 1
- Convert `AddressSpace` to blocking API
- Roles and Permissions HOT 1
- Cannot connect to Secured OPC Server HOT 2
- How i can get and mange pEventAttributes from OPC AE and wrapper with Milo? HOT 1
- Setting a node's value to null resp. clearing the node HOT 2
- Upgrade Netty to 4.1.108.Final
- Misleading declaration of `CompositeValidator` compared to its use HOT 3
- Getting `Bad_SecurityChecksFailed` followed by `Bad_ConnectionClosed` when using recursion with `OpcUaClient.getAddressSpace().browseNodesAsync(UaNode).thenCompose()` HOT 22
- Use ReferenceTypeTree in OpcUaServer
- Vulnerabilities CVE-2024-30172/CVE-2024-30171/CVE-2024-29857 for bouncycastle HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from milo.