Thank you Olaf,

Your fix has been applied.

Regards,
 Oleg

On Saturday 03 February 2001 03:03, Olaf Klischat wrote:
> Hi,
>
> I noticed some strange behaviour in the FileLogging facility. When
> I set up FileLogging as shown in the manual, i.e. like this:
>
> <MLET CODE = "org.jboss.logging.FileLogging" ARCHIVE="jboss.jar"
> CODEBASE="../../lib/ext/"> <ARG TYPE="java.lang.String"
> VALUE="Information,Debug,Warning,Error"> <ARG
> TYPE="java.lang.String" VALUE="[{2}] {4}">
>    <ARG TYPE="java.lang.String" VALUE="">
>    <ARG TYPE="java.lang.String" VALUE="../log/server">
>    <ARG TYPE="java.lang.Boolean" VALUE="true">
> </MLET>
>
> then I get this:
>
> javax.management.MalformedObjectNameException: ObjectName: Invalid
> (key,value) pair -> sources= at
> javax.management.ObjectName.<init>(ObjectName.java:177) at
> org.jboss.logging.FileLogging.getObjectName(FileLogging.java:127)
> at
> org.jboss.util.ServiceMBeanSupport.preRegister(ServiceMBeanSupport.
>java:159) at
> com.sun.management.jmx.MBeanServerImpl.preRegisterInvoker(MBeanServ
>erImpl.java:2245) at
> com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.
>java:765) at
> javax.management.loading.MLet.getMBeansFromURL(MLet.java:540) at
> javax.management.loading.MLet.getMBeansFromURL(MLet.java:369) at
> org.jboss.Main.<init>(Main.java:119)
>         at org.jboss.Main$1.run(Main.java:87)
>         at java.security.AccessController.doPrivileged(Native
> Method) at org.jboss.Main.main(Main.java:83)
>
> The relevant part of FileLogging looks like this:
>
>       this.name = name == null ? new ObjectName(OBJECT_NAME +
> (sources == null ? "" : ",sources=" + sources))
>
>                                : name;
>
> so, the above error happens obviously because the "sources"
> parameter was set to the empty string, and the above code only
> checks for a null reference. When I change it as follows, it works
> as intended:
>
> $ cvs diff src/main/org/jboss/logging/FileLogging.java
> Index: src/main/org/jboss/logging/FileLogging.java
> ===================================================================
> RCS file:
> /products/cvs/ejboss/jboss/src/main/org/jboss/logging/FileLogging.j
>ava,v retrieving revision 1.9
> diff -r1.9 FileLogging.java
> 127c127
> <       this.name = name == null ? new ObjectName(OBJECT_NAME +
> (sources == null ? "" : ",sources=" + sources)) ---
>
> >       this.name = name == null ? new ObjectName(OBJECT_NAME +
> > ((sources == null || sources.equals(""))? "" : ",sources=" +
> > sources))
>
> $
>
> Excuse me if the jboss-dev list would have been a better place for
> this. I didn't want to subscribe to yet another mailing list just
> to write one article (my mail account ist quite restricted in size
> here).
>
> Olaf


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to