1 2 Previous Next 19 Replies Latest reply on Dec 24, 2013 9:00 AM by Chaithanya Narayana

    properties not working in jboss-logging.xml of AS 6

    Jeff Zhang Newbie

      Hi,

       

      Does someone notice <properties> defined in jboss-logging.xml is not working?

      For example:

      <log4j-appender name="JMX">
            <error-manager>
               <only-once/>
            </error-manager>

            <level name="WARN"/>

            <properties>
               <property name="objectName">jboss.system:service=Logging,type=JMXNotificationAppender</property>
            </properties>


            <formatter>
               <pattern-formatter pattern="%d %-5p [%c] %m"/>
            </formatter>
         </log4j-appender>

       

      Currently all properties in the xml file is commented. If I use log4j-appender and start AS 6 M4, some exception throws

       

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: {urn:jboss:logging:6.0}property not found as a child of {urn:jboss:logging:6.0}properties in sequence: {urn:jboss:logging:6.0}property-meta-data-list*
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:195) [jbossxb.jar:2.0.2.Beta7]
          at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168) [jbossxb.jar:2.0.2.Beta7]
          at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:229) [jbossxb.jar:2.0.2.Beta7]
          at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:206) [jbossxb.jar:2.0.2.Beta7]
          at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137) [:2.2.0.Alpha6]
          at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121) [:2.2.0.Alpha6]
          at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:352) [:2.2.0.Alpha6]
          at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:334) [:2.2.0.Alpha6]
          at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:251) [:2.2.0.Alpha6]
          at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:369) [:2.2.0.Alpha6]
          ... 45 more
      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:logging:6.0}property not found as a child of {urn:jboss:logging:6.0}properties in sequence: {urn:jboss:logging:6.0}property-meta-data-list*
          at org.jboss.xb.binding.sunday.unmarshalling.ElementPosition.nextPosition(ElementPosition.java:199) [jbossxb.jar:2.0.2.Beta7]
          at org.jboss.xb.binding.sunday.unmarshalling.ElementPosition.startParticle(ElementPosition.java:475) [jbossxb.jar:2.0.2.Beta7]
          at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:203) [jbossxb.jar:2.0.2.Beta7]
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.startElement(SaxJBossXBParser.java:370) [jbossxb.jar:2.0.2.Beta7]
          at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:191) [jbossxb.jar:2.0.2.Beta7]
          ... 54 more

        • 1. Re: properties not working in jboss-logging.xml of AS 6
          David Lloyd Master

          Due to the peculiarities of XML parsing with XB and how the class is designed, the property element has to come from the "urn:jboss:bean-deployer:2.0" namespace:

           

           

             <log4j-appender name="JMX">
                 <error-manager>
                     <only-once/>
                 </error-manager>
          
                 <level name="WARN"/>
          
                 <properties>
                     <property xmlns="urn:jboss:bean-deployer:2.0" name="objectName>jboss.system:service=Logging,type=JMXNotificationAppender</property>
                 </properties>
                 ...
          
          

           

          Let me know if you still have the problem then.

          • 2. Re: properties not working in jboss-logging.xml of AS 6
            Jeff Zhang Newbie

            Thanks for the reply.

             

            When I use

               <property xmlns="urn:jboss:bean-deployer:2.0" name="objectName>jboss.system:service=Logging,type=JMXNotificationAppender</property>

             

            It still throw exceptions:

            Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: {urn:jboss:bean-deployer:2.0}property not found as a child of {urn:jboss:logging:6.0}properties in sequence: {urn:jboss:logging:6.0}property*
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:195) [jbossxb.jar:2.0.2.Beta7]
                at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168) [jbossxb.jar:2.0.2.Beta7]
                at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:229) [jbossxb.jar:2.0.2.Beta7]
                at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:206) [jbossxb.jar:2.0.2.Beta7]
                at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137) [:2.2.0.Alpha6]
                at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121) [:2.2.0.Alpha6]
                at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:352) [:2.2.0.Alpha6]
                at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:334) [:2.2.0.Alpha6]
                at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:251) [:2.2.0.Alpha6]
                at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:369) [:2.2.0.Alpha6]
                ... 45 more
            Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:bean-deployer:2.0}property not found as a child of {urn:jboss:logging:6.0}properties in sequence: {urn:jboss:logging:6.0}property*
                at org.jboss.xb.binding.sunday.unmarshalling.ElementPosition.nextPosition(ElementPosition.java:199) [jbossxb.jar:2.0.2.Beta7]
                at org.jboss.xb.binding.sunday.unmarshalling.ElementPosition.startParticle(ElementPosition.java:475) [jbossxb.jar:2.0.2.Beta7]
                at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:203) [jbossxb.jar:2.0.2.Beta7]
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.startElement(SaxJBossXBParser.java:370) [jbossxb.jar:2.0.2.Beta7]
                at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) [xercesImpl.jar:6.0.0.20100721-M4]
                at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:191) [jbossxb.jar:2.0.2.Beta7]
                ... 54 more

             

            I can it defined in the jboss-logging_6_0.xsd

            <xs:complexType name="propertiesType">
            ...
                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="property" type="bd:propertyType"/>
                    </xs:sequence>
            </xs:complexType>

            • 3. Re: properties not working in jboss-logging.xml of AS 6
              jaikiran pai Master

              Looking at the metadata binding classes which backs this xsd http://anonsvn.jboss.org/repos/jbossas/projects/logging-service-metadata/trunk/src/main/java/org/jboss/logging/metadata/AbstractHandlerMetaData.java, the "properties" element is mapped as follows:

               

              ...
              import org.jboss.beans.metadata.spi.PropertyMetaData;
              ...
              
              @XmlElementWrapper(name="properties")
                  public void setPropertyMetaDataList(final List<PropertyMetaData> propertyMetaDataList) {
                      this.propertyMetaDataList = propertyMetaDataList;
                  }
              
              
              

               

              So the "properties" is expected to contain a list of org.jboss.beans.metadata.spi.PropertyMetaData http://anonsvn.jboss.org/repos/jbossas/projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/PropertyMetaData.java which actually is an interface:

               

              package org.jboss.beans.metadata.spi;
              
              public interface PropertyMetaData extends FeatureMetaData
              {
              
              

               

              From what I know of JBossXB, the mapping won't work against interfaces. So instead of mapping the "property" to  org.jboss.beans.metadata.spi.PropertyMetaData, it should probably be mapped to http://anonsvn.jboss.org/repos/jbossas/projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractPropertyMetaData.java which is:

               

              @XmlType(name="propertyType", propOrder={"annotations", "value"})
              public class AbstractPropertyMetaData extends AbstractFeatureMetaData
                 implements PropertyMetaData, ValueMetaDataAware, TypeProvider, Serializable
              {
              

               

              So org.jboss.logging.metadata.AbstractHandlerMetaData would then have:

               

              @XmlElementWrapper(name="properties", type=AbstractPropertyMetaData.class)
                  public void setPropertyMetaDataList(final List<PropertyMetaData> propertyMetaDataList) {
                      this.propertyMetaDataList = propertyMetaDataList;
                  }
              
              
              

               

              But I don't know whether depending on  AbstractPropertyMetaData would be OK. I guess it would probably be easier to create a binding class for "property" within the logging-service-metadata project itself. Maybe there are some other problems with that approach, which probably I am not aware of.

              • 4. Re: properties not working in jboss-logging.xml of AS 6
                David Lloyd Master

                jaikiran pai wrote:

                 

                From what I know of JBossXB, the mapping won't work against interfaces. So instead of mapping the "property" to  org.jboss.beans.metadata.spi.PropertyMetaData, it should probably be mapped to http://anonsvn.jboss.org/repos/jbossas/projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractPropertyMetaData.java which is:

                 

                @XmlType(name="propertyType", propOrder={"annotations", "value"})
                public class AbstractPropertyMetaData extends AbstractFeatureMetaData
                   implements PropertyMetaData, ValueMetaDataAware, TypeProvider, Serializable
                {
                

                 

                So org.jboss.logging.metadata.AbstractHandlerMetaData would then have:

                 

                @XmlElementWrapper(name="properties", type=AbstractPropertyMetaData.class)
                    public void setPropertyMetaDataList(final List<PropertyMetaData> propertyMetaDataList) {
                        this.propertyMetaDataList = propertyMetaDataList;
                    }
                 
                 
                 
                 
                

                 

                But I don't know whether depending on  AbstractPropertyMetaData would be OK. I guess it would probably be easier to create a binding class for "property" within the logging-service-metadata project itself. Maybe there are some other problems with that approach, which probably I am not aware of.

                 

                I do believe you are correct.  This should refer to the class type.  I'll make sure this is fixed for the next milestone of AS.

                • 7. Re: properties not working in jboss-logging.xml of AS 6
                  Jeff Zhang Newbie

                  I had tested on AS6 M5, it seems it still has problem.

                   

                  I use log4jappender in the logging.xml

                   

                  <log4j-appender name="SOCKET" class="org.apache.log4j.net.SocketAppender"> 
                        <error-manager> 
                           <only-once/> 
                   
                        </error-manager> 
                   
                        <level name="INFO"/> 
                   
                        <properties> 
                           <property name="remoteHost">localhost</property> 
                           <property name="port">1234</property> 
                           <property name="threshold">INFO</property> 
                        </properties> 
                   
                        <formatter> 
                           <pattern-formatter pattern="[%d,%c{1}] %m%n"/> 
                   
                        </formatter> 
                  </log4j-appender>
                  
                  <handler-ref name="SOCKET"/>
                  

                   

                  The exception throws:

                   

                  15:02:10,230 ERROR Thread-2 [AbstractKernelController] Error installing to Instantiated: name=Logging:HANDLER:system:LOG4JFILE state=Described mode=On Demand requiredState=Installed: org.jboss.joinpoint.spi.JoinpointException: Constructor not found org.jboss.logmanager.log4j.handlers.Log4jAppenderHandler[] in [ReflectConstructorInfoImpl@1f0eb99{[ReflectClassInfoImpl@1fb8de1{name=org.apache.log4j.Appender}]}]
                      at org.jboss.joinpoint.plugins.Config.findConstructorInfo(Config.java:275) [jboss-reflect.jar:2.2.0.Alpha9]
                      at org.jboss.kernel.plugins.config.Configurator.resolveConstructor(Configurator.java:308) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.config.Configurator.findConstructor(Configurator.java:274) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.config.Configurator.handleConstructorJoinPoint(Configurator.java:231) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.config.Configurator.getConstructorJoinPoint(Configurator.java:130) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getConstructorJoinPoint(AbstractKernelConfigurator.java:138) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:62) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.Alpha7]
                      at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.Alpha7]
                      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.Alpha7]
                      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.Alpha7]
                      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha7]
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.Alpha7]
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.Alpha7]
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.Alpha7]
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.Alpha7]
                      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.Alpha7]
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.Alpha7]
                      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.Alpha7]
                      at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.20100911-M5]
                      at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130) [:0.1.0.Alpha1]
                      at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148) [:0.1.0.Alpha1]
                      at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.1.0.Alpha1]
                      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
                      at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188) [:0.1.0.Alpha1]
                      at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170) [:0.1.0.Alpha1]
                      at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117) [:0.1.0.Alpha1]
                      at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89) [:0.1.0.Alpha1]
                      at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97) [:0.1.0.Alpha1]
                      at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130) [:6.0.0.20100911-M5]
                      at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20100911-M5]
                      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:619) [:1.6.0_20]
                  

                   

                  PS: Normally we can't see this output since logger handler re-directtion. We need hack logmanager in the LogService

                   

                  //final Handler[] bootstrapHandlers = rootLogger.clearHandlers();
                  final Handler[] bootstrapHandlers = rootLogger.getHandlers();
                  

                   

                  Can some one verify it?

                   

                  Thanks

                  • 8. Re: properties not working in jboss-logging.xml of AS 6
                    Jeff Zhang Newbie

                    This issue is still in CR1.

                    How to re-produce:

                    1) add log4j-appender in the jboss-logging.xml

                     

                       <log4j-appender name="LOG4JFILE" class="org.apache.log4j.FileAppender">
                    error-manager>
                       <log4j-appender name="LOG4JFILE" class="org.apache.log4j.FileAppender">
                          <error-manager>
                             <only-once/>
                          </error-manager>
                          <level name="DEBUG"/>
                          <properties>
                             <property name="file">/tmp/log.txt</property>
                          </properties>
                          <formatter>
                             <pattern-formatter pattern="[%d,%c{1}] %m%n"/>
                          </formatter>
                       </log4j-appender>
                             <only-once/>
                    
                     
                       <root-logger>
                          <!-- Set the root logger priority via a system property, with a default value. -->
                          <level name="${jboss.server.log.threshold:INFO}"/>
                          <handlers>
                             <handler-ref name="CONSOLE"/>
                             <handler-ref name="FILE"/>
                    
                             <handler-ref name="LOG4JFILE"/>
                    
                          </handlers>
                       </root-logger>
                          </error-manager>
                          </formatte
                       </log4j-appender>
                    
                    

                    2) Start AS

                    The start process is hanging at:

                     

                    11:41:44,652 INFO  [xnio] XNIO Version 2.1.0.CR2

                    11:41:44,669 INFO  [nio] XNIO NIO Implementation Version 2.1.0.CR2

                    11:41:44,941 INFO  [remoting] JBoss Remoting version 3.1.0.Beta2

                    11:41:45,084 INFO  [TomcatDeployment] deploy, ctxPath=/

                    11:41:45,218 INFO  [service] Removing bootstrap log handlers

                    3) Since we can't get any exception both in console and boot.log
                    We should hack logmanager in the LogService to print the log
                    //final Handler[] bootstrapHandlers = rootLogger.clearHandlers();
                    final Handler[] bootstrapHandlers = rootLogger.getHandlers();
                    4) That we can get the exception like last post.
                    Also I think it is the reason

                    • 9. Re: properties not working in jboss-logging.xml of AS 6
                      jaikiran pai Master

                      Jeff Zhang wrote:

                       

                      This issue is still in CR1.

                      I see that the original JIRA https://jira.jboss.org/browse/JBAS-8270 has been marked as resolved. Could you please create a new one for CR1, so that it can be tracked and fixed before 6.0 Final?

                      • 11. Re: properties not working in jboss-logging.xml of AS 6
                        Jeff Zhang Newbie

                        It seems that the forum program has problem, the code in upper post is not correct and can't fix

                         

                        Repost here:

                        <log4j-appender name="LOG4JFILE" class="org.apache.log4j.FileAppender">
                              <error-manager>
                                 <only-once/>
                              </error-manager>
                              <level name="DEBUG"/>
                              <properties>
                                 <property name="file">/tmp/log.txt</property>
                              </properties>
                              <formatter>
                                 <pattern-formatter pattern="[%d,%c{1}] %m%n"/>
                              </formatter>
                           </log4j-appender>

                            <root-logger>
                              <!-- Set the root logger priority via a system property, with a default value. -->
                              <level name="${jboss.server.log.threshold:INFO}"/>
                              <handlers>
                                 <handler-ref name="CONSOLE"/>
                                 <handler-ref name="FILE"/>

                         

                                 <handler-ref name="LOG4JFILE"/>

                         

                              </handlers>
                           </root-logger>

                        • 12. Re: properties not working in jboss-logging.xml of AS 6
                          Jeff Zhang Newbie

                          After using patched logging-service-metadata.jar from David, the stacetrack error is gone.

                          But the log4j appender hadn't work? I will continue to try to find the reason.

                          • 13. Re: properties not working in jboss-logging.xml of AS 6
                            David Lloyd Master

                            Jeff Zhang wrote:

                             

                            After using patched logging-service-metadata.jar from David, the stacetrack error is gone.

                            But the log4j appender hadn't work? I will continue to try to find the reason.

                            OK, let me know what you find out.  At the moment I don't see anything in the code which might explain this, but maybe it just has to be run through a debugger to see the cause.

                            • 14. Re: properties not working in jboss-logging.xml of AS 6
                              petal1 Newbie

                              Could someone tell me if Log4j appenders are working in 6.1.0.Final?

                              Looking through this forum and stackoverflow I find it incredible how many bugs there are in this area. And then there's the 'fixed it' / 'still broken' conversations that go on far too long. It's all pretty shocking.

                              I had assumed that I had some configuration wrong in my environment, but the more I see in the forums, the more I am coming to the conclusion that JBoss Logging is simply bug-ridden and not fit for purpose.

                              1 2 Previous Next