Hi Scott,

I downloaded the log4j 1.3alpha-6.  Used the log4j.jar in it to replace the one 
that came with JBoss.  I am getting the following error while starting JBoss.  
Please suggest.

17:22:23,649 WARN [ServiceController] Problem creating service 
jboss.system:type=Log4jService,service=Logging 
java.lang.IncompatibleClassChangeError 
at 
org.apache.log4j.joran.spi.JoranDocument.resolveEntity(JoranDocument.java:125) 
at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source) 
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source) 
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown 
Source) 
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source) 
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) 
at javax.xml.parsers.SAXParser.parse(Unknown Source) 
at javax.xml.parsers.SAXParser.parse(Unknown Source) 
at org.apache.log4j.joran.JoranConfigurator$1.parse(JoranConfigurator.java:87) 
at 
org.apache.log4j.joran.JoranConfigurator.doConfigure(JoranConfigurator.java:153)
 
at 
org.apache.log4j.joran.JoranConfigurator.doConfigure(JoranConfigurator.java:90) 
at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:61) 
at 
org.jboss.logging.Log4jService$URLWatchTimerTask.reconfigure(Log4jService.java:624)
 
at org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.java:563) 
at org.jboss.logging.Log4jService.setup(Log4jService.java:450) 
at org.jboss.logging.Log4jService.createService(Log4jService.java:466) 
at 
org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:238)
 
at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:220)
 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
at java.lang.reflect.Method.invoke(Method.java:585) 
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
 
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) 
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) 
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) 
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) 
at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
 
at $Proxy0.create(Unknown Source) 
at org.jboss.system.ServiceController.create(ServiceController.java:328) 
at org.jboss.system.ServiceController.create(ServiceController.java:273) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
at java.lang.reflect.Method.invoke(Method.java:585) 
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
 
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) 
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) 
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) 
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) 
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175) 
at $Proxy4.create(Unknown Source) 
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:217) 
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:898) 
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:754) 
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:718) 
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:702) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
at java.lang.reflect.Method.invoke(Method.java:585) 
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
 
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) 
at 
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
 
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) 
at 
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
 
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) 
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) 
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) 
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:175) 
at $Proxy5.deploy(Unknown Source) 
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413) 
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310) 
at org.jboss.Main.boot(Main.java:151) 
at org.jboss.Main$1.run(Main.java:405) 
at java.lang.Thread.run(Thread.java:595) 
17:22:23,690 INFO [WebService] Using RMI server codebase: http://ice16d:8183/ 
17:22:24,185 INFO [NamingService] Started jndi bootstrap jnpPort=1199, 
rmiPort=1198, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, 
Server [EMAIL PROTECTED] 
17:22:24,376 INFO [Log4jSocketServer] Listening on 
ServerSocket[addr=/0.0.0.0,port=0,localport=8888] 

Thanks & Regards,
-GnanaShekar-

-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 25, 2005 10:11 AM
To: Log4J Users List
Subject: RE: Need help using Chainsaw.


See the 'Chainsaw and a broken pipe' thread posted yesterday, which discusses 
the limitations of using a 1.2.8 SocketAppender with 1.3 SocketReceiver.  

Summary: location info (file/line/method/class) and MDC is not available if you 
use a combination of 1.2.8 socketappender and 1.3 socketreceiver.

There are no limitations when using 1.3 SocketAppender and 1.3 SocketReceiver.


-----Original Message-----
From:   Subramani, GnanaShekar (GE Healthcare, non-ge) [mailto:[EMAIL PROTECTED]
Sent:   Tue 1/25/2005 6:34 AM
To:     Log4J Users List
Cc:     
Subject:        RE: Need help using Chainsaw.
Hi,

I could upgrade the log4j or use a lower version of Chainsaw.  I went thru the 
forum and found that receivers are supported only in chainsaw v2.  In this case 
we are left only with the option to upgrade log4j to 1.3.
Please suggest a combination of Log4j and ChainSaw that I can use for 
SocketAppenders and SocketRecievers to work.

Thanks & Regards,
-GnanaShekar-

-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Monday, January 24, 2005 4:40 PM
To: Log4J Users List
Subject: RE: Need help using Chainsaw.


See the message I just posted about limitations of using a 1.2.8 SocketAppender 
with Chainsaw V2 (LocationInfo and MDC not supported from 1.2.8 to 1.3).

If LogFilePatternReceiver isn't an option (it's mean for local or 
URL-accessible log files), you can use the 
org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver receiver in Chainsaw V2 
to access log files over SSH.

To get VFSLogFilePatternReceiver to work, download VFS and any VFS dependencies 
(varies depending on how you are accessing the file, for example over SSH or 
ftp).  

Here's a link to download VFS and its dependencies:
http://jakarta.apache.org/commons/sandbox/vfs/download.html

Here's a list of supported file systems:
http://jakarta.apache.org/commons/sandbox/vfs/filesystems.html

Once you have everything you need downloaded (including jakarta ORO), either 
add all of these jars to your ext/lib (probably not what you want to do), or 
download the chainsaw bundle and modify the provided chainsaw.bat to include 
the other vfs-required jars.

The chainsaw bundle is available from Chainsaw's page: 
http://logging.apache.org/log4j/docs/chainsaw.html

Here's an example section of the Chainsaw config that can access log files via 
SSH, once you have the required jars in the classpath (note: I also had to have 
the hostname listed below in my $user.dir/ssh/known_hosts file).

<plugin name="ssh-example" 
class="org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver">
  <param name="fileURL" value="sftp://myusername:[EMAIL 
PROTECTED]:22/path/to/server.log" />
  <param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss,SSS"/> 
  <param name="logFormat" value="TIMESTAMP LEVEL [LOGGER] MESSAGE"/> 
  <param name="tailing" value="true" /> 
 </plugin>


Scott

-----Original Message-----
From:   Subramani, GnanaShekar (GE Healthcare, non-ge) [mailto:[EMAIL PROTECTED]
Sent:   Mon 1/24/2005 2:26 PM
To:     Log4J Users List
Cc:     
Subject:        RE: Need help using Chainsaw.
Hi Scott,

Thanks for the immediate reply.  I tried your steps, It looked like the steps 
are for jboss and chainsaw both running on the same computer.  My case is 
different and is explained below:
  
1. I have started the Log4jSocketServer service for jboss on port 8888 
(jboss-service.xml).
   <mbean code="org.jboss.logging.Log4jSocketServer"
      name="jboss.system:type=Log4jService,service=SocketServer">
      <attribute name="Port">8888</attribute>
      <attribute name="BindAddress">${jboss.bind.address}</attribute>
   </mbean>
2. FILE and CONSOLE are the two appenders defined by default in its log4j 
configuration file (log4j.xml).
3. I have added a new appender called SOCKET (log4j.xml).  
   <appender name="SOCKET" class="org.apache.log4j.net.SocketAppender">
      <param name="RemoteHost" value="3.231.202.149"/>
      <param name="Port" value="8888"/>
      <param name="ReconnectionDelay" value="30000"/>
      <param name="Threshold" value="INFO"/>
   </appender>

My assumption now is that jboss is logging onto a file, console and a socket.
I have installed Chainsaw on my laptop and trying to configure a receiver for 
this.  I am not able to get the receiver connect to socket on which jboss is 
throwing the logs.  
I am new to log4j.  Please correct me.

Thanks & Regards,
-GnanaShekar-




-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Monday, January 24, 2005 3:52 PM
To: Log4J Users List
Subject: RE: Need help using Chainsaw.


Here are instructions and a sample xml config file to configure Chainsaw V2 to 
read a jboss-created server.log log file.

Let us know if you have further questions.

Scott
--------------------
Directions:

- Save the chainsaw-jboss.xml file included below somewhere on your system.
- Modify the fileURL to point to the URL of your jboss server.log file.  If you 
have modified the logFormat, change that parameter as well (see the 
LogFilePatternReceiver javadocs for information on the logFormat parameter - 
available from Chainsaw's help menu).

Inside Chainsaw, select:
view-show application wide preferences
- enter the URL of this chainsaw-jboss.xml in the 'automatic configuration
URL' field (for example: file:///c:/downloads/chainsaw-jboss.xml)
- restart chainsaw

You can stop & start the receiver from the receiver panel to reload events from 
the file.

chainsaw-jboss.xml:
------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/";; debug="true">

   <plugin name="logFileReceiver"
class="org.apache.log4j.varia.LogFilePatternReceiver">
     <param name="fileURL"
value="file:///c:/downloads/jboss/server/default/log/server.log" />
     <param name="timestampFormat" value="HH:mm:ss,SSS"/> 
     <param name="logFormat" value="TIMESTAMP LEVEL [LOGGER] MESSAGE"/> 
     <param name="name" value="jboss-log-file" />
     <param name="tailing" value="true" /> 
   </plugin>

   <root>
      <level value="debug"/>
   </root>
</log4j:configuration>


-----Original Message-----
From:   Subramani, GnanaShekar (GE Healthcare, non-ge) [mailto:[EMAIL PROTECTED]
Sent:   Mon 1/24/2005 1:45 PM
To:     [email protected]
Cc:     
Subject:        Need help using Chainsaw.
Hi,

I have JBoss appserver running on solaris 8. Can somebody tell me in brief the 
steps involved for accessing jboss logs from my laptop thru Chainsaw.  I have 
installed Chainsaw V2 on my laptop.

Thanks & Regards,
-GnanaShekar-

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to