You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Sam Joseph <ga...@yha.att.ne.jp> on 2002/04/05 02:29:42 UTC

Examples and Split jar files

Hi there,

Not sure if this is the right place for bugs, but I think that the 
latest release of velocity has a small problem in that the ant build.xml 
file doesn't place the velocity-dep-1.2.jar in the forumdemo.  It may be 
that I didn't use ant exactly according to your instructions, but I 
would have thought that the build.xml file should include a depedency 
that makes sure both velocity-1.2.jar and velocity-dep-1.2.jar are 
present in the forumdemo war ....

I encountered the same problem (lack of velocity-dep-1.2.jar) running 
the sample servlet.  In both cases I fixed the problem by dropping the 
additional jar into the appropriate location, but I note that the 
instructions in the relevant readme file just say

 - put the velocity.jar into the velexample/WEB-INF/lib directory

which might interpret just to mean the single velocity-1.2.jar

Nice project by the way.

CHEERS> SAM


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Examples and Split jar files

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 4/5/02 2:09 AM, "Sam Joseph" <ga...@yha.att.ne.jp> wrote:

> Geir Magnusson Jr. wrote:
> 
>> On 4/4/02 7:29 PM, "Sam Joseph" <ga...@yha.att.ne.jp> wrote:
>> 
>>> Hi there,
>>> 
>>> Not sure if this is the right place for bugs, but I think that the
>>> latest release of velocity has a small problem in that the ant build.xml
>>> file doesn't place the velocity-dep-1.2.jar in the forumdemo.  It may be
>>> that I didn't use ant exactly according to your instructions, but I
>>> would have thought that the build.xml file should include a depedency
>>> that makes sure both velocity-1.2.jar and velocity-dep-1.2.jar are
>>> present in the forumdemo war ....
>>> 
>> 
>> Yep - if you are right, we should fix that.  Will do in the 1.3 release.
>> 
>> However - you don't need both jars - because the -dep- jar is the velocity
>> jar with its dependencies (commons-collections and avalon-logkit)
>> included...
>> 
> Hmm, maybe I was mistaken then, because adding the velocity-dep-1.2.jar
> certainly seemed to clear up the problem ... I'll just see if I can
> replicate it ....
> 
> Yeah, if I remove the velocity-dep-1.2.jar from the forumdemo I get this
> error appended below.
> If I put velocity-dep-1.2.jar back in it goes away -- maybe something
> necessary is missing from velocity-1.2.jar, or, ah, I think I understand
> - the system is supposed to work with the velocity-dep-1.2.jar and the
> velocity-1.2.jar is not intended for the examples ....  I just have to
> make sure to use the velocity-dep-1.2.jar in tomcat ....

[snip]

Yep - you got a class not found exception because the non-dep jar doesn't
contain the external dependencies and the -dep jar does, for convenience.

Another way :

Velocity-dep-1.2.jar == velocity-1.2.jar + commons-collections.jar +
logkit.jar


-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
The bytecodes are language independent. - Sam Ruby  


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Examples and Split jar files

Posted by Sam Joseph <ga...@yha.att.ne.jp>.
Geir Magnusson Jr. wrote:

>On 4/4/02 7:29 PM, "Sam Joseph" <ga...@yha.att.ne.jp> wrote:
>
>>Hi there,
>>
>>Not sure if this is the right place for bugs, but I think that the
>>latest release of velocity has a small problem in that the ant build.xml
>>file doesn't place the velocity-dep-1.2.jar in the forumdemo.  It may be
>>that I didn't use ant exactly according to your instructions, but I
>>would have thought that the build.xml file should include a depedency
>>that makes sure both velocity-1.2.jar and velocity-dep-1.2.jar are
>>present in the forumdemo war ....
>>
>
>Yep - if you are right, we should fix that.  Will do in the 1.3 release.
>
>However - you don't need both jars - because the -dep- jar is the velocity
>jar with its dependencies (commons-collections and avalon-logkit)
>included...
>
Hmm, maybe I was mistaken then, because adding the velocity-dep-1.2.jar 
certainly seemed to clear up the problem ... I'll just see if I can 
replicate it ....

Yeah, if I remove the velocity-dep-1.2.jar from the forumdemo I get this 
error appended below.
If I put velocity-dep-1.2.jar back in it goes away -- maybe something 
necessary is missing from velocity-1.2.jar, or, ah, I think I understand 
- the system is supposed to work with the velocity-dep-1.2.jar and the 
velocity-1.2.jar is not intended for the examples ....  I just have to 
make sure to use the velocity-dep-1.2.jar in tomcat ....

CHEERS> SAM

===============error messsage========================

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server 
Error) that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Cannot assign a servlet interface to the 
path /forumdemo/servlet/forum (translated from the output of my japanese OS)
    at 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:415)
    at 
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   ....................


root cause

java.lang.NoClassDefFoundError: 
org/apache/commons/collections/ExtendedProperties
    at 
org.apache.velocity.runtime.RuntimeInstance.(RuntimeInstance.java:207)
    at 
org.apache.velocity.runtime.RuntimeSingleton.(RuntimeSingleton.java:150)
    at org.apache.velocity.app.Velocity.init(Velocity.java:149)
    at 
org.apache.velocity.servlet.VelocityServlet.init(VelocityServlet.java:205)




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Examples and Split jar files

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 4/4/02 7:29 PM, "Sam Joseph" <ga...@yha.att.ne.jp> wrote:

> Hi there,
> 
> Not sure if this is the right place for bugs, but I think that the
> latest release of velocity has a small problem in that the ant build.xml
> file doesn't place the velocity-dep-1.2.jar in the forumdemo.  It may be
> that I didn't use ant exactly according to your instructions, but I
> would have thought that the build.xml file should include a depedency
> that makes sure both velocity-1.2.jar and velocity-dep-1.2.jar are
> present in the forumdemo war ....

Yep - if you are right, we should fix that.  Will do in the 1.3 release.

However - you don't need both jars - because the -dep- jar is the velocity
jar with its dependencies (commons-collections and avalon-logkit)
included...

> 
> I encountered the same problem (lack of velocity-dep-1.2.jar) running
> the sample servlet.  In both cases I fixed the problem by dropping the
> additional jar into the appropriate location, but I note that the
> instructions in the relevant readme file just say
> 
> - put the velocity.jar into the velexample/WEB-INF/lib directory
> 
> which might interpret just to mean the single velocity-1.2.jar

Ok - we'll make that clear.
 
> Nice project by the way.

Thx from all of us
 
> CHEERS> SAM
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"The greatest pleasure in life is doing what people say you cannot do."
        - Walter Bagehot



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>