views:

13

answers:

1

I get the following security exception in GAE, anyone know the cause? Google searches are taking me in all different directions.

java.lang.SecurityException: Unable to get members for class org.springframework.web.servlet.view.velocity.VelocityViewResolver
    at com.google.appengine.runtime.Request.process-510220b4f73f2116(Request.java)
    at java.lang.Class.getDeclaredConstructors(Class.java:302)
    ...
A: 

Here was the problem, the velocity bean definition had an absolute path vs. relative:

<bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
  <property name="resourceLoaderPath" value="/WEB-INF/velocity/"/>
</bean>

Changed to (note the '/' removed in the resourceLoaderPath)

<bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
  <property name="resourceLoaderPath" value="WEB-INF/velocity/"/>
</bean>

Another little "it works in the local environment but not on production gotcha".

David Parks