velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nortje, Andrew" <Andrew.Nor...@nscorp.com>
Subject Velocity ClassCastException 'velocimacro.permissions.allow.inline '
Date Mon, 05 Jan 2004 20:36:48 GMT
I am using Velocity with WebWork deployed under WebLogic running under
Windows and UNIX.

 

The application works fine under Windows but fails on UNIX. 

 

To tell Velocity where to find the template files I have a
velocity.properties file in WEB-INF/classes which looks like this

 

runtime.log = /opt/home/blah/blah

resource.loader = class

class.resource.loader.class =
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader

 

web.xml looks like this

 

     ...

    <servlet>

        <servlet-name>velocity</servlet-name>

 
<servlet-class>com.nscorp.cdb.view.CodeDatabaseServlet</servlet-class>

        <init-param>

            <param-name>properties</param-name>

            <param-value>/WEB-INF/classes/velocity.properties</param-value>

        </init-param>

    </servlet>

    ...

 

I then followed the "Velocity WebLogic Cook Book" on the Velocity website to
get Velocity to use resource.loader=class by over riding the WebWork servlet
and implementing  the loadConfiguration() method. All works fine on Windows,
I have a bunch of println() statements which show me what's going on. On
UNIX it fails with the message below before even executing the
loadConfiguration() method.

 

Any ideas?

 

TIA

 

Andrew

 

 

####<Jan 5, 2004 3:19:35 PM EST> <Info> <HTTP> <pastry> <DashBoard>
<ExecuteThread: '11' for queue: 'default'> <kernel identity> <> <101047>
<[ServletContext(id=7588838,name=CodeTable.war,context-path=/CodeTable)]
velocity: init>

####<Jan 5, 2004 3:19:35 PM EST> <Error> <HTTP> <pastry> <DashBoard>
<ExecuteThread: '11' for queue: 'default'> <kernel identity> <> <101018>
<[ServletContext(id=7588838,name=CodeTable.war,context-path=/CodeTable)]
Servlet failed with ServletException>

javax.servlet.ServletException: Error initializing Velocity:
java.lang.ClassCastException: 'velocimacro.permissions.allow.inline' doesn't
map to a Boolean object

        at
org.apache.velocity.servlet.VelocityServlet.initVelocity(VelocityServlet.jav
a:236)

        at
org.apache.velocity.servlet.VelocityServlet.init(VelocityServlet.java:198)

        at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubI
mpl.java:1075)

        at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)

        at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
:899)

        at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
va:833)

        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:773)

        at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:51
7)

        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:351)

        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:306)

        at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5445)

        at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)

        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3105)

        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)

        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)

        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message