J'essaye d'appeler à distance une application EJB3.1 sur un JBoss 7 à partir d'un Wildfly 10 via JNDI.JBoss Wildfly 10: xnio ClassCastException lorsque j'appelle EJB3.1 sur JBoss 7
L'exécution du code d'un client Java autonome fonctionne parfaitement bien, déployé dans le wildfly, je reçois un ClassCastException:
java.lang.ClassCastException: org.xnio.SingleOption cannot be cast to org.xnio.Option
Voici les propriétés que je utilise:
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=true
remote.connectionprovider.create.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connections=default
remote.connection.default.host=some.server
remote.connection.default.port=4647
remote.connection.default.connect.options.org.xnio.Options.SSL_ENABLED=true
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.clusters=ejbremote.cluster.ejb.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.cluster.ejb.connect.options.org.xnio.Options.SSL_ENABLED=true
remote.connection.default.username=user
remote.connection.default.password=password
org.jboss.ejb.client.scoped.context=true
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
Le projet a la dépendance jboss-as-ejb-client-bom:
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-ejb-client-bom</artifactId>
<version>7.2.0.Final</version>
<type>pom</type>
</dependency>
La recherche a l'air s tandard:
Context ctx = new InitialContext(properties);
Service service = (Service) ctx.lookup(Service.JNDI_PATH);
Des idées?
Qu'advient-il si vous supprimez complètement la dépendance 'jboss-as-ejb-client-bom' ? –
Standard "Aucun message d'erreur EJBReceiver disponible":/ – Kaessrin
Ce que vous faites ici ne ressemble en rien à ce que décrit la documentation [Invocations EJB à partir d'une instance de serveur distant] (https://docs.jboss.org/author/display/WFLY10/EJB + invocations + de + a + distant + serveur + instance) –