Application Server 3  4  5 and 6
  1. Application Server 3 4 5 and 6
  2. JBAS-6368

jboss 5 GA, "Context not found as a child of Host" in server.xml

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Rejected
    • Affects Version/s: JBossAS-5.0.0.GA
    • Fix Version/s: None
    • Component/s: Web (Tomcat) service
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      centos 5, jdk 6
    • Similar Issues:
      Show 9 results 

      Description

      In server.xml, the following worked from at least 4.0.5 until 5.0.0.Beta4

      <Host name="localhost">
      <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
      cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
      transactionManagerObjectName="jboss:service=TransactionManager" />

      <Context path="/dev" docBase="/programs/myDev" reloadable="true"/>

      </Host>

      This error now gets thrown in 5.0.0GA:

      11:48:18,994 ERROR [AbstractKernelController] Error installing to Start: name=WebServer state=Create

      org.jboss.xb.binding.JBossXBException: Failed to parse source: Context not found as a child of Host
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:183)
      at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:133)
      at org.jboss.web.tomcat.service.deployers.TomcatService.startService(TomcatService.java:171)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
      ...

      There are no release notes or other docs I can find explaining this change. The latest tomcat docs say:

      http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

      "Context elements may be explicitly defined:
      ...
      inside a Host element in the main conf/server.xml

        Activity

        Hide
        Remy Maucherat
        added a comment -

        JBoss AS is now handling all the web desciptors, including server.xml and all context.xml files, starting from version where this capability was removed. The JBoss deployer should now be used to deploy your web applications.

        Show
        Remy Maucherat
        added a comment - JBoss AS is now handling all the web desciptors, including server.xml and all context.xml files, starting from version where this capability was removed. The JBoss deployer should now be used to deploy your web applications.
        Hide
        robert lazarski
        added a comment -

        I know this is open source, but you've broken the most basic of features - deploying - that's existed since tomcat 4 until the latest, including at least 4.0.5-5.0.0beta4 of jboss, and haven't documented it. I've searched the jboss 5 docs, read the release notes, and I see no reference to context.xml nor service.xml files. Are you saying I need a compacted sar / war now to use jboss, ie, and can no longer use an expanded war outside the container? Please clarify. If there's some way to define a userland context.xml and keep my open wars outside the container, I'd love to hear it so I can use jboss 5. Otherwise I'm stuck on legacy jboss, as we have a long running production app.

        Show
        robert lazarski
        added a comment - I know this is open source, but you've broken the most basic of features - deploying - that's existed since tomcat 4 until the latest, including at least 4.0.5-5.0.0beta4 of jboss, and haven't documented it. I've searched the jboss 5 docs, read the release notes, and I see no reference to context.xml nor service.xml files. Are you saying I need a compacted sar / war now to use jboss, ie, and can no longer use an expanded war outside the container? Please clarify. If there's some way to define a userland context.xml and keep my open wars outside the container, I'd love to hear it so I can use jboss 5. Otherwise I'm stuck on legacy jboss, as we have a long running production app.
        Hide
        robert lazarski
        added a comment -

        Re-reading the docs, it looks like JBoss 5 supports "Exploded Deployment" but the dir must reside in JBOSS_HOME/server/default/deploy . Is there no option to have the exploded dir outside of the deploy dir? Please clarify.

        Show
        robert lazarski
        added a comment - Re-reading the docs, it looks like JBoss 5 supports "Exploded Deployment" but the dir must reside in JBOSS_HOME/server/default/deploy . Is there no option to have the exploded dir outside of the deploy dir? Please clarify.
        Hide
        David Richmond
        added a comment -

        We also need this feature re-enabled, or at least something like it.

        We have the same WebApp mapped to multiple URLs in order to support legacy applications. Using Context inside of Host is the only way I know of of doing this (i.e. same docBase="X" mapped to many path="...").

        Dave

        Show
        David Richmond
        added a comment - We also need this feature re-enabled, or at least something like it. We have the same WebApp mapped to multiple URLs in order to support legacy applications. Using Context inside of Host is the only way I know of of doing this (i.e. same docBase="X" mapped to many path="..."). Dave
        Hide
        robert lazarski
        added a comment -

        One solution I found that at least somewhat works in my case, is to change the deploy dir. For example, in file:

        jboss-5.0.0.GA/server/default/conf/bootstrap/profile-repository.xml

        I added /programs/deploy like so:

        <property name="applicationURIs">
        <array elementClass="java.net.URI">
        <value>$

        {jboss.server.home.url}

        deploy</value>
        <value>file:///programs/deploy</value>
        </array>
        </property>

        Then, instead of a server.xml reference, you need the expanded war that must be a dir in the form of /programs/deploy/mydir.war .

        Show
        robert lazarski
        added a comment - One solution I found that at least somewhat works in my case, is to change the deploy dir. For example, in file: jboss-5.0.0.GA/server/default/conf/bootstrap/profile-repository.xml I added /programs/deploy like so: <property name="applicationURIs"> <array elementClass="java.net.URI"> <value>$ {jboss.server.home.url} deploy</value> <value> file:///programs/deploy </value> </array> </property> Then, instead of a server.xml reference, you need the expanded war that must be a dir in the form of /programs/deploy/mydir.war .

          People

          • Assignee:
            Remy Maucherat
            Reporter:
            robert lazarski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: