You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Torsten Schmidt <to...@fakt-software.com> on 2004/11/25 13:13:53 UTC

Errors Building Velocity1.4 with J2EE

Hello All!

I want to get my Templates directly from a Database so i must rebuild the Velocity Source with the Build Target jar-J2EE. I installed Ant correctly and tryed to build the Velocity jar with JDK1.4 and other versions. The j2ee.jar is in the correct directory but i became 2 Errors which are like this:

..VelocityServlet.MockServletContext is not abstract and does not override abstract mehtod getResourcePaths(java.lang.String) in javax.servlet.ServletContext ...

i became a Note: Recompile with -deprecation but this did'nt work. 

Can anybody help me?

Mfg Torsten

Re: Errors Building Velocity1.4 with J2EE

Posted by Will Glass-Husain <wg...@forio.com>.
Hi,

Torsten is right.  The DataSourceResourceLoader is not compiled in by 
default, since it has a dependency on a J2EE library.  You have to compile 
Velocity with the "jar-J2EE" ant task.

In order for this to work, you need to include the javax.sql libraries. 
This used to be downloadable from Sun as part of the JDBC 2.0 optional 
package:
http://java.sun.com/products/jdbc/articles/package2.html

As of JDK 1.4, this is included in the core SDK, so no download is needed. 
You might try removing "j2ee.jar", then do "ant clean" then "ant jar-J2EE". 
This worked on my machine.

WILL



----- Original Message ----- 
From: "Mike Kienenberger" <mk...@alaska.net>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Cc: <to...@fakt-software.com>
Sent: Thursday, November 25, 2004 6:52 AM
Subject: Re: Errors Building Velocity1.4 with J2EE


> Torsten Schmidt <to...@fakt-software.com> wrote:
>> I want to get my Templates directly from a Database so i must rebuild the
> Velocity Source with the Build Target jar-J2EE. I installed Ant correctly
> and tryed to build the Velocity jar with JDK1.4 and other versions. The
> j2ee.jar is in the correct directory but i became 2 Errors which are like
> this:
>>
>> ..VelocityServlet.MockServletContext is not abstract and does not 
>> override
> abstract mehtod getResourcePaths(java.lang.String) in
> javax.servlet.ServletContext ...
>>
>> i became a Note: Recompile with -deprecation but this did'nt work.
>
> I can't help with this error, but I'm surprised that you need to rebuild
> velocity to read templates from a database.
>
> You should be able to do what you need to do either via subclassing or by
> using a custom resource loaders.
>
> -Mike
>
> ---------------------------------------------------------------------
> 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


Re: Errors Building Velocity1.4 with J2EE

Posted by Mike Kienenberger <mk...@alaska.net>.
Torsten Schmidt <to...@fakt-software.com> wrote:
> I want to get my Templates directly from a Database so i must rebuild the 
Velocity Source with the Build Target jar-J2EE. I installed Ant correctly 
and tryed to build the Velocity jar with JDK1.4 and other versions. The 
j2ee.jar is in the correct directory but i became 2 Errors which are like 
this:
> 
> ..VelocityServlet.MockServletContext is not abstract and does not override 
abstract mehtod getResourcePaths(java.lang.String) in 
javax.servlet.ServletContext ...
> 
> i became a Note: Recompile with -deprecation but this did'nt work. 

I can't help with this error, but I'm surprised that you need to rebuild 
velocity to read templates from a database.

You should be able to do what you need to do either via subclassing or by 
using a custom resource loaders.

-Mike

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