Hello,

What might be wrong in your setup is that there are no servlets in your
WEB-INF/web.xml which can start the MMBase system. You will see those lines
when you access a jsp page with MMBase tag code and the MMBase system is not
started.

The default MMBase distro web.xml uses the version servlet to start the
system. Notice that the load-on-startup is 1.

  <!-- The base MMBase servlet informs about the current MMBase version -->
  <servlet>
    <servlet-name>version</servlet-name>
    <description>To get the version of MMBase</description>
    <servlet-class>org.mmbase.servlet.MMBaseServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <!-- mapping for version-request -->
  <servlet-mapping>
    <servlet-name>version</servlet-name>
    <url-pattern>/version</url-pattern>
  </servlet-mapping>

The init of the servlet calls the init of MMBase. There are also some
commented out filters in the MMBase web.xml which will call the init of
MMBase. MMBase assumes that the config dir is under WEB-INF/config. We use a
servlet or filter to start MMBase to get access to the ServletContext. Based
on that we can figure out where the config dir is on the filesystem.

The config dir contains a caches.xml where the sizes of the caches are
configured. The taglib uses an AttributeCache which could be configured by
the caches.xml. It is not in there, but you could add this.
  <cache name="TagAttributeCache">
    <status>active</status>
    <size>1000</size>
  </cache>
Default, the AttributeCache wiil not find an entry in the caches.xml and
will have 1000 entries.

The stacktrace you posted is when the AttributeCache is initialized. This
fails because the caches.xml was not found. The reason for that is that the
config dir is not known yet (Your last few lines).

If you don't want you config dir in the WEB-INF then you could do what
Michiel proposed. Add the context-param to the web.xml. You still have to
start MMBase by a servlet or filter otherwise we can't access the
ServletContext and we can't read the context-param. You could also add
-Dmmbase.config to the jvm command, but this one is only read when the
MMBase system is started (servlet or filter).

IOW check your web.xml and add one of our servlets or filters.

Nico

PS. Is this an answer we should put in the Kbase :-)

----------------------------------------------------------------------
Experience is what you get when you don't get what you wanted in the first
place.


> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Namens Felix
> Verzonden: vrijdag 4 juni 2004 13:41
> Aan: [EMAIL PROTECTED]
> Onderwerp: problem with installation - winxp Apache 
> Tomcat/4.0.1 MMBase 1.7
> 
> hi,
> i am getting this error. 
> i have winxp with Apache Tomcat/4.0.1 running and MMBase 1.7 
> i used java 1.4. 
> please help. 
> 
> i can see from last few lines,
> ====
> Caused by: java.lang.RuntimeException: The init method should 
> be called first (or start with mmbase.config parameter) at
> org.mmbase.module.core.MMBaseContext.getConfigPath(MMBaseConte
> xt.java:355)
> ====
> as the error but how can i start init method first? 
> 
> 
> 
> 
> ****************The Error that i am getting*************** 
> 
> 
> Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error 
> 
> 
> --------------------------------------------------------------
> ------------------ 
> 
> type Exception report 
> 
> message Internal Server Error 
> 
> description The server encountered an internal error 
> (Internal Server Error) that prevented it from fulfilling 
> this request. 
> 
> exception 
> 
> javax.servlet.ServletException
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(
> PageContextImpl.java:457)
> at
> org.apache.jsp.index$jsp._jspService(index$jsp.java:342)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:202)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:382)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:243)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:201)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.valves.CertificatesValve.invoke(Certificat
> esValve.java:246)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2344)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:164)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.java:170)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:170)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:462)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:163)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpP
> rocessor.java:1011)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
> ssor.java:1106)
> at java.lang.Thread.run(Unknown Source) 
> 
> 
> root cause 
> 
> java.lang.ExceptionInInitializerError
> at
> org.mmbase.bridge.jsp.taglib.util.Attribute.(Attribute.java:34)
> at
> org.mmbase.bridge.jsp.taglib.ContextReferrerTag.(ContextReferr
> erTag.java:52)
> at
> org.mmbase.bridge.jsp.taglib.LocaleTag.(LocaleTag.java:27)
> at
> org.mmbase.bridge.jsp.taglib.ContentTag.(ContentTag.java:37)
> at
> org.mmbase.bridge.jsp.taglib.ContentTag$1.(ContentTag.java:48)
> at
> org.mmbase.bridge.jsp.taglib.ContentTag.(ContentTag.java:45)
> at
> org.apache.jsp.index$jsp._jspService(index$jsp.java:57)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:202)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:382)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:243)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:201)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.valves.CertificatesValve.invoke(Certificat
> esValve.java:246)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2344)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:164)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.java:170)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:170)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:462)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:564)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:163)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpP
> rocessor.java:1011)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
> ssor.java:1106)
> at java.lang.Thread.run(Unknown Source) Caused by: 
> java.lang.RuntimeException: The init method should be called 
> first (or start with mmbase.config parameter) at
> org.mmbase.module.core.MMBaseContext.getConfigPath(MMBaseConte
> xt.java:355)
> at org.mmbase.cache.Cache.(Cache.java:121)
> ... 43 more 
> 
> 
> 
> *************************End of Error********************* 
> regards, C. Felix JeyaReuben 
> 


Reply via email to