Hi,
I am trying to implement portlet using Spring MVC 3.x + Tiles 2.1.x +Liferay 6.1.x CE.
I have a problem with Tiles.
In my liferay-plugin-package.properties I have:
portal-dependency-jars=\
spring-asm.jar,\
spring-beans.jar,\
spring-context.jar,\
spring-core.jar,\
spring-expression.jar,\
spring-web.jar,\
spring-web-portlet.jar,\
spring-web-servlet.jar,\
so my portlet is going to use spring jars from portal/lib (as far as I know this is spring 3.0.7.RELEASE).
I added the following beans to my portlet's config file:
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
p:definitions="/WEB-INF/tiles-defs.xml" />
<bean id="tilesViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver"
p:viewClass="org.springframework.web.servlet.view.tiles2.TilesView" />
and I got ClassNotFoundException because there was no BasicTilesInitializer class.
I found out that BasicTilesInitializer is within tiles-core.jar but I couldn't find this jar in portal/lib so I downloaded it from project's website
Now I am getting:
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/view/tiles2/SpringTilesApplicationContextFactory
at org.springframework.web.servlet.view.tiles2.TilesConfigurer.<init>(TilesConfigurer.java:158)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 48 more
when TilesConfigurer is created which is weird because SpringTilesApplicationContextFactory is within spring-web-servlet.jar (the same package where TilesConfigurer is located).
I thought maybe I have wrong version of tiles-core.jar but I tried every release from tiles-core - 2.1.1 to 2.2.2 and still the same exception is thrown when TilesConfigurer is beeing created.
Any idea how to solve this problem?
请登录并以举报不当内容。