Thanks for helping out. I have figured out what the
problem is...I am using the latest log4j build
(jakarta-log4j-1.2alpha7) which has deprecated
Category.getInstance(String) method. And it is where
fulcrum's getManager() method is failing. I have
reverted back to log4j-1.1.3 and fulcrum is
initializing properly.

This is weird though...since log4j-1.2 is supposed to
be backward compatable and the method is only
deprecated.

thanks
srini

btw, here is the stack trace:

2002-02-16 11:37:32,465 DEBUG [main]
framework.BaseStrutsActionServlet (BaseStru
tsActionServlet.java:224) - Successfully initialized
log4j
java.lang.NoSuchMethodError
        at
org.apache.fulcrum.BaseServiceBroker.<init>(BaseServiceBroker.java:14
7)
        at
org.apache.fulcrum.TurbineServices.<init>(TurbineServices.java:81)
        at
org.apache.fulcrum.TurbineServices.<clinit>(TurbineServices.java:73)
        at
com.srinicom.common.framework.BaseStrutsActionServlet.initFulcrum(Bas
eStrutsActionServlet.java:243)
        at
com.srinicom.common.framework.BaseStrutsActionServlet.initInternal(Ba
seStrutsActionServlet.java:102)
        at
com.srinicom.common.framework.BaseStrutsActionServlet.init(BaseStruts
ActionServlet.java:72)
        at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)

        at
org.apache.tomcat.core.Handler.init(Handler.java:215)
        at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
        at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn
StartupInterceptor.java:130)
        at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java
:491)
        at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
        at
org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
        at
org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

--- Pete Kazmier <[EMAIL PROTECTED]> wrote:
> On Sat, Feb 16, 2002 at 07:10:59AM -0800, sri v
> wrote:
> > Pardon my ignorance, but can you tell me how to
> turn on the stack
> > trace and where to get it from in tomcat.  
> 
> You can probably find the stack traces in your
> Tomcat log files.  Look
> in $TOMCAT_HOME/logs, specifically in the file
> "localhost_log.DATE.txt"
> (assuming you haven't configured it otherwise).
> 
> > Meanwhile, I am sure that the failure is in the
> getManager() call,
> > since originally I was calling it somewhere late
> in the initialization
> > process after initializing other libraries such as
> log4j etc.,
>  
> I've attached a very rudimentary servlet that uses
> fulcrum's global
> cache service.  Perhaps this will be of assistance.
> 
> thanks,
> pete
> > package com.kazmier.test;
> 
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> 
> import org.apache.log4j.*;
> import org.apache.fulcrum.*;
> import org.apache.fulcrum.cache.*;
> import org.apache.stratum.configuration.*;
> 
> public class TestFulcrum extends HttpServlet 
> {
>     public void init()
>     {
>         try
>         {
>             String propsPath = 
>                    
>
getServletContext().getRealPath("./fulcrum.properties");
>             Configuration configuration = 
>                     (Configuration) new
> PropertiesConfiguration(propsPath);
>             ServiceManager serviceManager =
> TurbineServices.getManager();
>            
>
serviceManager.setApplicationRoot(getServletContext().getRealPath(""));
>            
> serviceManager.setConfiguration(configuration);
>             serviceManager.init();
>         }
>         catch (Exception e)
>         {
>         }
>     }
> 
>     public void doGet(HttpServletRequest request,
> HttpServletResponse response)
>         throws IOException, ServletException
>     {
>         response.setContentType("text/html");
>         PrintWriter out = response.getWriter();
>         out.println("<html>");
>         out.println("<body>");
>         out.println(testCache());
>         out.println("<body>");
>         out.println("</body>");
>         out.println("</html>");
>     }
> 
>     private String testCache()
>     {
>         GlobalCacheService gs = null;
>         try
>         {
>             gs = (GlobalCacheService)
> TurbineServices.getInstance().
>                    
> getService(GlobalCacheService.SERVICE_NAME);
>             CachedObject obj =
> gs.getObject("cached_object");
>             return "Got " + obj.getContents() + "
> from global cache";
>         }
>         catch(ObjectExpiredException gone)
>         {
>             gs.addObject("cached_object",
>                     new
> CachedObject("in_the_cache",5000));
>             return "Added new item to the cache!
> Expires in 5 seconds";
>         }
>     }
> }
> 
> > --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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

Reply via email to