You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Nick Bauman <ni...@cortexity.com> on 2001/09/06 05:15:55 UTC
Re: IllegalAccessException ?? LogSystem changed in 1.2
OK Geir, upgrading to 1.2-dev, I see the interface to LogSystem has
changed...
[javac] /home/nick/projects/ttmor/src/com/cortexity/util/VelocityLoggerAdapt
er.java:27: com.cortexity.util.VelocityLoggerAdapter should be declared
abstract; it does not define init
(org.apache.velocity.runtime.RuntimeServices) in
com.cortexity.util.VelocityLoggerAdapter
[javac] public final class VelocityLoggerAdapter implements LogSystem {
[javac] ^
[javac]
Note: /home/nick/projects/ttmor/src/com/cortexity/servlet/VTLDispatcher.java
uses or overrides a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 1 error
So I need to implement RuntimeServices interface in my LogSystem impl. and
make my logging interface consume that so that initializing Velocity
logging and my app's logging is done the same way? Sorry if this comes
across as Thick As A Whale Omlette (tm) as usual.
> On 9/5/01 1:00 AM, "Nick Bauman" <ni...@cortexity.com> wrote:
>
>> I have a Velocity Template that can't seem to render attributes from a
>> request dispacher's forward. What am I missing here?
>>
>> 04Sep-23:50:22.588[nnection-6802-0] INFO
>> |pache.velocity.VelocityContext| [info] ResourceManager :
>> found /diagnostic.vtl with loader
>> org.apache.velocity.runtime.resource.loader.FileResourceLoader
>> ASTMethod.execute() : exception invoking method 'getParameterNames' in
>> class com.caucho.server.http.DispatchRequest :
>> java.lang.IllegalAccessException
>> ASTMethod.execute() : exception invoking method 'getAttributeNames' in
>> class com.caucho.server.http.DispatchRequest :
>> java.lang.IllegalAccessException
>>
>> Thanks for the clue.
>
> Are you using 1.2-dev ? Looks like an introspector issue.
>
> Geir
>
> --
> Geir Magnusson Jr. geirm@optonline.net
> System and Software Consulting
> Developing for the web? See http://jakarta.apache.org/velocity/
> If you look up, there are no limits - Japanese Proverb
--
Nick Bauman
3600 N. Dupont
Minneapolis, MN 55412
Mobile: (612) 232-7120
Home: (612) 522-0165
Re: IllegalAccessException ?? LogSystem changed in 1.2
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/5/01 11:15 PM, "Nick Bauman" <ni...@cortexity.com> wrote:
> OK Geir, upgrading to 1.2-dev, I see the interface to LogSystem has
> changed...
>
> [javac] /home/nick/projects/ttmor/src/com/cortexity/util/VelocityLoggerAdapt
> er.java:27: com.cortexity.util.VelocityLoggerAdapter should be declared
> abstract; it does not define init
> (org.apache.velocity.runtime.RuntimeServices) in
> com.cortexity.util.VelocityLoggerAdapter
> [javac] public final class VelocityLoggerAdapter implements LogSystem {
> [javac] ^
> [javac]
> Note: /home/nick/projects/ttmor/src/com/cortexity/servlet/VTLDispatcher.java
> uses or overrides a deprecated API.
> [javac] Note: Recompile with -deprecation for details.
> [javac] 1 error
>
> So I need to implement RuntimeServices interface in my LogSystem impl. and
> make my logging interface consume that so that initializing Velocity
> logging and my app's logging is done the same way? Sorry if this comes
> across as Thick As A Whale Omlette (tm) as usual.
Not sure about how you phrased it, but you simply must add an init method
that takes a RuntimeServices argument.
Your logger has no responsibilities re that, just that the interface has to
have it for others that may want access to the runtime instance they are
running in.
Hope it isn't too much trouble. This is the obvious downside to using
interfaces rather than base classes...
geir