-
Bug
-
Resolution: Done
-
Blocker
-
7.1.0.DR16, 7.1.0.DR17
Running an EJB client using app-client.
contents of wildfly-config.xml:
<configuration> <authentication-client xmlns="urn:elytron:1.0"> <authentication-rules> <rule use-configuration="default"/> </authentication-rules> <authentication-configurations> <configuration name="default"> <allow-sasl-mechanisms names="DIGEST-MD5"/> <forbid-sasl-mechanisms names="JBOSS-LOCAL-USER"/> <set-user-name name="joe"/> <credentials> <clear-password password="joeIsAwesome2013!"/> </credentials> </configuration> </authentication-configurations> </authentication-client> <jboss-ejb-client xmlns="urn:jboss:wildly-client-ejb:3.0"> <connections> <connection uri="remote+http://127.0.0.8:8080" /> </connections> </jboss-ejb-client> </configuration>
The client code (in the main method) initializes an InitialContext by just specifying the WildFlyInitialContextFactory class name, without PROVIDER_URL, and then attempts to invoke EJBs.
If the <jboss-ejb-client> element is present in the wildfly-config.xml, it fails with
09:13:40,798 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.ejb3.ejbClientContext.default: org.jboss.msc.service.StartException in service jboss.ejb3.ejbClientContext.default: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1978) [jboss-msc-1.2.7.SP1-redhat-1.jar:1.2.7.SP1-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65] Caused by: java.lang.ExceptionInInitializerError at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:106) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] at org.jboss.ejb.client.EJBClientContext$Builder.build(EJBClientContext.java:650) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] at org.jboss.as.ejb3.remote.EJBClientContextService.start(EJBClientContextService.java:122) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032) [jboss-msc-1.2.7.SP1-redhat-1.jar:1.2.7.SP1-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955) [jboss-msc-1.2.7.SP1-redhat-1.jar:1.2.7.SP1-redhat-1] ... 3 more Caused by: java.lang.IllegalArgumentException: Illegal namespace index 0; current scope only has 0 namespace declarations. at com.ctc.wstx.sr.InputElementStack.throwIllegalIndex(InputElementStack.java:1057) [woodstox-core-5.0.3.redhat-1.jar:5.0.3.redhat-1] at com.ctc.wstx.sr.InputElementStack.getLocalNsURI(InputElementStack.java:1050) [woodstox-core-5.0.3.redhat-1.jar:5.0.3.redhat-1] at com.ctc.wstx.sr.BasicStreamReader.getNamespaceURI(BasicStreamReader.java:837) [woodstox-core-5.0.3.redhat-1.jar:5.0.3.redhat-1] at org.wildfly.client.config.BasicXMLStreamReader.getNamespaceURI(BasicXMLStreamReader.java:240) at org.wildfly.client.config.AbstractDelegatingXMLStreamReader.getNamespaceURI(AbstractDelegatingXMLStreamReader.java:188) at org.wildfly.client.config.AbstractDelegatingXMLStreamReader.getNamespaceURI(AbstractDelegatingXMLStreamReader.java:188) at org.jboss.ejb.client.ConfigurationBasedEJBClientContextSelector.parseConnectionType(ConfigurationBasedEJBClientContextSelector.java:221) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] at org.jboss.ejb.client.ConfigurationBasedEJBClientContextSelector.parseConnectionsType(ConfigurationBasedEJBClientContextSelector.java:205) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] at org.jboss.ejb.client.ConfigurationBasedEJBClientContextSelector.parseEJBClientType(ConfigurationBasedEJBClientContextSelector.java:108) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] at org.jboss.ejb.client.ConfigurationBasedEJBClientContextSelector.parseEJBClientConfiguration(ConfigurationBasedEJBClientContextSelector.java:83) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] at org.jboss.ejb.client.ConfigurationBasedEJBClientContextSelector.loadConfiguration(ConfigurationBasedEJBClientContextSelector.java:63) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] at org.jboss.ejb.client.ConfigurationBasedEJBClientContextSelector.<clinit>(ConfigurationBasedEJBClientContextSelector.java:53) [jboss-ejb-client-4.0.0.Beta24-redhat-1.jar:4.0.0.Beta24-redhat-1] ... 8 more
The authentication context from the wildfly-config.xml is parsed and applied correctly, but the EJB client connections are not.
Ready-to-use reproducer project is at https://github.com/jmartisk/mock-artifacts/tree/5eeec93f6592a32d361d0ce579687b08480010af/ejbclient/appclient with instructions included.
- is blocked by
-
JBEAP-10600 Upgrade EJB client to 4.0.0.Beta27
-
- Closed
-
- is caused by
-
EJBCLIENT-213 Wrong namespace call in parseConnectionType in the XML parser
-
- Resolved
-