Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jitender Dhiman
Unable to deploy portelt in liferay using apache tomcat
February 20, 2013 12:07 AM
Answer

Jitender Dhiman

Rank: New Member

Posts: 17

Join Date: September 21, 2012

Recent Posts

Hi,

I have deployed liferay on tomcat using liferay.war
Now i am trying to deploy a portlet, developed in eclipse, to the same.
when put portlet's war in deploy folder,this happens:

  1
  2 13:27:11,954 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Aut
  3oDeployDir:177] Processing Abbott-portlet_19feb.war
  413:27:11,954 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Por
  5tletAutoDeployListener:77] Copying portlets for C:\Program Files\Apache Software
  6 Foundation\Tomcat 7.0\webapps\liferay\WEB-INF\classes\deploy\Abbott-portlet_19f
  7eb.war
  813:27:11,954 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Bas
  9eDeployer:763] Deploying Abbott-portlet_19feb.war
 10  Expanding: C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\life
 11ray\WEB-INF\classes\deploy\Abbott-portlet_19feb.war into C:\Program Files\Apache
 12 Software Foundation\Tomcat 7.0\temp\20130220132712064
 13  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
 1420130220132712064\WEB-INF
 15  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
 1620130220132712064\WEB-INF\classes
 17  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
 1820130220132712064\WEB-INF\classes
 19  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
 2020130220132712064\WEB-INF\jsp
 2113:27:17,134 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Bas
 22eDeployer:2083] Modifying Servlet 2.4 C:\Program Files\Apache Software Foundatio
 23n\Tomcat 7.0\temp\20130220132712064\WEB-INF\web.xml
 24  Copying 227 files to C:\Program Files\Apache Software Foundation\Tomcat 7.0\we
 25bapps\Abbott-portlet
 26Feb 20, 2013 1:27:20 PM org.apache.catalina.startup.HostConfig deployDirectory
 27INFO: Deploying web application directory C:\Program Files\Apache Software Found
 28ation\Tomcat 7.0\webapps\Abbott-portlet
 29  Copied 42 empty directories to 17 empty directories under C:\Program Files\Apa
 30che Software Foundation\Tomcat 7.0\webapps\Abbott-portlet
 31  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\webap
 32ps\Abbott-portlet
 33  Deleting directory C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp
 34\20130220132712064
 3513:27:21,689 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Por
 36tletAutoDeployListener:87] Portlets for C:\Program Files\Apache Software Foundat
 37ion\Tomcat 7.0\webapps\liferay\WEB-INF\classes\deploy\Abbott-portlet_19feb.war c
 38opied successfully. Deployment will start in a few seconds.
 39Feb 20, 2013 1:27:22 PM org.apache.catalina.core.ContainerBase addChildInternal
 40SEVERE: ContainerBase.addChild: start:
 41org.apache.catalina.LifecycleException: Failed to start component [StandardEngin
 42e[Catalina].StandardHost[localhost].StandardContext[/Abbott-portlet]]
 43        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
 44        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
 45.java:895)
 46        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
 471)
 48        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
 49
 50        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
 51a:1099)
 52        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig
 53.java:1621)
 54        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
 55        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 56        at java.util.concurrent.FutureTask.run(Unknown Source)
 57        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
 58)
 59        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 60        at java.lang.Thread.run(Unknown Source)
 61Caused by: java.lang.NoClassDefFoundError: javax/portlet/PortletException
 62        at java.lang.Class.getDeclaredFields0(Native Method)
 63        at java.lang.Class.privateGetDeclaredFields(Unknown Source)
 64        at java.lang.Class.getDeclaredFields(Unknown Source)
 65        at org.apache.catalina.startup.WebAnnotationSet.getDeclaredFields(WebAnn
 66otationSet.java:452)
 67        at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(Web
 68AnnotationSet.java:257)
 69        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAn
 70notations(WebAnnotationSet.java:136)
 71        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotatio
 72ns(WebAnnotationSet.java:66)
 73        at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfi
 74g(ContextConfig.java:381)
 75        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
 76g.java:858)
 77        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
 78g.java:345)
 79        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
 80eSupport.java:119)
 81        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
 82se.java:90)
 83        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
 84t.java:5161)
 85        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 86        ... 11 more
 87Caused by: java.lang.ClassNotFoundException: javax.portlet.PortletException
 88        at java.net.URLClassLoader$1.run(Unknown Source)
 89        at java.security.AccessController.doPrivileged(Native Method)
 90        at java.net.URLClassLoader.findClass(Unknown Source)
 91        at java.lang.ClassLoader.loadClass(Unknown Source)
 92        at java.lang.ClassLoader.loadClass(Unknown Source)
 93        ... 25 more
 94Feb 20, 2013 1:27:22 PM org.apache.catalina.startup.HostConfig deployDirectory
 95SEVERE: Error deploying web application directory C:\Program Files\Apache Softwa
 96re Foundation\Tomcat 7.0\webapps\Abbott-portlet
 97java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catal
 98ina.LifecycleException: Failed to start component [StandardEngine[Catalina].Stan
 99dardHost[localhost].StandardContext[/Abbott-portlet]]
100        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
101.java:898)
102        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
1031)
104        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
105
106        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
107a:1099)
108        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig
109.java:1621)
110        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
111        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
112        at java.util.concurrent.FutureTask.run(Unknown Source)
113        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
114)
115        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
116        at java.lang.Thread.run(Unknown Source)

"Caused by: java.lang.ClassNotFoundException: javax.portlet.PortletException"
For this I added "com.springsource.javax.portlet-1.0.0" to tomcat lib folder.

Now when I retry to deploy the portlet, It shows:



 1
 213:34:47,035 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Aut
 3oDeployDir:177] Processing Abbott-portlet_19feb.war
 413:34:47,035 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Por
 5tletAutoDeployListener:77] Copying portlets for C:\Program Files\Apache Software
 6 Foundation\Tomcat 7.0\webapps\liferay\WEB-INF\classes\deploy\Abbott-portlet_19f
 7eb.war
 813:34:47,035 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Bas
 9eDeployer:763] Deploying Abbott-portlet_19feb.war
10  Expanding: C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\life
11ray\WEB-INF\classes\deploy\Abbott-portlet_19feb.war into C:\Program Files\Apache
12 Software Foundation\Tomcat 7.0\temp\20130220133447129
13  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
1420130220133447129\WEB-INF
15  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
1620130220133447129\WEB-INF\classes
17  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
1820130220133447129\WEB-INF\classes
19  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp\
2020130220133447129\WEB-INF\jsp
2113:34:51,762 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Bas
22eDeployer:2083] Modifying Servlet 2.4 C:\Program Files\Apache Software Foundatio
23n\Tomcat 7.0\temp\20130220133447129\WEB-INF\web.xml
24  Copying 227 files to C:\Program Files\Apache Software Foundation\Tomcat 7.0\we
25bapps\Abbott-portlet
26  Copied 42 empty directories to 17 empty directories under C:\Program Files\Apa
27che Software Foundation\Tomcat 7.0\webapps\Abbott-portlet
28  Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat 7.0\webap
29ps\Abbott-portlet
30  Deleting directory C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp
31\20130220133447129
3213:34:56,148 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][Por
33tletAutoDeployListener:87] Portlets for C:\Program Files\Apache Software Foundat
34ion\Tomcat 7.0\webapps\liferay\WEB-INF\classes\deploy\Abbott-portlet_19feb.war c
35opied successfully. Deployment will start in a few seconds.
36Feb 20, 2013 1:34:56 PM org.apache.catalina.startup.HostConfig deployDirectory
37INFO: Deploying web application directory C:\Program Files\Apache Software Found
38ation\Tomcat 7.0\webapps\Abbott-portlet


Nothing happens after this...............


Please help!!
David H Nebinger
RE: Unable to deploy portelt in liferay using apache tomcat
February 20, 2013 5:40 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6130

Join Date: September 1, 2006

Recent Posts

You cannot just drop the liferay.war file into an existing tomcat and expect everything to work.

There are other changes that need to be made to get Liferay deployed, changes in the tomcat/conf/context.xml, additional jars placed in tomcat's new lib/ext directory (that you must create)...

I believe there is an article in the wiki or the actual documentation that talks about these changes.
Hitoshi Ozawa
RE: Unable to deploy portelt in liferay using apache tomcat
February 20, 2013 2:11 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Is your tomcat liferay working without your portlet? Are you able to login? If not, then follow David's advice and read the online documentation on how to setup liferay on tomcat.

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen11-installing-liferay-on-tomcat-7-0

If you are able to login, try download some portlets from the Marketplace to see if you can deploy any portlet at all.
Jitender Dhiman
RE: Unable to deploy portelt in liferay using apache tomcat
February 20, 2013 10:56 PM
Answer

Jitender Dhiman

Rank: New Member

Posts: 17

Join Date: September 21, 2012

Recent Posts

Hi David,


I have deployed liferay.war on tomcat7 following steps mentioned on a blog i.e. Steve on java
And it is working fine. Also deploy folder created in the directory.
Jitender Dhiman
RE: Unable to deploy portelt in liferay using apache tomcat
February 20, 2013 11:01 PM
Answer

Jitender Dhiman

Rank: New Member

Posts: 17

Join Date: September 21, 2012

Recent Posts

Hi Hitoshi,

If you are able to login, try download some portlets from the Marketplace to see if you can deploy any portlet at all


I am able to login in the liferay deployed in tomcat
but in Control Panel>plugin installation INSTALL NEW PORTALS option is missing... emoticon
So I can not install portlet from marketplace.
emoticon

any other thing to check..?
Jitender Dhiman
RE: Unable to deploy portelt in liferay using apache tomcat
February 21, 2013 1:26 AM
Answer

Jitender Dhiman

Rank: New Member

Posts: 17

Join Date: September 21, 2012

Recent Posts

I just copy all the liferay jar files to tomcat/lib ....
Now I am able to deploy the the portlets to the liferay....

But there is one issue... on shared hosting we do not have access to the tomcat/lib folder.....
emoticon
Hitoshi Ozawa
RE: Unable to deploy portelt in liferay using apache tomcat
February 21, 2013 2:33 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

I have deployed liferay.war on tomcat7 following steps mentioned on a blog i.e. Steve on java


Well, that's your problem! You're using an installation step for liferay 5 instead of liferay 6.1.1. I gave you a link to the official liferay documentation on setting up liferay on tomcat. Follow that.
Hitoshi Ozawa
RE: Unable to deploy portelt in liferay using apache tomcat
February 21, 2013 2:36 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

but in Control Panel>plugin installation INSTALL NEW PORTALS option is missing...


You need to install "Private Plugin Installer".
http://www.liferay.com/marketplace/-/mp/application/15474932?_7_WAR_osbportlet_backURL=%2Fmarketplace%3Fp_p_id%3D7_WAR_osbportlet%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_col_id%3Dcolumn-1%26p_p_col_pos%3D1%26p_p_col_count%3D2%26_7_WAR_osbportlet_mvcPath%3D%252Fmarketplace%252Fsearch.jsp%26p_r_p_564233524_assetCategoryId%3D0%26p_r_p_564233524_keywords%3Dprivate

So I can not install portlet from marketplace.


Why not? Just download the file to your local deploy directory.
Jitender Dhiman
RE: Unable to deploy portelt in liferay using apache tomcat
February 24, 2013 9:35 PM
Answer

Jitender Dhiman

Rank: New Member

Posts: 17

Join Date: September 21, 2012

Recent Posts

Hi Hitoshi,

I am following old steps because I want to deploy liferay on shared hosting, there we do not have access to tomcat files except webapps.