Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Kamesh Sampath
Classloading Issue within Hook
February 6, 2012 8:19 AM
Answer

Kamesh Sampath

Rank: Regular Member

Posts: 159

Join Date: May 26, 2010

Recent Posts

Hi,

I am writing a Hook and overriding certain functionalities, I have defined a new StrutsPortletAction for defining my custom portlet action for one of the new features am adding to the Hook, this StrutsPortletAction will redirect to a custom jsp page, in that page I am trying to load my custom Java Model class a very simple bean with some getters/setters which i am using to share my model data with JSP page and StrutsPortletAction, unfortunately when I try to load the class in the jsp am getting the following error,

"com.liferay.hook.demo.model.BlogMetadataModel " cannot be resolved to a type when I use the fully qualified name, but when I do the import and then try it i get the following error "Only a type can be imported. com.liferay.hook.demo.model.BlogMetadataModel resolves to a package"


I am not sure whats wrong with this emoticon, but one thing I understand is that this a classloader issue, my custom model class is not visible inside a hook JSP.

Any thoughts to overcome this ?

--Kamesh