-
Sub-task
-
Resolution: Unresolved
-
Major
-
4.3.0.CR1
The above quickstart's file jboss-ejb3.xml indicates two errors. The first error seems to be a problem with the upstream / online schema, and I'm not sure if this is fixable in the quickstart or not. The second error may either be an error in the quickstart, or an error in the xsds, or, possibly, an error in eclipse validation. I am having trouble figuring out which.
Error 1:
Referenced file contains errors (jar:file:/home/rob/apps/eclipse/builds/mars_sr1_w_jbt/eclipse/plugins/
org.jboss.tools.as.catalog_3.1.0.CR1-v20150911-0311-B31.jar!/schema/xsd/jboss-ejb3-spec-2_0.xsd).
Further details can be seen in attachment "20529_security_interceptors_1.png",
Error 2:
The current file in the quicksttarts has the following content:
<jee:assembly-descriptor> <ci:container-interceptors> <jee:interceptor-binding> <ejb-name>IntermediateEJB</ejb-name> <interceptor-class>org.jboss.as.quickstarts.ejb_security_interceptors.ServerSecurityInterceptor</interceptor-class> </jee:interceptor-binding> // removed 2nd for brevity </ci:container-interceptors> </jee:assembly-descriptor>
There are a few noted problems here.
1) Validation insists that one jee:ejb-name element must live inside the container-interceptors but before the interceptor-binding. This basically means that that set of container-interceptors is only valid for one ejb.
2) Validation also insists that ANOTHER jee:ejb-name ALSO live INSIDE the interceptor-binding
3) If you have multiple interceptor bindings, only the first must have a jee:ejb-name OUTSIDE of it.
After a lot of spit-balling, the only valid xml I've managed to come up with that validates properly is:
<jee:assembly-descriptor> <ci:container-interceptors> <jee:ejb-name>IntermediateEJB</jee:ejb-name> <ci:interceptor-binding> <jee:ejb-name>IntermediateEJB</jee:ejb-name> <jee:interceptor-class>org.jboss.as.quickstarts.ejb_security_interceptors.ServerSecurityInterceptor</jee:interceptor-class> </ci:interceptor-binding> </ci:container-interceptors> <ci:container-interceptors> <jee:ejb-name>SecuredEJB</jee:ejb-name> <ci:interceptor-binding> <jee:ejb-name>SecuredEJB</jee:ejb-name> <jee:interceptor-class>org.jboss.as.quickstarts.ejb_security_interceptors.ServerSecurityInterceptor</jee:interceptor-class> </ci:interceptor-binding> </ci:container-interceptors> </jee:assembly-descriptor>
You'll note there's a lot more namespacing going on in the elements, and that we now have two container-interceptors as opposed to one, because both are for different EJBs. You'll also note that the ejb-name must be declared twice, or else validation fails. This is most likely an error in the heirarchy / nesting of the xsd's, but I am not an expert in that regard.
So the above xml would be a good workaround for the quickstarts. Any other fix would require investigation of the xsd's by someone more qualified than I am.
- is caused by
-
JBEAP-1092 [EAP7 quickstarts] Eclipse Validation of jboss-ejb-security-interceptors fails
- Closed
-
WFLY-4365 jboss-ejb-container-interceptors_1_0.xsd is invalid
- Open
- relates to
-
JBDS-4638 Failing tests for quickstarts [jts][ejb-security-interceptors] on WildFly-11
- Closed