7 Replies Latest reply on Jun 25, 2010 1:33 PM by ozizka

    JBoss not bound as a global element

    jhsingle

      I am porting a working system from JB 4.2.0 to 5.0.0.CR2 and am getting the following error when starting JBoss:

      vfszip:/home/jhsingl/pkg/jboss-5.0.0.CR2/server/default/deploy/usermgmt.ear -> org.jboss.xb.binding.JBossXBRuntimeException: Element {http://java.sun.com/xml/ns/javaee}jboss is not bound as a global element.

      here is my jboss.xml file

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.jboss.org/j2ee/schema
      http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
      version="5.0">
      <security-domain>cert</security-domain>
      <enterprise-beans>

      <ejb-name>SecurityManager</ejb-name>
      <port-component>
      <auth-method>CLIENT-CERT</auth-method>
      <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </port-component>

      </enterprise-beans>


      Any pointers?

        • 1. Re: JBoss not bound as a global element
          jaikiran

           

          <port-component>
          <auth-method>CLIENT-CERT</auth-method>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </port-component>


          This doesn't look right. As per the xsd, the port-component needs to have a port-component-name too. Something like:

          <port-component>
          <port-component-name>blahblahblah</port-component-name>
          <auth-method>CLIENT-CERT</auth-method>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </port-component>


          Let us know how it goes.


          • 2. Re: JBoss not bound as a global element
            jaikiran

            And also, in your post i don't see a closing jboss element

            <?xml version="1.0" encoding="UTF-8"?>
            <jboss xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.jboss.org/j2ee/schema
            http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
            version="5.0">
            .....
            </jboss>


            • 3. Re: JBoss not bound as a global element
              jaikiran

              Tried a very simple jboss.xml with xsd declaration on JBoss-5 CR2. Fails on my setup too. So i posted this in the JBoss AS5 forum http://www.jboss.com/index.html?module=bb&op=viewtopic&t=146304

              • 4. Re: JBoss not bound as a global element
                wolfgangknauf

                What about using the DTD for "jboss.xml"?

                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE jboss PUBLIC
                 "-//JBoss//DTD JBOSS 5.0//EN"
                 "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
                <jboss>
                 <enterprise-beans>
                 ...
                 </enterprise-beans>
                </jboss>


                Hope this helps

                Wolfgang

                • 5. Re: JBoss not bound as a global element
                  jhsingle

                  Thanks for all the feedback (and for escalating this question to a more advanced forum). Here's what I've found this morning.

                  1. Added the port-component-name and still got the same error. (does the name value have to match another attribute somewhere else?)
                  1a. Yes, there is a closing tag, it just escaped my cut-paste.

                  2. I tried using the DTD and my EJB now deploys successfully. My JUnit tests are now failing with an access authorization error but I will assume that is a separate configuration problem with the test user certificate.

                  3. After discussing with co-workers, I removed the "xmlns" attribute from the jboss tag of my instance document (jboss.xml), so the jboss tag is now no longer attached to a namespace (it is now global?) and again the EJB deploys successfully and I get the same access errors as with the DTD solution. Is this de-namespacing of the instance document a "bad" thing to do?

                  • 6. Re: JBoss not bound as a global element
                    wolfgangknauf

                    For the records: see http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205365 for more on this and a resolution.

                    Wolfgang

                    • 7. Re: JBoss not bound as a global element
                      ozizka

                      For anyone who hits this:

                       

                      Try version="3.0" - it stands for EJB version, not XSD version. I believe the XSD self-documentation is wrong, see JBMETA-293 .

                       

                      <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_0.xsd"
                             version="3.0">
                      

                       

                      See http://ondra.zizka.cz/stranky/programovani/java/ejb/ejb3-howto.texy