Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Guru Anand
Portlet
May 5, 2008 10:00 PM
Answer

Guru Anand

Rank: Junior Member

Posts: 26

Join Date: April 21, 2008

Recent Posts

Hi All,

I have used the Portlet, when a button is clicked in that porlet - am getting the following exception

"java.lang.ClassCastException: com.liferay.portlet.ActionRequestImpl
at com.liferay.portal.apache.bridges.struts.LiferayRequestDispatcher.invoke(LiferayRequestDispatcher.java:89)
at com.liferay.portal.apache.bridges.struts.LiferayRequestDispatcher.include(LiferayRequestDispatcher.java:74)
at org.apache.portals.bridges.struts.StrutsPortlet.processRequest(StrutsPortlet.java:375)
at org.apache.portals.bridges.struts.StrutsPortlet.processAction(StrutsPortlet.java:279)
"

can any one tell me the reason & help me out to solve this problem..
Victor Zorin
RE: Portlet
May 6, 2008 12:14 AM
Answer

Victor Zorin

Rank: Liferay Legend

Posts: 1178

Join Date: April 14, 2008

Recent Posts

Need to know your development and runtime environment. It sounds like a class loading problem, when your portlet application contains own copy of com.liferay.portlet.ActionRequestImpl class. Is this your first portlet?
Guru Anand
RE: Portlet
May 6, 2008 1:24 AM
Answer

Guru Anand

Rank: Junior Member

Posts: 26

Join Date: April 21, 2008

Recent Posts

Thanks

Yes, this is my First Portlet.

Developement Env :

jdk1.5.0_09
jre1.5.0_09
Struts 1.2.5
hibernate 3.0
Spring 2

Can you tell me the solution for this problem ?
Victor Zorin
RE: Portlet
May 7, 2008 6:11 AM
Answer

Victor Zorin

Rank: Liferay Legend

Posts: 1178

Join Date: April 14, 2008

Recent Posts

Sorry, I meant portlet-development environment and portal installation (version, liferay+tomcat, liferay+jboss, etc). Something
is misconfigured if you are using standard setup and /ext development, or your hot-deploy portlet development does not match your deployment environment (if you use own/specialized setup) .

As I said, it is very hard to provide any advice without details, but because our forum interaction is very slow, few extra tips are below:
have a look what is inside your portlet war file, whether it contains any liferay libraries in WEB-INF/lib directory, such as portal-impl.jar. If you have, remove. Then, change your portal installation in such way that the class it complains about (com.liferay.portlet.ActionRequestImpl) is loaded once or by the same ClassLoader.

As a quick hack-check, you may move all portal libraries from /ROOT.war/WEB-INF/lib to common libraries directory, and restart the portal. By doing this you will make sure that com.liferay.portlet.ActionRequestImpl is loaded only once and is available for portal and your hot-deploy portlet. If this helps, adjust your setup.