Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
R Naresh Reddy
Error in Registering hook
March 12, 2013 5:46 AM
Answer

R Naresh Reddy

Rank: Junior Member

Posts: 60

Join Date: February 28, 2013

Recent Posts

Hi


can any one help me out please

am getting this error can any say wts wrong in this

com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for LoginPortlet-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:276)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:48)
at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:858)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:366)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.liferay.portal.security.auth.LoginAuthenticator
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:52)
at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:27)
at com.liferay.portal.kernel.util.ProxyFactory.newInstance(ProxyFactory.java:38)
at com.liferay.portal.kernel.util.ProxyFactory.newInstance(ProxyFactory.java:29)
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.newInstance(BaseHotDeployListener.java:89)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initAuthenticators(HookHotDeployListener.java:916)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initAuthenticators(HookHotDeployListener.java:935)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:1589)
at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:563)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:273)
... 27 more
12:38:24,878 ERROR [pool-2-thread-1][PortletImpl:2253] Unable to link role for portlet [LoginPortlet_WAR_LoginPortletportlet] with role-name [power-user] because role-link is null





Thanks for any help
Manish Yadav
RE: Error in Registering hook
March 12, 2013 6:18 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

R Naresh Reddy:
Hi


com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for LoginPortlet-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)


This line is little bit create confusion for me its hook or portlet...because while deployment its showing hook but name looks like its portlet..
could you please provide more detail what are you mention in hook or portlet???
R Naresh Reddy
RE: Error in Registering hook
March 12, 2013 6:22 AM
Answer

R Naresh Reddy

Rank: Junior Member

Posts: 60

Join Date: February 28, 2013

Recent Posts

hi manish


as am new if any thing wrong let me know
am working on login porltel
used hook in login after adding hook in login i got error like this

Thanks for any help
Manish Yadav
RE: Error in Registering hook
March 12, 2013 7:05 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

In my guess you created wrong project .
1. Create Hook project using liferay id not portlet
2. if you want to override jsp then create folder structure under docroort like
\jsp\html\portlet\login

copy files under login folder which you are going to override

3. Mention below entry in liferay-hook.xml file

<hook>
<custom-jsp-dir>/jsp/</custom-jsp-dir>
</hook>


Might be this will help you ...please let me know if you need any more clarification
Siby Mathew
RE: Error in Registering hook
March 12, 2013 8:12 AM
Answer

Siby Mathew

Rank: Expert

Posts: 259

Join Date: March 4, 2011

Recent Posts

Hi Naresh,
As per the logs, you are getting a ClassNotFoundException: com.liferay.portal.security.auth.LoginAuthenticator
I assume you have given the wrong class in your portlet, it should be : com.liferay.portal.security.auth.Authenticator
@Manish/Naresh :
It is perfectly fine to create a hook inside one portlet.
This can be useful if the hook and portlet logic need not be separated.

Thanks,
Siby Mathew
R Naresh Reddy
RE: Error in Registering hook
March 12, 2013 10:36 PM
Answer

R Naresh Reddy

Rank: Junior Member

Posts: 60

Join Date: February 28, 2013

Recent Posts

HI mathew

am new to liferay please help me mathew
i made changes what ever u said me above to seperate them but am getting same issue
if required i will get zip file of my code to u



Thanks
Siby Mathew
RE: Error in Registering hook
March 13, 2013 6:25 AM
Answer

Siby Mathew

Rank: Expert

Posts: 259

Join Date: March 4, 2011

Recent Posts

Hi Naresh,
As per my reply, you DO NOT need to separate the hook and portlet.
However, did you change the className as I suggested.
If you still get error, please post the log snippet.

Thanks,
Siby
R Naresh Reddy
RE: Error in Registering hook
March 13, 2013 6:31 AM
Answer

R Naresh Reddy

Rank: Junior Member

Posts: 60

Join Date: February 28, 2013

Recent Posts

Thanks siby for helping


when i seperated i did'nt solved first after that checking with log made changes and got solved hook registration

THANKS SIBY MATHEW