1 2 Previous Next 18 Replies Latest reply on Dec 7, 2012 11:28 AM by James Perkins Go to original post
      • 15. Re: How can I show my exception in console
        nuhsoah Newbie

        Now, my jboss-deployment-structure.xml is as following:

        <jboss-deployment-structure>
            <deployment>
                <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
                <exclusions>
                    <module name="org.apache.log4j" />
                    <module name="org.jboss.logging" />
                    <module name="org.hibernate" />
                    <module name="org.apache.velocity" />
                    <module name="org.apache.commons.logging" />
                    <module name="org.slf4j" />
                </exclusions>
            </deployment>
        </jboss-deployment-structure>

        • 16. Re: How can I show my exception in console
          James Perkins Master

          Eric,

          For every server library you exclude, you need to include the dependencies in your deployment. One that you probably shouldn't be excluding and providing your own version is Hibernate. The container the needs specific versions in order to work. One other module you'll need is org.jboss.logging.jul-to-slf4j-stub.

           

           

          . The DEBUG priority level is lower than INFO, why does it not work?

           

          Not sure I'm following here. If you could paste your logging configuration and where you want debug messages to show up that might help.

          --

          James R. Perkins

           

          • 17. Re: How can I show my exception in console
            nuhsoah Newbie

            Hi James,

                 Thanks for your help. I managed all dependencies in my application by myself, just like I deployed my application in other application server, like weblogic and tomcat. I decided to exclude hibernate because I am using Hibernate4.1.6, but JBoss uses its own Hibernate4.0.1. I think JBoss will use its own Hibernate4.0.1 to startup, but will use Hibernate4.1.6 in my application. Am I right?

                 Another question, why I need the org.jboss.logging.jul-to-slf4j-stub library? If it's excluded from JBoss module, what problem will occurs?

                 About the second question, "The DEBUG priority level is lower than INFO, why does it not work?", I think it conflicts with struts2 ExceptionMappingInterceptor log level setting. Now, I change JBoss root logger level to INFO, and ExceptionMappingInterceptor log level to ERROR, it works.

             

            • 18. Re: How can I show my exception in console
              James Perkins Master

              Hello Eric,

              Sorry for the delayed response.

               

              I managed all dependencies in my application by myself, just like I deployed my application in other application server, like weblogic and tomcat. I decided to exclude hibernate because I am using Hibernate4.1.6, but JBoss uses its own Hibernate4.0.1. I think JBoss will use its own Hibernate4.0.1 to startup, but will use Hibernate4.1.6 in my application. Am I right?

              I don't think this is true. It would and mostly likely should use the servers version (Hibernate 4.0.1). There are parts of the core server that will rely on features in the Hibernate library.

               

              Another question, why I need the org.jboss.logging.jul-to-slf4j-stub library? If it's excluded from JBoss module, what problem will occurs?

              IIRC when users were including the jul-to-slf4j library it caused a stackoverflow. The stub is just a fork of jul-to-slf4j with no-op methods.

               

              About the second question, "The DEBUG priority level is lower than INFO, why does it not work?", I think it conflicts with struts2 ExceptionMappingInterceptor log level setting. Now, I change JBoss root logger level to INFO, and ExceptionMappingInterceptor log level to ERROR, it works.

              Ah, could be. It does look it uses some kind of custom logger.

               

              --

              James R. Perkins

              1 2 Previous Next