You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by James Clinton <Ja...@patsystems.com> on 2008/05/15 17:43:15 UTC

freemarker exception

Does anyone know how to resolve this freemarker error aside from
including the library?

 

I don't use freemarker and ideally don't want to add this dependency.

 

2008-05-15 16:31:03,651 ERROR
[org.apache.myfaces.shared_impl.util.ClassUtils] - Class :
org.apache.myfaces.renderkit.html.ext.HtmlOutputTextRenderer not found.

java.lang.NoClassDefFoundError: freemarker/template/TemplateException


RE: freemarker exception

Posted by James Clinton <Ja...@patsystems.com>.
Thanks to this thread the JSCookMenu component now works without the
sandbox lib and therefore no freemarker exception.

http://www.mail-archive.com/dev@myfaces.apache.org/msg22028.html

-----Original Message-----
From: James Clinton [mailto:James.Clinton@patsystems.com] 
Sent: Friday, May 16, 2008 10:24 AM
To: MyFaces Discussion
Subject: RE: freemarker exception

Simon,

The strange thing now is since moving to 1.2 my JSCookMenu component I
use will not work without tomahawk-sandbox-1.1.7.jar.

The menu renders but has JS errors when an event is triggered.

      'elements.jscook_action' is null or not an object.

When working with myfaces 1.1 and tomahawk 1.1.5, this worked fine
without the tomahawk-sandbox-1.1.7 lib.

Now I'm left without an exception free startup.  I did try adding in
freemarker.jar but it resulted in problems when using the application.

Any suggestions appreciated and thanks for your initial efforts.

James


-----Original Message-----
From: simon [mailto:simon.kitching@chello.at] 
Sent: Thursday, May 15, 2008 11:16 PM
To: MyFaces Discussion
Subject: Re: freemarker exception


On Thu, 2008-05-15 at 16:43 +0100, James Clinton wrote:
> Does anyone know how to resolve this freemarker error aside from
> including the library?
> 
>  
> 
> I don't use freemarker and ideally don't want to add this dependency.
> 
>  
> 
> 2008-05-15 16:31:03,651 ERROR
> [org.apache.myfaces.shared_impl.util.ClassUtils] - Class :
> org.apache.myfaces.renderkit.html.ext.HtmlOutputTextRenderer not
> found.
> 
> java.lang.NoClassDefFoundError:freemarker/template/TemplateException
> 
> 

This renderer class is from tomahawk sandbox (James, if you'd said that
it would have saved me some time).

Class DefaultTemplateEncoder does indeed use freemarker. But as far as I
can see, the DefaultTemplateEncoder class is only loaded if
TemplateRenderer.encodeTemplate is called.

So I would think that an attempt to load this class (and therefore
freemarker) only occurs if you try to use the associated component in
your page. And if you don't want to have freemarker around then you
should avoid using sandbox components that need it..

The sandbox class HtmlOutputTextRenderer does extend TemplateRenderer.
The name is a little suspicious; it sounds initially like a custom
renderer for the standard h:outputText class, but I really doubt that. I
would guess it's just a confusing name, and that it is a renderer for a
special sandbox component.

I don't have time to look any further at the moment.

Martin Marinschek appears to have been the most recent person to work on
this (and that was july last year). Martin?

Regards,
Simon


RE: freemarker exception

Posted by James Clinton <Ja...@patsystems.com>.
Simon,

The strange thing now is since moving to 1.2 my JSCookMenu component I
use will not work without tomahawk-sandbox-1.1.7.jar.

The menu renders but has JS errors when an event is triggered.

      'elements.jscook_action' is null or not an object.

When working with myfaces 1.1 and tomahawk 1.1.5, this worked fine
without the tomahawk-sandbox-1.1.7 lib.

Now I'm left without an exception free startup.  I did try adding in
freemarker.jar but it resulted in problems when using the application.

Any suggestions appreciated and thanks for your initial efforts.

James


-----Original Message-----
From: simon [mailto:simon.kitching@chello.at] 
Sent: Thursday, May 15, 2008 11:16 PM
To: MyFaces Discussion
Subject: Re: freemarker exception


On Thu, 2008-05-15 at 16:43 +0100, James Clinton wrote:
> Does anyone know how to resolve this freemarker error aside from
> including the library?
> 
>  
> 
> I don't use freemarker and ideally don't want to add this dependency.
> 
>  
> 
> 2008-05-15 16:31:03,651 ERROR
> [org.apache.myfaces.shared_impl.util.ClassUtils] - Class :
> org.apache.myfaces.renderkit.html.ext.HtmlOutputTextRenderer not
> found.
> 
> java.lang.NoClassDefFoundError:freemarker/template/TemplateException
> 
> 

This renderer class is from tomahawk sandbox (James, if you'd said that
it would have saved me some time).

Class DefaultTemplateEncoder does indeed use freemarker. But as far as I
can see, the DefaultTemplateEncoder class is only loaded if
TemplateRenderer.encodeTemplate is called.

So I would think that an attempt to load this class (and therefore
freemarker) only occurs if you try to use the associated component in
your page. And if you don't want to have freemarker around then you
should avoid using sandbox components that need it..

The sandbox class HtmlOutputTextRenderer does extend TemplateRenderer.
The name is a little suspicious; it sounds initially like a custom
renderer for the standard h:outputText class, but I really doubt that. I
would guess it's just a confusing name, and that it is a renderer for a
special sandbox component.

I don't have time to look any further at the moment.

Martin Marinschek appears to have been the most recent person to work on
this (and that was july last year). Martin?

Regards,
Simon


Re: freemarker exception

Posted by simon <si...@chello.at>.
On Thu, 2008-05-15 at 16:43 +0100, James Clinton wrote:
> Does anyone know how to resolve this freemarker error aside from
> including the library?
> 
>  
> 
> I don’t use freemarker and ideally don’t want to add this dependency.
> 
>  
> 
> 2008-05-15 16:31:03,651 ERROR
> [org.apache.myfaces.shared_impl.util.ClassUtils] - Class :
> org.apache.myfaces.renderkit.html.ext.HtmlOutputTextRenderer not
> found.
> 
> java.lang.NoClassDefFoundError:freemarker/template/TemplateException
> 
> 

This renderer class is from tomahawk sandbox (James, if you'd said that
it would have saved me some time).

Class DefaultTemplateEncoder does indeed use freemarker. But as far as I
can see, the DefaultTemplateEncoder class is only loaded if
TemplateRenderer.encodeTemplate is called.

So I would think that an attempt to load this class (and therefore
freemarker) only occurs if you try to use the associated component in
your page. And if you don't want to have freemarker around then you
should avoid using sandbox components that need it..

The sandbox class HtmlOutputTextRenderer does extend TemplateRenderer.
The name is a little suspicious; it sounds initially like a custom
renderer for the standard h:outputText class, but I really doubt that. I
would guess it's just a confusing name, and that it is a renderer for a
special sandbox component.

I don't have time to look any further at the moment.

Martin Marinschek appears to have been the most recent person to work on
this (and that was july last year). Martin?

Regards,
Simon