You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Felix Guerrero <de...@hotmail.com> on 2001/08/01 21:15:52 UTC

Velocity init problem with Tomcat

Hi,

I am really excited about using Velocity. I am doing the initialization of 
Velocity inside the init method of a jsp.  It works fine when the JSP runs 
the init method on its own but if I declare in the web.xml file that the jsp 
should be initialized when the context is invoked then I get the following 
error:
>>>>>>>>>>
./tomcat.sh: line 180: 13477 Segmentation fault      $JAVACMD $TOMCAT_OPTS 
-Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@"
>>>>>>>>>
I tried the same with a servlet I get the same error. Again if I do not 
declare the "load-on-startup" then it works fine.

Here is the code that I am embedding:



  System.out.println( "initializing the servlet " );
      Properties p = new Properties();
      p.setProperty( "file.resource.loader.path", 
"/opt/jakarta/webapps/ROOT" );
      p.setProperty( "file.resource.loader.cache", "true" );
      p.setProperty( "file.resource.loader.modificationCheckInterval", "5" 
);
	p.setProperty( "runtime.log", "/opt/jakarta/webapps/ROOT/velocity.log" );
	try{
		Velocity.init( p );
	}catch( Exception e ){
	}

Thanks.

Felix.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


Re: Velocity init problem with Tomcat

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Did this ever resolve for you?

Do you have a stacktrace?

why a jsp?

geir

Felix Guerrero wrote:
> 
> Hi,
> 
> I am really excited about using Velocity. I am doing the initialization of
> Velocity inside the init method of a jsp.  It works fine when the JSP runs
> the init method on its own but if I declare in the web.xml file that the jsp
> should be initialized when the context is invoked then I get the following
> error:
> >>>>>>>>>>
> ./tomcat.sh: line 180: 13477 Segmentation fault      $JAVACMD $TOMCAT_OPTS
> -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@"
> >>>>>>>>>
> I tried the same with a servlet I get the same error. Again if I do not
> declare the "load-on-startup" then it works fine.
> 
> Here is the code that I am embedding:
> 
>   System.out.println( "initializing the servlet " );
>       Properties p = new Properties();
>       p.setProperty( "file.resource.loader.path",
> "/opt/jakarta/webapps/ROOT" );
>       p.setProperty( "file.resource.loader.cache", "true" );
>       p.setProperty( "file.resource.loader.modificationCheckInterval", "5"
> );
>         p.setProperty( "runtime.log", "/opt/jakarta/webapps/ROOT/velocity.log" );
>         try{
>                 Velocity.init( p );
>         }catch( Exception e ){
>         }
> 
> Thanks.
> 
> Felix.
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb