Re: [mdr-users] RE : [mdr-users] Using log4j instead of ErrorManager with standalone MDR
Martin Matula <[email protected]> Thu, 04 Aug 2005 11:36:02 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
Seems that the JMI interfaces for your metamodel (particularly stbpm.StbpmPackage interface) cannot be found on the classpath of your application. Martin Olivier RICHAUD wrote: >OK Thanks I managed to replace the ErrorManager with mine. > >Last point : how do I get rid of this: > >[STDERR] [org.netbeans.mdr.Logger] Metamodel specific JMI class >stbpm.StbpmPackage not found. Using bytecode generation to create it. > >It looks like I need to catch this! > >Olivier. > >-----Message d'origine----- >De : Martin Matula [mailto:[email protected]] >Envoyé : mercredi 3 août 2005 17:35 >À : [email protected] >Objet : Re: [mdr-users] Using log4j instead of ErrorManager with >standalone MDR > > >Hi Olivier, > >Olivier RICHAUD wrote: > > > >>Hi all, >> >>I'm looking for a way to replace MDR's own logging system by log4j. I'm >> >> > > > >>using the standalone version of MDR. >> >>I have gone through various articles, but none of them gave me an >>answer. As far as I understand, I may need to provide my custom >>implementation of ErrorManager and replace the default one with mine. >> >> >> >Yes, this is the right way to go. > > > >>My >>questions, if this is the way to integrate log4j : >>1. Do I need to implement all ErrorManager's methods? I wonder whether >>it's worh implementing annotations related methods. >> >> >> >> >Yes. MDR uses annotations - most of the time you will get some runtime >exception from MDR, which is annotated by the original exceptions that >caused the runtime exception. > > > >>2. How do I register my customer ErrorManager with the internal lookup? >> >> > > > >>Remember I'm using the standalone version of MDR and worse, it is >>emebedded in a Jboss App Server! >> >> >> >> >You can do it via META-INF/services directory in your jar - that's how >MDR registers its ErrorManager. You can register your implementation as >an additional ErrorManager (the logging infrastructure calls all >registered ErrorMangers). Additionally, you may want to remove the MDR's > >default error manager from the lookup in the services folder in a way >similar to how MDR module removes standalone MDRManager from the lookup >- see the META-INF/services directory under mdr/module. Regards, Martin > > > >