论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Zeeshan Khan
Spring MVC 3 + Tiles 2.2.2 +Liferay 6.1 CE
2013年3月6日 下午11:05
答复

Zeeshan Khan

等级: Expert

帖子: 349

加入日期: 2011年7月20日

最近的帖子

Hi All,

Can Spring MVC 3 + Tiles 2.2.2 be integrated along with LR 6.1 bundled with Tomcat ??

Thanks !!
Bart Simpson
RE: Spring MVC 3 + Tiles 2.2.2 +Liferay 6.1 CE
2013年3月7日 上午1:15
答复

Bart Simpson

等级: Liferay Master

帖子: 524

加入日期: 2011年8月29日

最近的帖子

Spring MVC I am sure about, but haven't tried anything specific with Tiles
Zeeshan Khan
RE: Spring MVC 3 + Tiles 2.2.2 +Liferay 6.1 CE
2013年3月7日 上午7:18
答复

Zeeshan Khan

等级: Expert

帖子: 349

加入日期: 2011年7月20日

最近的帖子

Bart Simpson:
Spring MVC I am sure about, but haven't tried anything specific with Tiles



Hi Bart,

I have tried Spring MVC 3and its working fine but when I am using Tiles 2.2.2 it is throwing error......
Tomasz Sokół
RE: Spring MVC 3 + Tiles 2.2.2 +Liferay 6.1 CE
2013年4月12日 上午2:04
答复

Tomasz Sokół

等级: New Member

帖子: 9

加入日期: 2012年2月10日

最近的帖子

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?
Arshith P
RE: Spring MVC 3 + Tiles 2.2.2 +Liferay 6.1 CE
2014年5月21日 上午2:52
答复

Arshith P

等级: New Member

帖子: 2

加入日期: 2014年5月21日

最近的帖子

ME too having same issue but in a different version. I'm using Spring MVC 3 and Tiles 2.2.2 in Liferay 6.2 CE GA2.
@Tomasz Sokół : Did you solve this issue?
Can anyone help in solving this?