Problems Migrating to Dev1.0 #1261
johannwesely
started this conversation in
General
Replies: 1 comment
-
The You might be able to move your project away from using the BinaryDataTypeDictionaryReader entirely. The See these examples:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi we migrated our application to the milo dev1.0 branch. Now i have some problems with our milo client when i want to read a custom structure and it comes to BinaryDatatypeDictionaryReader readDataTypeDictionary(NodeId nodeId) i get the following exception :
15:13:14.288 [DEBUG] 'pool-5-thread-8' - ConnectionProcessSingleRequestFlexibleSizeEDPM: !! WriteHeaderData: IP=192.168.50.100 ID=7410 Target=2 RID=998 SID=0 LOC=12 BN=0 LOT=12 CMD=6
15:13:14.296 [WARN ] 'milo-shared-thread-pool-195' - BinaryDataTypeDictionaryReader: Failed to create DataTypeDictionary nodeId=NodeId{ns=0, id=7617}
java.util.concurrent.CompletionException: jakarta.xml.bind.JAXBException: Implementation of Jakarta XML Binding-API has not been found on module path or classpath.
[java.lang.ClassNotFoundException: org.glassfish.jaxb.runtime.v2.ContextFactory]
at java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:368)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1189)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
at org.eclipse.milo.opcua.sdk.client.dtd.BinaryDataTypeDictionaryReader.readDataTypeDictionary(BinaryDataTypeDictionaryReader.java:177)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at org.eclipse.milo.opcua.sdk.client.dtd.BinaryDataTypeDictionaryReader.lambda$readDataTypeDictionariesAsync$4(BinaryDataTypeDictionaryReader.java:125)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at org.eclipse.milo.opcua.stack.transport.client.AbstractUascClientTransport.lambda$handleResponse$3(AbstractUascClientTransport.java:140)
at org.eclipse.milo.opcua.stack.core.util.ExecutionQueue$Task.run(ExecutionQueue.java:119)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: jakarta.xml.bind.JAXBException: Implementation of Jakarta XML Binding-API has not been found on module path or classpath.
at jakarta.xml.bind.ContextFinder.newInstance(ContextFinder.java:250)
at jakarta.xml.bind.ContextFinder.newInstance(ContextFinder.java:238)
at jakarta.xml.bind.ContextFinder.find(ContextFinder.java:386)
at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:605)
at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:546)
at org.eclipse.milo.opcua.sdk.core.dtd.BsdParser.parse(BsdParser.java:32)
at org.eclipse.milo.opcua.sdk.client.dtd.BinaryDataTypeDictionaryReader.createTypeDictionaryInfo(BinaryDataTypeDictionaryReader.java:308)
at org.eclipse.milo.opcua.sdk.client.dtd.BinaryDataTypeDictionaryReader.lambda$readDataTypeDictionary$10(BinaryDataTypeDictionaryReader.java:177)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
... 22 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.glassfish.jaxb.runtime.v2.ContextFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at jakarta.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:113)
at jakarta.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:146)
at jakarta.xml.bind.ContextFinder.newInstance(ContextFinder.java:248)
... 30 common frames omitted
We use in some places still Javax instead of jakarta (Hibernate) so i wonder if i have to migrate the whole app to Jakarta to get this working. in my project i added following dependencies because i read javax and jakarta can coexist with these:
jakarta.xml.bind
jakarta.xml.bind-api
4.0.1
org.glassfish.jaxb
jaxb-runtime
2.3.1
com.sun.xml.bind
jaxb-impl
2.3.6
javax.xml.bind
jaxb-api
2.3.1
Do you have any suggestions ?
Beta Was this translation helpful? Give feedback.
All reactions