1 2 Previous Next 15 Replies Latest reply: Jan 6, 2011 10:41 AM by jaikiran pai RSS

Silently ignoring invalid resource references etc

Petr H Newbie

Hello,

 

I'm hitting the following problem:

We''ve got an app packaged in ear and targeted for various app servers - WAS, WLS, JBossAS.

We use app servers work managers via spring. For WAS, WLS we use commonj, for JBossAS we use the JCA WorkManager.

 

We've got an external configuration file which we use to specify at which app server we're running and thus which sping bean to use for accessing the appropriate work manager so we always initialize the correct one.

 

Because of commonj WorkManagers being accessed via JNDI we've got to add a resource references into web.xml:

 

<resource-ref>
      <description>WebSphere work manager for batch processing</description>
      <res-ref-name>commonj/MyWorkManager</res-ref-name>
      <res-type>commonj.work.WorkManager</res-type>
      <res-auth>Container</res-auth>
</resource-ref>

 

With this JBoss doesn't deploy the app complaining about nothing could be bound to satisfy

 

Therefore we add a dummy binding into jboss-web.xml:

 

<resource-ref>
  <res-ref-name>commonj/MyWorkManager</res-ref-name>
  <jndi-name>MyWorkManager</jndi-name>
</resource-ref>

 

This way it did deploy in JBossAS 5.1, but on JBossAS 6.0 it doesn't and it doesn't also produce any error, it just doesn't deploy.

 

Is there a way to get around it? We need to keep the web.xml entry but still let JBoss to deploy the app (and don't care about that resource reference).

 

 

 

And another issue closely related:

 

The spring bean for JBoss JCA Work Manager uses the following configuration (spring 3.0.5):

<bean id="jbossCommonTaskExecutor" class="org.springframework.jca.work.jboss.JBossWorkManagerTaskExecutor" lazy-init="true">
      <property name="workManagerMBeanName" value="${common.work.manager.jbossmbeanname}"/>
</bean>

 

with common.work.manager.jbossmbeanname=jboss.jca:service=MyWorkManager

 

and this WorkManager exists in the instance:

...

<bean name="MyWorkManager" class="org.jboss.resource.work.JBossWorkManager">
     <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.jca:service=MyWorkManager", exposedInterface=org.jboss.resource.work.JBossWorkManagerMBean.class)</annotation>
     <property name="executor"><inject bean="MyWorkManagerThreadPool"/></property>
     <property name="XATerminator"><inject bean="TransactionManager" property="XATerminator"/></property>
</bean

 

and I can see it in JMX objects view

 

however during startup I'm getting a strange exception:

 

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'workManagerMBeanName' threw exception; nested exception is java.lang.IllegalStateException: Could not initialize JBossWorkManagerTaskExecutor because JBoss API is not available: java.lang.reflect.InvocationTargetException

 

Which again doesn't occur on JBossAS 5.1. We'll try to debug it, but anyway - any ideas on this one?

  • 1. Re: Silently ignoring invalid resource references etc
    jaikiran pai Master
    it doesn't also produce any error, it just doesn't deploy.

    Can you please explain that a bit? Looks a bit contradictory.

     

    The deployment is expected to fail if the resource reference cannot be satisfied.

  • 2. Re: Silently ignoring invalid resource references etc
    jaikiran pai Master

    By the way, try this in jboss-web.xml:

    <resource-ref>
       <res-ref-name>commonj/MyWorkManager</res-ref-name>
       <jndi-name>MyWorkManager</jndi-name>
       <ignore-dependency/>
    </resource-ref>
    
  • 3. Re: Silently ignoring invalid resource references etc
    Petr H Newbie

    Yes I know But it's like that it just doesn't deploy and doesn't produce any related message in log.

    It's an ear consisting of three wars. Two of the wars require such resource reference. When I add id to their web.xml they don't deploy and appropriate exception is logged. Whe I add the above shown additional entry to their jboss-web.xml (sort of a trick which worked on JBAS 5.1) then they don't deploy without any explanatory errors, exceptions being logged.

    They look like they're skipped during deployment and the only thing I can find is en error in server log about deployment errors stating that they should be in state deployed but they aren't. Nothing explanatory as for the cause of deployment failure.

    - boot.log shows nothing at all, it just looks like these two wars are skipped

    - server.log shows just that deployment error notification and nothing really useful

     

    EDIT: Alright, I'll try that ignore-dependency thing and let you know

  • 4. Re: Silently ignoring invalid resource references etc
    jaikiran pai Master

    Petr H wrote:

     

    - server.log shows just that deployment error notification and nothing really useful

    That's the deployment error I am interested in I guess it's complaining about the missing MyWorkManager jndi binding (the one you specified in jboss-web.xml jndi-name section). By the way, give the ignore-dependency (the example that I posted) a try. I expect that to work.

  • 5. Re: Silently ignoring invalid resource references etc
    Petr H Newbie

    ignore-dependency leads to complains about that attribute not being declared

    I'm using the following doctype in jboss-web.xml:

    <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

     

    I'll try without it but I remember I had to add it because of deployment was also failing when no doctype was stated.

     

    The actual error in server.log (when it "silently" fails - ie without ignore-dependency):

    2011-01-06 14:44:04,437 ERROR [ProfileServiceBootstrap] (Thread-2) Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

    DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "jboss.web.deployment:war=/gba" is missing the following dependencies:
        Dependency "jboss-switchboard:appName=myapp,module=ast.server.gba" (should be in state "Installed", but is actually in state "Create")
      Deployment "jboss.web.deployment:war=/web" is missing the following dependencies:
        Dependency "jboss-switchboard:appName=myapp,module=ast.server.web" (should be in state "Installed", but is actually in state "Create")

    DEPLOYMENTS IN ERROR:
      Deployment "jboss-switchboard:appName=myapp,module=ast.server.web" is in error due to the following reason(s): Create
      Deployment "jboss-switchboard:appName=myapp,module=ast.server.gba" is in error due to the following reason(s): Create

    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]
    at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]
    at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]
    at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]
    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
    at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
    at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]

     

    I hope it will help you

  • 6. Re: Silently ignoring invalid resource references etc
    jaikiran pai Master

    Petr H wrote:

     

    ignore-dependency leads to complains about that attribute not being declared

    I'm using the following doctype in jboss-web.xml:

    <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

     

    Use the xsd:

    <jboss-web 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-web_5_1.xsd"
               version="5.1">    
    
    
    
  • 7. Re: Silently ignoring invalid resource references etc
    Petr H Newbie

    Well, so now with the below jboss-web.xml it does deploy, nice Though I don't know why it refused to deploy when I had the xml header and doctype missing intially. Maybe the header was the main cause and not the doctype. Still, it would be nice to have the ignore-dependency attribute covered in the jboss-web DTD.

     

    But at least it starts now. Now we'll have to figure out why it throws that invocationtargetexception when actually initializing that spring bean.

     

    <?xml version='1.0' encoding='UTF-8' ?>
    <!-- <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd"> -->

    <jboss-web>
    <resource-ref>
      <res-ref-name>jdbc/astds</res-ref-name>
      <jndi-name>java:astds</jndi-name>
    </resource-ref>

    <!-- Not actually used, but JBoss needs it here for successful deployment -->
    <resource-ref>
      <res-ref-name>commonj/MyWorkManager</res-ref-name>
      <jndi-name>MyWorkManager</jndi-name>
      <ignore-dependency/>
    </resource-ref>
    </jboss-web>

     

    EDIT: Fine, will switch to schema, somewhat I missed that one

  • 8. Re: Silently ignoring invalid resource references etc
    Petr H Newbie

    By the way - I tried to use version 6.0 XSD:

    <jboss-web 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-web_6_0.xsd"
               version="6.0">

     

    and that doesn't work:

    java.lang.Exception: Failed to resolve Java binding for .../jboss-web.xml (check the SchemaBinding resolver configuration)
    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:259) [jbossxb.jar:2.0.3.GA]
    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:231) [jbossxb.jar:2.0.3.GA]
    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:352) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:334) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:251) [:2.2.0.GA]
    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:369) [:2.2.0.GA]

     

     

    with version 5.1 it complains about version attribute not allowed to I had to remove it:

    <jboss-web 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-web_5_1.xsd">

     

    but then it fails the same way as with 6.0 XSD

  • 9. Re: Silently ignoring invalid resource references etc
    jaikiran pai Master

    Don't use the 6.0 version of the xsd yet. There's a known bug for that one https://issues.jboss.org/browse/JBAS-8776.

     

    Use the 5.1 xsd that I posted. If you run into issues with that one, then please post the entire exception stacktrace and the exact jboss-web.xml in use.

  • 10. Re: Silently ignoring invalid resource references etc
    Petr H Newbie

    Alright,

     

    first one more thing to add 6.0 XSD:

    I've got just two resource-ref entries in there (see below) and when validating the XML (outside of JBoss, in Eclipse) it complains about

    cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource-ref'. One of '{"http://www.jboss.com/xml/ns/javaee":class-loading, "http://www.jboss.com/xml/ns/javaee":security-domain, "http://www.jboss.com/xml/ns/javaee":jacc-star-role-allow, "http://www.jboss.com/xml/ns/javaee":context-root, "http://www.jboss.com/xml/ns/javaee":virtual-host, "http://www.jboss.com/xml/ns/javaee":use-session-cookies, "http://www.jboss.com/xml/ns/javaee":replication-config, "http://www.jboss.com/xml/ns/javaee":security-role, "http://www.jboss.com/xml/ns/javaee":message-destination, "http://www.jboss.com/xml/ns/javaee":webservice-description, "http://www.jboss.com/xml/ns/javaee":depends, "http://www.jboss.com/xml/ns/javaee":servlet, "http://www.jboss.com/xml/ns/javaee":max-active-sessions, "http://www.jboss.com/xml/ns/javaee":passivation-config, "http://www.jboss.com/xml/ns/javaee":annotation}' is expected. jboss-web.xml /xmls line 7 XML Problem

     

    As for 5.1 XSD (note that the attribute version="5.1" had to be removed in order for the XML to become valid):

    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-web 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-web_5_1.xsd">

    <resource-ref>
      <res-ref-name>jdbc/astds</res-ref-name>
      <jndi-name>java:astds</jndi-name>
    </resource-ref>

    <!-- Not actually used, but JBoss needs it here for successful deployment -->
    <resource-ref>
      <res-ref-name>commonj/MyWorkManager</res-ref-name>
      <jndi-name>MyWorkManager</jndi-name>
      <ignore-dependency/>
    </resource-ref>
    </jboss-web>

    causes pretty much the same as what's in https://issues.jboss.org/browse/JBAS-8776 for version 6.0

    15:42:07,224 ERROR [AbstractKernelController] Error installing to Parse: name=vfs:///C:/opt/jboss-6.0.0.Final/server/TST/deploy/myapp.ear state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///C:/opt/jboss-6.0.0.Final/server/TST/deploy/myapp.ear/ast.server.gba.war/
    at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:383) [:2.2.0.GA]
    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:343) [:2.2.0.GA]
    at org.jboss.deployment.JBossWebAppParsingDeployer.createMetaData(JBossWebAppParsingDeployer.java:99) [:6.0.0.Final]
    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:315) [:2.2.0.GA]
    at org.jboss.deployment.JBossWebAppParsingDeployer.createMetaData(JBossWebAppParsingDeployer.java:80) [:6.0.0.Final]
    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:255) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
    at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
    at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
    at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]
    at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]
    at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]
    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.0.0.Final]
    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
    at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
    at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]
    Caused by: java.lang.Exception: Failed to resolve Java binding for /C:/opt/jboss-6.0.0.Final/server/TST/deploy/myapp.ear/ast.server.gba.war/WEB-INF/jboss-web.xml (check the SchemaBinding resolver configuration)
    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:259) [jbossxb.jar:2.0.3.GA]
    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:231) [jbossxb.jar:2.0.3.GA]
    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:352) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:334) [:2.2.0.GA]
    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:251) [:2.2.0.GA]
    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:369) [:2.2.0.GA]
    ... 50 more

  • 11. Re: Silently ignoring invalid resource references etc
    jaikiran pai Master

    Petr H wrote:

     


     

    As for 5.1 XSD (note that the attribute version="5.1" had to be removed in order for the XML to become valid):

    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-web 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-web_5_1.xsd">

    <resource-ref>
      <res-ref-name>jdbc/astds</res-ref-name>
      <jndi-name>java:astds</jndi-name>
    </resource-ref>

    <!-- Not actually used, but JBoss needs it here for successful deployment -->
    <resource-ref>
      <res-ref-name>commonj/MyWorkManager</res-ref-name>
      <jndi-name>MyWorkManager</jndi-name>
      <ignore-dependency/>
    </resource-ref>
    </jboss-web>

    Yeah, just checked the jboss-web_5_1.xsd. It's got a bug. The documentation in that xsd suggests the use of the version attribute. But the xsd element itself doesn't define it. So yeah, leave out the version attribute and you should be OK.

  • 12. Re: Silently ignoring invalid resource references etc
    Petr H Newbie

    Yeah, just checked the jboss-web_5_1.xsd. It's got a bug. The documentation in that xsd suggests the use of the version attribute. But the xsd element itself doesn't define it. So yeah, leave out the version attribute and you should be OK.

    Unfortunately it's still not getting things in place. The above mentioned "Failed to resolve Java binding" issue still occurs for 5.1 XSD based XML with version attribute ommited - just like it does for 6.0 XSD based XML.

  • 13. Re: Silently ignoring invalid resource references etc
    jaikiran pai Master

    Try adding this to the JBOSS_HOME/server/<servername>/deployers/metadata-deployer-jboss-beans.xml:

     

    <entry>
       <key>jboss-web_5_1.xsd</key>
       <value>org.jboss.metadata.web.jboss.JBoss50WebMetaData</value>
    </entry>

     

    Just after the jboss-web_5_0.dtd entry. Let us know if that works.

  • 14. Re: Silently ignoring invalid resource references etc
    Petr H Newbie

    Yep that did it

1 2 Previous Next