You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Michael Della Bitta <md...@columbia.edu> on 2004/04/14 23:59:20 UTC
velocity error... PEBCAK?
Hello, everybody,
i've developed a particular web application that utilizes
VelocityViewServlet that a coworker of mine would like to use as a
model to create a different application. so he copied the jars from my
context's lib directory into his own, grabbed the base classes i wrote
that my stuff is running from and compiled them, and hollowed out one
of my most basic subclasses to start off from. compiling all of this
goes fine, but when he tries to execute that sample servlet, he gets
this stacktrace:
2004-04-14 17:30:55 StandardWrapperValve[homeservlet]: Allocate
exception for servlet homeservlet
javax.servlet.ServletException: Error allocating a servlet instance
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
665)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:210)
[typical stuff deleted]
----- Root Cause -----
java.lang.NoClassDefFoundError:
org/apache/velocity/tools/view/servlet/VelocityViewServlet
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
[more typical stuff deleted]
velocity-tools-view-1.0.jar is in his context WEB-INF/lib folder and
has world read permissions. and when i run this against it:
jar -tf velocity-tools-view-1.0.jar | grep VelocityViewServlet
it finds the class file. doing a diff between my and his version of the
jar yields no changes. literally commenting out the normal class block
in the servlet he wrote and putting a generic subclass of HttpServlet
that just outputs Hellow, World in the same file and compiling and
deploying that over the normal class file in the context works fine, so
this isn't a deployment descriptor issue. i'm sort of at a loss for why
this could be happening. i've tried about all i can think of at this
point.
any ideas? :(
Michael Della Bitta
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: velocity error... PEBCAK?
Posted by Barbara Baughman <ba...@utdallas.edu>.
Shot in the dark ...
Have you looked in the tomcat logs for any startup error messages? I
have found that sometimes tomcat system errors cause this kind of
error message in Velocity even though all is well with the jar. In
this case, I found that error messages in the tomcat logs pointed to
something bad happening before it got here. Haven't seen this
particular problem, though.
Barbara Baughman
X2157
On Wed, 14 Apr 2004, Michael Della Bitta wrote:
> Hello, everybody,
>
> i've developed a particular web application that utilizes
> VelocityViewServlet that a coworker of mine would like to use as a
> model to create a different application. so he copied the jars from my
> context's lib directory into his own, grabbed the base classes i wrote
> that my stuff is running from and compiled them, and hollowed out one
> of my most basic subclasses to start off from. compiling all of this
> goes fine, but when he tries to execute that sample servlet, he gets
> this stacktrace:
>
> 2004-04-14 17:30:55 StandardWrapperValve[homeservlet]: Allocate
> exception for servlet homeservlet
> javax.servlet.ServletException: Error allocating a servlet instance
> at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
> 665)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:210)
> [typical stuff deleted]
> ----- Root Cause -----
> java.lang.NoClassDefFoundError:
> org/apache/velocity/tools/view/servlet/VelocityViewServlet
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
> [more typical stuff deleted]
>
> velocity-tools-view-1.0.jar is in his context WEB-INF/lib folder and
> has world read permissions. and when i run this against it:
>
> jar -tf velocity-tools-view-1.0.jar | grep VelocityViewServlet
>
> it finds the class file. doing a diff between my and his version of the
> jar yields no changes. literally commenting out the normal class block
> in the servlet he wrote and putting a generic subclass of HttpServlet
> that just outputs Hellow, World in the same file and compiling and
> deploying that over the normal class file in the context works fine, so
> this isn't a deployment descriptor issue. i'm sort of at a loss for why
> this could be happening. i've tried about all i can think of at this
> point.
>
> any ideas? :(
>
> Michael Della Bitta
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org