velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <te...@net-frame.com>
Subject Re: Velocity Conflict with Tomcat 4?
Date Mon, 09 Dec 2002 14:09:26 GMT
Peter,

I'm using the Enhydra framework with Tomcat.  The Session object belongs to
Enhydra, not Tomcat.  I'm not using Tomcat's session logic at all - partly
because I have one that's portable across all servlet containers and partly
because I am doing more stuff than you can do with the native Tomcat session
API's.

As I said, my application (with its Velocity component) has worked perfectly
with Tomcat 3.2.4 and 3.3.1, (using Velocity 1.2 and 1.4) but the part I've
mentioned is broken with Tomcat 4.0.  And, as I said in my original message,
I have a suspicion that it has to do with Velocity's introspection.  I've
not tried the application and Tomcat 4 with an earlier version of Velocity,
so that's still something I could try.

Hope that gives a bit of useful background.  I am really puzzled about this
problem and hope that one of you folks out there can give me a hint as to
what's wrong.

Regards,

Terry


----- Original Message -----
From: "Peter Romianowski" <megapero@gmx.de>
To: "'Velocity Users List'" <velocity-user@jakarta.apache.org>
Sent: Sunday, December 08, 2002 10:37 PM
Subject: RE: Velocity Conflict with Tomcat 4?


>   There is no getSessionData()-method in Tomcat 4 (Catalina). Perhaps
> you are mixing some jars (since there is no package like
> org/apache/tomcat/core in Tomcat 4 either)?
>
>   BTW: getSessionData() is not defined in the Servlet-Spec (There was
> a getSessionContext()-method, but that is deprecated in Servlet 2.1. It
> is still there but you should not use it.)
>
>   What are you trying to do? Why is the standard method-set of
> javax.servlet.http.HttpSession not enough?
>
> I hope I did not raise too much confusion? :)
>
> Peter
>
>
> > -----Original Message-----
> > From: Terry Steichen [mailto:terry@net-frame.com]
> > Sent: Monday, December 09, 2002 3:43 AM
> > To: velocity-user@jakarta.apache.org
> > Subject: Velocity Conflict with Tomcat 4?
> >
> >
> > I have a servlet application that uses velocity 1.4-dev and
> > in which I have an object
> > (Session) that I'm inserting into the VelocityContext as
> > "session".  Then I'm
> > attempting to invoke the public method 'getSessionData()'.
> > It works perfectly with Tomcat version 3.3.1 and earlier.
> > But when I try it under Tomcat 4.1.12, it throws an exception
> > (with the stack trace at the end of this message).
> >
> > My application is fairly complex but everything works just
> > fine - except invoking this particular method.  It appears
> > that Velocity is getting confused in its introspection about
> > the 'Context' object.
> >
> > Any thoughts on how to deal with this would be *greatly* appreciated.
> >
> > TIA,
> >
> > Terry
> >
> >
> >
> > java.lang.NoClassDefFoundError: org/apache/tomcat/core/Context
> >
> >  at java.lang.Class.getMethods0(Native Method)
> >
> >  at java.lang.Class.getMethods(Class.java:742)
> >
> >  at
> > org.apache.velocity.util.introspection.ClassMap.getAccessibleM
> > ethods(ClassMap.java:296)
> >
> >  at
> > org.apache.velocity.util.introspection.ClassMap.populateMethod
> > Cache(ClassMap.java:189)
> >
> >  at
> > org.apache.velocity.util.introspection.ClassMap.<init>(ClassMa
> > p.java:102)
> >
> >  at
> > org.apache.velocity.util.introspection.IntrospectorBase.create
> > ClassMap(IntrospectorBase.java:164)
> >
> >  at
> > org.apache.velocity.util.introspection.IntrospectorBase.getMet
> > hod(IntrospectorBase.java:150)
> >
> >  at
> > org.apache.velocity.util.introspection.Introspector.getMethod(
> > Introspector.java:138)
> >
> >  at
> > org.apache.velocity.runtime.parser.node.PropertyExecutor.disco
> > ver(PropertyExecutor.java:111)
> >
> >  at
> > org.apache.velocity.runtime.parser.node.PropertyExecutor.<init
> > >(PropertyExecutor.java:85)
> >
> >  at
> > org.apache.velocity.util.introspection.UberspectImpl.getProper
> > tyGet(UberspectImpl.java:194)
> >
> >  at
> > org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(
> > ASTIdentifier.java:169)
> >
> >  at
> > org.apache.velocity.runtime.parser.node.ASTReference.execute(A
> > STReference.java:218)
> >
> >  at
> > org.apache.velocity.runtime.parser.node.ASTReference.render(AS
> > TReference.java:263)
> >
> >  at
> > org.apache.velocity.runtime.parser.node.SimpleNode.render(Simp
> > leNode.java:271)
> >
> >  at org.apache.velocity.Template.merge(Template.java:296)
> >
> >  at
> > npg1.business.VelocityService.handleRequest(VelocityService.java:300)
> >
> >  at
> > npg1.business.VelocityService.handleRequest(VelocityService.java:256)
> >
> >  at npg1.presentation.VelocityPO.getOutput(VelocityPO.java:81)
> >
> >  at npg1.presentation.VTest.processRequest(VTest.java:27)
> >
> >  at npg1.presentation.VelocityPO.run(VelocityPO.java:395)
> >
> >  at
> > com.lutris.appserver.server.httpPresentation.HttpPresentationM
> > anager.runPresentationObj(HttpPresentationManager.java:423)
> >
> >  at
> > com.lutris.appserver.server.httpPresentation.HttpPresentationM
> > anager.Run(HttpPresentationManager.java:231)
> >
> >  at
> > com.lutris.appserver.server.httpPresentation.servlet.HttpPrese
> > ntationServlet.serviceDirect(HttpPresentationServlet.java:617)
> >
> >  at
> > com.lutris.appserver.server.httpPresentation.servlet.HttpPrese
> > ntationServlet.service(HttpPresentationServlet.java:799)
> >
> >  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:260)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> > eContext.invokeNext(StandardPipeline.java:643)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> > ine.java:480)
> >
> >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> >  at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardC
> > ontextValve.java:191)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> > eContext.invokeNext(StandardPipeline.java:643)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> > ine.java:480)
> >
> >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> >  at
> > org.apache.catalina.core.StandardContext.invoke(StandardContex
> > t.java:2396)
> >
> >  at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> > Valve.java:180)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> > eContext.invokeNext(StandardPipeline.java:643)
> >
> >  at
> > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> > spatcherValve.java:170)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> > eContext.invokeNext(StandardPipeline.java:641)
> >
> >  at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> > Valve.java:172)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> > eContext.invokeNext(StandardPipeline.java:641)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> > ine.java:480)
> >
> >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> >  at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> > gineValve.java:174)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> > eContext.invokeNext(StandardPipeline.java:643)
> >
> >  at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> > ine.java:480)
> >
> >  at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >
> >  at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> > java:223)
> >
> >  at
> > org.apache.coyote.http11.Http11Processor.process(Http11Process
> > or.java:405)
> >
> >  at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> > r.processConnection(Http11Protocol.java:380)
> >
> >  at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> > nt.java:508)
> >
> >  at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> > ThreadPool.java:533)
> >
> >  at java.lang.Thread.run(Thread.java:484)
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message