Ich habe die Wildfly-Schwarm-Beispiele heruntergeladen und versuche nun, die Konfigurationen in Hauptklassen in YAML-Dateien zu verschieben.Wildfly Swarm JGroups YAML
Bisher funktioniert alles, außer dem Ribbon-Beispiel. Ich nahm die Konfiguration aus dem Beispielprojekt und versuchte, sie in YAML-Datei zu konvertieren.
Meine YAML-Datei (wie ich denke, es sollte wie folgt aussehen)
---
swarm:
context:
path: proxy
http:
port: 8080
jgroups:
default-channel: swarm-jgroups
stacks:
udp:
protocols:
FD_SOCK:
socket-binding: jgroups-udp-fd
TCP:
properties:
bind_port:
value: 9090
TCPPING:
properties:
initial_hosts:
value: "localhost[9090],localhost[9091],localhost[9092],localhost[9093]"
num_initial_members:
value: 4
port_range:
value: 4
timeout:
value: 3000
FD_ALL: null
VERIFY_SUSPECT: null
pbcast.NAKACK2: null
UNICAST3: null
pbcast.STABLE: null
pbcast.GMS: null
UFC: null
MFC: null
FRAG2: null
RSVP: null
transports:
UDP:
socket-binding: jgroups-udp
Aber ich bin immer zwei Ausnahmen: Beim Start in der ersten Zeile:
Error getting subresources for Stack java.lang.RuntimeException: Failed to adopt value java.util.Map
at org.wildfly.swarm.config.runtime.invocation.EntityAdapter.fromEntity(EntityAdapter.java:347)
at org.wildfly.swarm.config.runtime.invocation.Marshaller.appendNode(Marshaller.java:33)
at org.wildfly.swarm.config.runtime.invocation.Marshaller.marshalSubresources(Marshaller.java:129)
at org.wildfly.swarm.config.runtime.invocation.Marshaller.appendNode(Marshaller.java:38)
at org.wildfly.swarm.config.runtime.invocation.Marshaller.marshalSubresources(Marshaller.java:129)
at org.wildfly.swarm.config.runtime.invocation.Marshaller.appendNode(Marshaller.java:38)
at org.wildfly.swarm.config.runtime.invocation.Marshaller.marshal(Marshaller.java:23)
at org.wildfly.swarm.container.runtime.marshal.SubsystemMarshaller.marshal(SubsystemMarshaller.java:59)
at org.wildfly.swarm.container.runtime.marshal.SubsystemMarshaller$Proxy$_$$_WeldClientProxy.marshal(Unknown Source)
at org.wildfly.swarm.container.runtime.marshal.DMRMarshaller.marshal(DMRMarshaller.java:70)
at org.wildfly.swarm.container.runtime.marshal.DMRMarshaller$Proxy$_$$_WeldClientProxy.marshal(Unknown Source)
at org.wildfly.swarm.container.runtime.RuntimeServer.start(RuntimeServer.java:182)
at org.wildfly.swarm.container.runtime.RuntimeServer$Proxy$_$$_WeldClientProxy.start(Unknown Source)
at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.lambda$bootstrap$1(ServerBootstrapImpl.java:158)
at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:43)
at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:113)
at org.wildfly.swarm.Swarm.start(Swarm.java:369)
at org.wildfly.swarm.Swarm.main(Swarm.java:623)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:39)
at org.wildfly.swarm.bootstrap.Main.run(Main.java:46)
at org.wildfly.swarm.bootstrap.Main.main(Main.java:37) Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.String
at org.wildfly.swarm.config.runtime.invocation.MapTypeAdapter.toDmr(MapTypeAdapter.java:22)
at org.wildfly.swarm.config.runtime.invocation.EntityAdapter.fromEntity(EntityAdapter.java:341)
... 24 more
Und dann die Jgroup sepcific Ausnahme:
("subsystem" => "jgroups"),
("stack" => "udp")
]) - failure description: "WFLYCLJG0010: Transport for stack udp is not defined. Please specify both a transport and protocol list, either as optional parameters to add() or via batching."
Ich bin mir nicht sicher, was falsch ist.
Vielleicht können Sie mir einen Tipp geben?
Es gab einige Probleme, die entdeckt wurden, als wir genau die gleiche Änderung durchführten. Ich bin nicht auf dem neuesten Stand darüber, ob das Beispiel für die Verwendung von YML festgelegt wurde. Wenn nicht, sollte es bald – Ken
sein Ich sah gerade, dass die Main-Klasse in das Projekt-defaults.yaml verschoben wurde. Ich habe es aus dem git-Repository kopiert, aber ich bekomme immer noch Ausnahmen, die besagen, dass die Eigenschaften für TCP, TCPPING und GMS nicht definiert sind. Vielleicht weil ich die Version 2017.6.1 verwende und nicht die 2017.7.0-SNAPSHOT? –
Das ist möglich, wir sollten 2017.7.0 in den nächsten Tagen veröffentlichen – Ken