jboss.xml validation problem
gcoleman Jun 16, 2009 4:07 AMI'm having trouble getting an existing application to deploy on 5.1.0.GA. It deploys fine on 4.2.x.
I'm using ignore-dependency elements in jboss.xml to handle circular references and it's causing problems with descriptor validation (I can't use the annotation because the code has to be portable between app servers).
jboss.xml snippet looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?> <jboss> <security-domain>java:/jaas/server-login</security-domain> <enterprise-beans> <session> <ejb-name>Bingo</ejb-name> <local-jndi-name>ejb/local/Bingo</local-jndi-name> <resource-ref> <res-ref-name>jdbc/DataSource</res-ref-name> <jndi-name>java:/MainDS</jndi-name> </resource-ref> <!-- Avoid circular dependency: --> <ignore-dependency> <injection-target> <injection-target-class>com.bingo.game.bingo.BingoBean</injection-target-class> <injection-target-name>gameFactory</injection-target-name> </injection-target> </ignore-dependency> </session> ...
And this error turns up on deployment:
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: ignore-dependency cannot appear in this position. Expected content of session is unordered_se quence: port-component? call-by-value? configuration-name? security-proxy? clustered? home-jndi-name? method-attributes? cluster-config? security-iden tity? local-jndi-name? ejb-name? local-home-jndi-name? timer-persistence? security-domain? ior-security-config? exception-on-rollback? jndi-name? ejb- timeout-identity? depends* invoker-bindings? {all descriptionGroup}? {unordered_sequence jndiEnvironmentRefsGroup}?
Ok, so I thought I'd add the schema bits as documented in docs\schema\jboss_5_1.xsd:
<jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_1.xsd" version="5.1"> ... </jboss>
And now this error turns up:
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {http://www.jboss.com/xml/ns/javaee}resource-ref cannot appear in this position. Expected content of {http://www.jboss.com/xml/ns/javaee}session is sequence: {sequence {http://www.jboss.com/xml/ns/javaee}descriptionGroup} {http://www.jboss.com/xml/ns/javaee}ejb-name {http://www.jboss.com/xml/ns/javaee}mapped-name? {sequence {http://www.jboss.com/xml/ns/javaee}jndiEnvironmentRefsGroup} {http://www.jboss.com/xml/ns/javaee}security-identity? {http://www.jboss.com/xml/ns/javaee}local-binding* {http://www.jboss.com/xml/ns/javaee}remote-binding* {http://www.jboss.com/xml/ns/javaee}business-local* {http://www.jboss.com/xml/ns/javaee}business-remote* {http://www.jboss.com/xml/ns/javaee}jndi-name? {http://www.jboss.com/xml/ns/javaee}home-jndi-name? {http://www.jboss.com/xml/ns/javaee}local-jndi-name? {http://www.jboss.com/xml/ns/javaee}local-home-jndi-name? {http://www.jboss.com/xml/ns/javaee}jndi-binding-policy? {http://www.jboss.com/xml/ns/javaee}clustered? {http://www.jboss.com/xml/ns/javaee}cluster-config? {http://www.jboss.com/xml/ns/javaee}security-domain? {http://www.jboss.com/xml/ns/javaee}method-attributes? {http://www.jboss.com/xml/ns/javaee}depends* {http://www.jboss.com/xml/ns/javaee}annotation* {http://www.jboss.com/xml/ns/javaee}ignore-dependency? {http://www.jboss.com/xml/ns/javaee}aop-domain-name? {http://www.jboss.com/xml/ns/javaee}cache-config? {http://www.jboss.com/xml/ns/javaee}pool-config? {http://www.jboss.com/xml/ns/javaee}concurrent? {http://www.jboss.com/xml/ns/javaee}jndi-ref* {http://www.jboss.com/xml/ns/javaee}port-component? {http://www.jboss.com/xml/ns/javaee}ejb-timeout-identity?
Any idea what's wrong with the deployment descriptor? Any clues how I get this application to deploy?