Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Jen Fong
Liferay cannot find theme resources after bad plugin deployment
17 de Novembro de 2010 14:50
Resposta

Jen Fong

Ranking: New Member

Mensagens: 10

Data de entrada: 19 de Maio de 2010

Mensagens recentes

Hi, there--

We have a custom theme created with the Plugins SDK and we have some portlets, also plugins.

Occasionally, if we deploy a portlet and then someone visits a page with that portlet on it in a very particular timeframe, notaly while the portlet is being hot-deployed and replaced in tomcat, something odd happens.

First, when that someone visits the page, the portlet reports "this portlet has been undeployed..". This is likely before the portlet is ready, however the portlet claims to finish deploying successfully, as we see the following in the logs:
 112:59:54,452 INFO  [AutoDeployDir:183] Processing event-video-portlet-5.2.3.1.war
 212:59:54,458 INFO  [PortletAutoDeployListener:77] Copying portlets for LIFERAY-PATH/deploy/event-video-portlet-5.2.3.1.war
 3  Expanding: LIFERAY-PATH/deploy/event-video-portlet-5.2.3.1.war into LIFERAY-PATH/tomcat-6.0.18/temp/20101117125954478
 4  Copying 1 file to LIFERAY-PATH/tomcat-6.0.18/temp/20101117125954478/WEB-INF
 5  Copying 1 file to LIFERAY-PATH/tomcat-6.0.18/temp/20101117125954478/WEB-INF/cl
 6asses
 7  Copying 1 file to LIFERAY-PATH/tomcat-6.0.18/temp/20101117125954478/WEB-INF/cl
 8asses
 9  Copying 1 file to LIFERAY-PATH/tomcat-6.0.18/temp/20101117125954478/META-INF
10  Copying 41 files to LIFERAY-PATH/tomcat-6.0.18/webapps/event-video-portlet
11  Copying 1 file to LIFERAY-PATH/tomcat-6.0.18/webapps/event-video-portlet
12  Deleting directory LIFERAY-PATH/tomcat-6.0.18/temp/20101117125954478
1312:59:54,659 INFO  [PortletAutoDeployListener:87] Portlets for /LIFERAY-PATH/depl
14oy/event-video-portlet-5.2.3.1.war copied successfully. Deployment will start in
15 a few seconds.
16Nov 17, 2010 1:00:04 PM org.apache.catalina.startup.HostConfig checkResources
17INFO: Undeploying context [/event-video-portlet]
1813:00:04,305 INFO  [PortletHotDeployListener:381] Unregistering portlets for eve
19nt-video-portlet
2013:00:04,316 INFO  [PortletHotDeployListener:412] 1 portlet for event-video-port
21let was unregistered
2213:00:04,494 INFO  [PortletHotDeployListener:227] Registering portlets for event
23-video-portlet
2413:00:04,534 INFO  [PluginPackageUtil:1347] Checking for available updates
2513:00:04,540 INFO  [PluginPackageUtil:1391] Finished checking for available upda
26tes in 1 ms
2713:00:04,608 INFO  [PortletHotDeployListener:346] 1 portlet for event-video-port
28let is available for use


We see an error in the logs if we try to visit the page again, complaining that a jsp is not found, so obviously the portlet was not deployed correctly:

113:00:24,332 ERROR [PortletRequestDispatcherImpl:316] javax.servlet.ServletException: File "/videolist.jsp" not found


Then, somehow the entire site goes down, displaying only a blank white page for any url, and this is what is always found in our logs:

 113:01:38,263 ERROR [ServletVelocityResourceListener:85] _SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm is not valid because  does not map to a servlet context
 213:01:38,287 ERROR [velocity:151] ResourceManager : unable to find resource '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm' in any resource loader.
 313:01:38,308 ERROR [velocity:151] #parse(): cannot find template '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm', called at msri-internal-theme_SERVLET_CONTEXT_/templates/portal_normal.vm[line 3, column 1]
 413:01:38,327 ERROR [IncludeTag:79] Current URL /group/msri-internal/videopage generates exception: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm'
 513:01:38,360 ERROR [IncludeTag:165] org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm'
 6        at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483)
 7        at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
 8        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
 9        at org.apache.velocity.runtime.directive.Parse.render(Parse.java:198)
10        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
11        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
12        at org.apache.velocity.Template.merge(Template.java:328)
13        at org.apache.velocity.Template.merge(Template.java:235)
14        at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
15        at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:179)
16        at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:150)
17        at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:75)
18        at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:201)
19        at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:68)
20        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:59)
21        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
22        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
23        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
24        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
25        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
2613:01:43,264 ERROR [ServletVelocityResourceListener:85] _SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm is not valid because  does not map to a servlet context
2713:01:43,290 ERROR [velocity:151] ResourceManager : unable to find resource '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm' in any resource loader.
2813:01:43,310 ERROR [velocity:151] #parse(): cannot find template '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm', called at msri-theme_SERVLET_CONTEXT_/templates/portal_normal.vm[line 3, column 1]
2913:01:43,328 ERROR [IncludeTag:79] Current URL /web/msri generates exception: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm'
30...


At this point the only solution is to restart Liferay.

We are using 5.2.3 still.

Has anyone seen this particular chain of events? A bad deployment of a portlet taking down the whole site because liferay can no longer find the theme resources?

We *think* it only happens when someone visits the page while the portlet is being deployed, We also thought at one point that if we re-deploy the portlet too quickly after being deployed [e.g. running "ant deploy" within a second or two of being run again], we see the same problem. It's fairly consistent that this blank page effect only comes into play after a bad deployment; we never 'randomly' get this blank page problem--it's always after a hot-deploy of a portlet or the theme itself [although we haven't had to hot-deploy the theme since we finalized it].

But we can't time it exactly right to recreate the problem 100%.

Can anyone help me decipher exactly what is causing the problem?

This happens to multiple portlets, not just this particular one, and sometimes the portlets we are deploying are incredibly simple, sometimes just the sample portlet with only the code provided in the portlet.zip file, so we are assuming it is not the portlet code in particular. The theme has been pretty stable for quite some time; we never see theme-related errors/exceptions like this otherwise.

Thanks for any help.
Jen Fong
RE: Liferay cannot find theme resources after bad plugin deployment
18 de Novembro de 2010 10:29
Resposta

Jen Fong

Ranking: New Member

Mensagens: 10

Data de entrada: 19 de Maio de 2010

Mensagens recentes

http://issues.liferay.com/browse/LPS-12683
Seems to be related, however no clarification on an "incorrect" portlet is made with that issue and our portlets only cause this issue under certain circumstances--so is it really an "incorrect" portlet if it successfully deploys 90% of the time?

Similar to Dave Weitzel's comment there, occasionally all we are doing is making minor changes to a jsp as well, so it's still not clear what the cause is.
ilke Muhtaroglu
RE: Liferay cannot find theme resources after bad plugin deployment
10 de Janeiro de 2011 06:17
Resposta

ilke Muhtaroglu

Ranking: Regular Member

Mensagens: 226

Data de entrada: 12 de Maio de 2009

Mensagens recentes

did you find a solution I faced the similar case ...

 1
 2
 314:05:28,234 INFO  [ThemeHotDeployListener:90] 1 theme for EPDK-Theme is available for use
 414:05:35,769 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/ui/success/page.vm is not valid because EPDK-Theme does not map to a servlet context
 514:05:35,772 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/ui/success/page.vm is not valid because EPDK-Theme does not map to a servlet context
 614:05:35,776 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/portlet/communities/edit_pages.vm is not valid because EPDK-Theme does not map to a servlet context
 714:05:35,783 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/form/start.vm is not valid because EPDK-Theme does not map to a servlet context
 814:05:35,788 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
 914:05:35,792 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1014:05:35,795 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1114:05:35,797 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1214:05:35,800 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1314:05:35,803 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1414:05:35,805 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1514:05:35,808 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1614:05:35,810 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1714:05:35,814 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1814:05:35,817 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
1914:05:35,820 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
2014:05:35,823 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
2114:05:35,827 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
2214:05:35,833 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/portlet/communities/edit_pages_look_and_feel.vm is not valid because EPDK-Theme does not map to a servlet context
2314:05:35,840 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
2414:05:35,843 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/input/page.vm is not valid because EPDK-Theme does not map to a servlet context
2514:05:35,849 ERROR [IncludeTag:423] Current URL /en/web/guest/home?p_p_id=88&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_88_struts_action=%2Flayout_management%2Fedit_pages&_88_tabs1=public-pages&_88_tabs2=look-and-feel&_88_tabs3=page&_88_redirect=%2Fen%2Fweb%2Fguest%2Fhome&_88_backURL=%2Fen%2Fweb%2Fguest%2Fhome&_88_groupId=10162&_88_tabs4=regular-browsers&_88_selPlid=0 generates exception: null
2614:05:35,852 ERROR [IncludeTag:154] java.lang.NullPointerException
27        at org.apache.jsp.html.portlet.communities.edit_005fpages_005flook_005fand_005ffeel_jsp._jspService(edit_005fpages_005flook_005fand_005ffeel_jsp.java:1125)
28    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
29    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
30    at com.liferay.portal.kernel.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:45)
31    at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:340)
32    at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:415)
33    at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:106)
34    at org.apache.jsp.html.portlet.communities.edit_005fpages_jsp._jspx_meth_liferay_002dutil_005finclude_005f5(edit_005fpages_jsp.java:4604)
35    at org.apache.jsp.html.portlet.communities.edit_005fpages_jsp._jspService(edit_005fpages_jsp.java:3186)
36    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
37    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
38    at com.liferay.portal.kernel.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:45)
39    at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:340)
40    at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:415)
41    at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:106)
42    at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:4117)
43    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
44    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
45    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
46    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
47
4814:05:35,853 ERROR [ServletVelocityResourceListener:74] EPDK-Theme_SERVLET_CONTEXT_/templates//html/taglib/aui/form/end.vm is not valid because EPDK-Theme does not map to a servlet context
4914:05:35,860 ERROR [ThemeUtil:300] EPDK-Theme_SERVLET_CONTEXT_/templates/portlet.vm does not exist
5014:05:35,864 ERROR [ThemeUtil:300] EPDK-Theme_SERVLET_CONTEXT_/templates/portal_normal.vm does not exist
ilke Muhtaroglu
RE: Liferay cannot find theme resources after bad plugin deployment
12 de Janeiro de 2011 23:15
Resposta

ilke Muhtaroglu

Ranking: Regular Member

Mensagens: 226

Data de entrada: 12 de Maio de 2009

Mensagens recentes

I solved it by creating a template theme by plugin-sdk 6.05
Jan Bub
RE: Liferay cannot find theme resources after bad plugin deployment
16 de Março de 2011 02:37
Resposta

Jan Bub

Ranking: Junior Member

Mensagens: 78

Data de entrada: 2 de Março de 2011

Mensagens recentes

This works fine. Thank you.
Dhana Sekar
RE: Liferay cannot find theme resources after bad plugin deployment
21 de Março de 2011 07:12
Resposta

Dhana Sekar

Ranking: New Member

Mensagens: 7

Data de entrada: 13 de Fevereiro de 2011

Mensagens recentes

how to solve the theme problem as you faced the theme problem?

can any one tell me what is the problem? and how to solve the theme problem?
It will be very useful for me.
Thank you,
S.Dhanasekar.
ilke Muhtaroglu
RE: Liferay cannot find theme resources after bad plugin deployment
30 de Março de 2011 06:34
Resposta

ilke Muhtaroglu

Ranking: Regular Member

Mensagens: 226

Data de entrada: 12 de Maio de 2009

Mensagens recentes

It is like if you face a problem due to version upgrade

Then you should generate first the plugin at the plugin-sdk, and then merge your previous code into this new generated plugin. This should solve any version upgrade.

thanks.

ilke
Dhana Sekar
RE: Liferay cannot find theme resources after bad plugin deployment
5 de Abril de 2011 03:53
Resposta

Dhana Sekar

Ranking: New Member

Mensagens: 7

Data de entrada: 13 de Fevereiro de 2011

Mensagens recentes

How to change liferay top page and bottom page with user defined jsp files?
How to change VM file?


Thanks in Advance,
Dhanasekar.S
Víctor Salvans Montesó
RE: Liferay cannot find theme resources after bad plugin deployment
2 de Maio de 2013 03:30
Resposta

Víctor Salvans Montesó

Ranking: New Member

Mensagens: 7

Data de entrada: 4 de Dezembro de 2012

Mensagens recentes

I know it's old, but it may help someone.

This error happenned to me after change instanciable portlet property over already deployed portlets to test them.

I've changed these properties back and I had no more errors.

For me wasn't important whether these portlets were istanciable or not, but if it's the case I guess it must remove these portlets from their layouts, redeploy and "rei-nsert" back to the layouts.

Regards.