RE: lucene+Tomcat

2005-06-01 Thread Subhrajyoti Moitra
Are u sure lucene-1.4.3.jar is in the WEB-INF/lib directory? U don't
need to put this jar in $CLASSPATH variable explicitly.

-Subhro.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 31, 2005 9:59 PM
To: Tomcat Users List
Subject: Re: lucene+Tomcat

I think the lucene list might be of more help

-Tim

Zakaria KHABOT wrote:

 hi all,
 I try to display the demo example of lucene.
 I am using tomcat 5.5.4. Index.jsp is displayed but when I click 
 search I encountred this message error :
 I have put  ' lucene-1.4.3.jar and lucene-demos-1.4.3.jar' in the 
 classPath. Thanks for all
 
 org.apache.jasper.JasperException: Unable to compile class for
JSPNote: 
 sun.tools.javac.Main has been deprecated.
 
 D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:6: 
 Package org.apache.lucene.analysis not found in import.
 import  org.apache.lucene.analysis.*;
^
 
 D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:7: 
 Package org.apache.lucene.document not found in import.
 import  org.apache.lucene.document.*;
^
 
 D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:8: 
 Package org.apache.lucene.index not found in import.
 import  org.apache.lucene.index.*;
^
 
 D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:9: 
 Package org.apache.lucene.search not found in import.
 import  org.apache.lucene.search.*;
^
 
 D:\eclipse\workspace\PFE\work\org\apache\jsp\html\results$jsp.java:10:

 Package org.apache.lucene.queryParser not found in import.
 import  org.apache.lucene.queryParser.*;
^
 5 errors, 1 warning
 
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
 org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)

org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J
spServlet.java:177) 
 

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:189) 
 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)

 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 

-
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]



Help with reloading a servlet for log4j logging.

2005-05-26 Thread Subhrajyoti Moitra
Hi,

 

I am initializing Log4J system using an init servlet, which is loaded on
start-up (servlet name is Log4JInitServlet).

In web.xml I am pointing to the log4j.properties file using the param
tag.

 

 

Problem

Now suppose I change some properties in log4j.properties file. (change
the log level for example).

I want to reload this file with the changed properties and restart log4j
system with these new properties.

 

Question

 

Can I re-load the new properties file (and consequently the log4j
system) by reloading the initservlet (LogJInitServlet)?

Something similar to reloading an entire webcontext using
http://localhost/manager?reload=myLog4JApp. 

I don't want to restart tomcat to restart the logging system.

Can this be done in tomcat?

 

I am using tomcat 4.x version, on win32/linux systems.

 

Thanks a lot in advance,

 

Subhro.

 

 



RE: Help with reloading a servlet for log4j logging.

2005-05-26 Thread Subhrajyoti Moitra
It worked

Thanks a lot Mariano!

-Original Message-
From: Mariano [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 26, 2005 12:23 PM
To: 'Tomcat Users List'
Subject: RE: Help with reloading a servlet for log4j logging.

You must use
PropertyConfigurator.configureAndWatch(fileProperties,miliseconds)

By

Mariano

-Mensaje original-
De: Subhrajyoti Moitra [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 26 de mayo de 2005 8:35
Para: tomcat-user@jakarta.apache.org
Asunto: Help with reloading a servlet for log4j logging.


Hi,

 

I am initializing Log4J system using an init servlet, which is loaded on
start-up (servlet name is Log4JInitServlet).

In web.xml I am pointing to the log4j.properties file using the param
tag.

 

 

Problem

Now suppose I change some properties in log4j.properties file. (change
the log level for example).

I want to reload this file with the changed properties and restart log4j
system with these new properties.

 

Question

 

Can I re-load the new properties file (and consequently the log4j
system) by reloading the initservlet (LogJInitServlet)?

Something similar to reloading an entire webcontext using
http://localhost/manager?reload=myLog4JApp. 

I don't want to restart tomcat to restart the logging system.

Can this be done in tomcat?

 

I am using tomcat 4.x version, on win32/linux systems.

 

Thanks a lot in advance,

 

Subhro.

 

 



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



Parsing Log4J log file.

2005-05-26 Thread Subhrajyoti Moitra
Hi,

 

Given :

 

I am using Log4J along with AspectJ for logging.

The Conversion pattern I am using in log4j is as follows. (This is just
an example)

%d{ABSOLUTE} %5p %X{JSESSIONID} %c{1}:%L - %m%n

 

In a Servlet filter I am setting the JSESSIONID in a MDC.

 

So finally my logs are something like this:

 

snip

19:45:00,745  WARN 16CB951ED8ADBB1262AC21944AD94AF8 trace:76 - Exiting
[com.xx.ac.xxx.connection.CConnectionManager.getActiveSize]

19:45:00,745  WARN 16CB951ED8ADBB1262AC21944AD94AF8 trace:66 - Entering
[com.xx.ac.xxx.connection.CConnectionManager.getCacheSize]

19:45:00,745  WARN 16CB951ED8ADBB1262AC21944AD94AF8 trace:76 - Exiting
[com.xx.ac.xxx.connection.CConnectionManager.getCacheSize]

19:45:00,745  WARN 16CB951ED8ADBB1262AC21944AD94AF8 trace:76 - Exiting
[com.xx.ac.xxx.connection.CConnectionManager.getConnection]

19:45:00,745  WARN 5DAD9A3F70E9FE171F41CFF12CFE480B trace:76 - Exiting
[com.xx.ac.xxx.academy.AcademyQry.getNextAcademyToInitialize]

19:45:00,839  WARN 16CB951ED8ADBB1262AC21944AD94AF8 trace:76 - Exiting
[com.xx.ac.xxx.connection.CConnectionManager.getConnection]

19:45:00,839  WARN 5DAD9A3F70E9FE171F41CFF12CFE480B trace:76 - Exiting
[com.xx.ac.xxx.academy.Academy.getNextAcademyToInitialize]

19:45:00,839  WARN 16CB951ED8ADBB1262AC21944AD94AF8 trace:76 - Exiting
[com.xx.ac.xxx.connection.CDataSourceManager.getConnection]

19:45:00,839  WARN 5DAD9A3F70E9FE171F41CFF12CFE480B trace:59 -
Initializing
[com.xx.ac.xxx.presentation.servlet.event.CForwardResolution.init]

19:45:00,855  WARN 16CB951ED8ADBB1262AC21944AD94AF8 trace:76 - Exiting
[com.xx.ac.xxx.sql.CSqlStatementFactory.createPreparedStatement]

19:45:00,855  WARN 5DAD9A3F70E9FE171F41CFF12CFE480B trace:66 - Entering
[com.xx.ac.xxx.presentation.servlet.state.CStateManager.put]

19:45:00,855  WARN 5DAD9A3F70E9FE171F41CFF12CFE480B trace:76 - Exiting
[com.xx.ac.xxx.presentation.servlet.state.CStateManager.put]

 

snip

 

 

Each log statement has the session id along with it.

 

 

Problem:

 

I want a log viewer. A graph plotted for each SET of session ids. So the
user will enter some thing like 16CB951ED8ADBB1262AC21944AD94AF8 as
input(to start with). My viewer will parse all the entries in the log
file for the particular sessionid entered by the user. It will then plot
a graph with the names of methods/classes. So basically the idea is to
get a picture of all the method calls that got executed. The viewer need
not process log files in real time. 

So I am looking for some API for parsing Log4J logs. I know of chainsaw.
But I don't know if this can parse existing log files and give some sort
of plot of all the method calls.

 

Possible Solution: 

 

Write a perl script to parse the log files. Feed this data in some graph
plotter. Probably use some cross platform GUI toolkit for some
flamboyancy (wxWindows/Swing). This is required to be running on
Linux/Win32 systems. I am not very accommodating with Swing. But if it
can fix the problem, I will be more than happy.

Alternatively I can use Perl:GD wrapper to generate png images on the
fly and display it on a browser. This will be very good.

Please suggest something on this regard. 

 

 

 

 

 

Thanks a lot in advance.

 

Subhro