Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
LR6: after an eclipse restart occurs runtime error - init.vm is not valid Alex Mol 4 ottobre 2010 8.27
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Corné Aussems 5 ottobre 2010 4.10
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Alex Mol 6 ottobre 2010 0.23
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Denis Signoretto 5 gennaio 2011 3.41
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Shawn G 28 gennaio 2011 7.20
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val neelam bhandari 13 dicembre 2011 6.26
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Corné Aussems 13 dicembre 2011 6.56
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val neelam bhandari 13 dicembre 2011 7.32
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Corné Aussems 13 dicembre 2011 7.51
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val neelam bhandari 13 dicembre 2011 8.00
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Adil KABBALI 16 gennaio 2012 6.48
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Chris Miller 22 febbraio 2012 13.48
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Harilal A S 6 giugno 2012 6.01
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val Rui Horta 27 febbraio 2013 8.49
Alex Mol
LR6: after an eclipse restart occurs runtime error - init.vm is not valid
4 ottobre 2010 8.27
Risposta

Alex Mol

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 13 luglio 2010

Messaggi recenti

i've created a custom theme project in lifray ide for Eclipse and copied css-, images-, js- and templates- folders from classic-theme to <my_custom_theme_folder>/_diffs and then i've modified custom.css, portal_normal.vm (added some html tags) and some images. That was succesfully deployed and correctly functional until the Eclipse restart, after that do the page refresh in my browser (ie8) nothing, but occurs the following exception:

 114:57:32,451 ERROR [ServletVelocityResourceListener:74] _SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm is not valid because  does not map to a servlet context
 214:57:32,453 ERROR [velocity:151] ResourceManager : unable to find resource '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm' in any resource loader.
 314:57:32,453 ERROR [velocity:151] #parse(): cannot find template '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm', called at wess-2-guest-theme_SERVLET_CONTEXT_/templates/portal_normal.vm[line 3, column 1]
 414:57:32,454 ERROR [IncludeTag:231] Current URL /web/guest generates exception: Unable to find resource '_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm'
 514:57:32,456 ERROR [IncludeTag:154] 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:155)
16    at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:165)
17    at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:71)
18    at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:329)
19    at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:75)
20    at com.liferay.taglib.theme.IncludeTag.include(IncludeTag.java:38)
21    at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:223)
22    at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:58)
23    at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay_002dtheme_005finclude_005f1(portal_jsp.java:822)
24    at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_c_005fotherwise_005f0(portal_jsp.java:794)
25    at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:730)


A restart the server without of restart Eclipse clears the problem temporally, but i must every time restart the server if i restart the eclipse.
Is there any solution for it?
Corné Aussems
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
5 ottobre 2010 4.10
Risposta

Corné Aussems

Punteggio: Liferay Legend

Messaggi: 1313

Data di Iscrizione: 3 ottobre 2006

Messaggi recenti

There is a lot of talk about this issue

I think this ticket is about the same and this

and this has some hints on a solution
Alex Mol
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
6 ottobre 2010 0.23
Risposta

Alex Mol

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 13 luglio 2010

Messaggi recenti

Thank you Corné
Denis Signoretto
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
5 gennaio 2011 3.41
Risposta

Denis Signoretto

Punteggio: Expert

Messaggi: 311

Data di Iscrizione: 21 aprile 2009

Messaggi recenti

Hi Alex,

I'm facing with the same issue (I'm working with Liferay IDE 1.1 and LR6 with plugins-sdk-6.0.5). I have minimized the problem opening the server (F3) and disabling "Update context path" under the "Publisihng" options.

If it could help. In the mean while, did you find a soloution?

Thanks,
Denis.
Shawn G
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
28 gennaio 2011 7.20
Risposta

Shawn G

Punteggio: New Member

Messaggi: 20

Data di Iscrizione: 28 agosto 2009

Messaggi recenti

I'm experiencing the same issue with a custom theme. My theme so far is very light:
  1. Created a new theme using the Liferay IDE
  2. Imported the Classic theme's diff folders (to give me a better starting point for customization)

As others have reported, the error is generated when I first start Eclipse and launch the Liferay server. Restarting the Liferay server (but not Eclipse) resolves the issue. The Update Context Path workaround that Denis suggested unfortunately did not work for me.

One thing I notice in the console log was that upon the first start of the server, I see the following log entries:

1Jan 28, 2011 3:02:49 PM org.apache.catalina.startup.Catalina start
2INFO: Server startup in 57493 ms
315:02:49,571 WARN  [ThemeLocalServiceImpl:121] No theme found for specified theme id new_WAR_newtheme. Returning the default theme.
415:02:49,572 WARN  [ThemeLocalServiceImpl:121] No theme found for specified theme id new_WAR_newtheme. Returning the default theme.

A few lines later, the logs show all of my plugins being undeployed, then redeployed (I only included the lines concerning the theme plugin below):

1Jan 28, 2011 3:02:59 PM org.apache.catalina.startup.HostConfig checkResources
2INFO: Undeploying context [/new-theme]
3Jan 28, 2011 3:02:59 PM org.apache.catalina.startup.HostConfig deployDescriptor
4INFO: Deploying configuration descriptor new-theme.xml
5Jan 28, 2011 3:02:59 PM org.apache.catalina.startup.HostConfig deployDescriptor
6WARNING: A docBase C:\liferay-portal-6.0.5\tomcat-6.0.26\webapps\new-theme inside the host appBase has been specified, and will be ignored
715:02:59,849 INFO  [ThemeHotDeployListener:78] Registering themes for new-theme
815:03:01,916 INFO  [ThemeHotDeployListener:89] 1 theme for new-theme is available for use


At this point, the portal won't work as the theme generates the error. Restarting the server, everything works fine and the last line in the log is "Server startup..."

I have no idea why upon the first startup my plugins are being redeployed, and why it wouldn't do it on the second startup, but it sure seems like this is related to the problem.
neelam bhandari
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
13 dicembre 2011 6.26
Risposta

neelam bhandari

Punteggio: Regular Member

Messaggi: 102

Data di Iscrizione: 16 agosto 2011

Messaggi recenti

Hi all,
I am also facing this problem 14:23:11,849 ERROR [ServletVelocityResourceListener:74] _SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.vm is not valid because does not map to a servlet context. I am working on Liferay 6 and spring portlets. Is there any solution for this problem except from restarting the server?

Many thanks
Neelam Bhandari
Corné Aussems
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
13 dicembre 2011 6.56
Risposta

Corné Aussems

Punteggio: Liferay Legend

Messaggi: 1313

Data di Iscrizione: 3 ottobre 2006

Messaggi recenti

change the order of listeners in your properties;

 1
 2##
 3## Hot Deploy
 4##
 5
 6    #
 7    # Input a list of comma delimited class names that implement
 8    # com.liferay.portal.kernel.deploy.hot.HotDeployListener. These classes are
 9    # used to process the deployment and undeployment of WARs at runtime.
10    #
11    # Note: PluginPackageHotDeployListener must always be first.
12    #
13    hot.deploy.listeners=\
14        com.liferay.portal.deploy.hot.PluginPackageHotDeployListener,\
15        com.liferay.portal.deploy.hot.ExtHotDeployListener,\
16        com.liferay.portal.deploy.hot.HookHotDeployListener,\
17[color=#fc0839][b]        com.liferay.portal.deploy.hot.LayoutTemplateHotDeployListener,\[/b][/color]
18        com.liferay.portal.deploy.hot.PortletHotDeployListener,\
19        com.liferay.portal.deploy.hot.ThemeHotDeployListener,\
20        com.liferay.portal.deploy.hot.ThemeLoaderHotDeployListener,\
21        com.liferay.portal.deploy.hot.MessagingHotDeployListener


to

 1
 2   hot.deploy.listeners=\
 3        com.liferay.portal.deploy.hot.PluginPackageHotDeployListener,\
 4        com.liferay.portal.deploy.hot.ExtHotDeployListener,\
 5        com.liferay.portal.deploy.hot.HookHotDeployListener,\
 6        com.liferay.portal.deploy.hot.PortletHotDeployListener,\
 7        com.liferay.portal.deploy.hot.ThemeHotDeployListener,\
 8        com.liferay.portal.deploy.hot.ThemeLoaderHotDeployListener,\
 9[color=#fc0839][b]        com.liferay.portal.deploy.hot.LayoutTemplateHotDeployListener,\[/b][/color]
10        com.liferay.portal.deploy.hot.MessagingHotDeployListener
neelam bhandari
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
13 dicembre 2011 7.32
Risposta

neelam bhandari

Punteggio: Regular Member

Messaggi: 102

Data di Iscrizione: 16 agosto 2011

Messaggi recenti

Hey Corne,
Many thanks for your reply. I have already added these lines in my portal-ext.properties file.do I need to change portal.properties file too?

Neelam Bhandari
Corné Aussems
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
13 dicembre 2011 7.51
Risposta

Corné Aussems

Punteggio: Liferay Legend

Messaggi: 1313

Data di Iscrizione: 3 ottobre 2006

Messaggi recenti

neelam bhandari:
Hey Corne,
Many thanks for your reply. I have already added these lines in my portal-ext.properties file.do I need to change portal.properties file too?

Neelam Bhandari


portal-ext.properties should be set , portal.properties is in the portal.impl.jar and never needs to be set.
neelam bhandari
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
13 dicembre 2011 8.00
Risposta

neelam bhandari

Punteggio: Regular Member

Messaggi: 102

Data di Iscrizione: 16 agosto 2011

Messaggi recenti

I have already implemented this solution but no success. Also have done this

a possible temporary fix is to copy the "init.vm" inside your custom theme _diffs directory and point to it using the following code:

#parse ("$fullTemplatesPath/init.vm")

in my custom theme.Any other solution?

Thanks
Neelam
Adil KABBALI
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
16 gennaio 2012 6.48
Risposta

Adil KABBALI

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 12 gennaio 2012

Messaggi recenti

Hey Horn,
I added the properties in portal-ext.properties, but the problem is not solved.
If you have any other solutions?!!!
Аdil KABBALi
Chris Miller
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
22 febbraio 2012 13.48
Risposta

Chris Miller

Punteggio: New Member

Messaggi: 3

Data di Iscrizione: 30 marzo 2010

Messaggi recenti

Changing the order does not fix this.
Harilal A S
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
6 giugno 2012 6.01
Risposta

Harilal A S

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 6 giugno 2012

Messaggi recenti

This type of theme errors are commonly getting while trying to implement customized themes. In the case of customized theme, check the content of init_cutom.vm (in \templates) file. If there is no content type the following


#set ($show_toggle_controls = false)

#set ($liferay_toggle_controls = $sessionClicks.get($request, "liferay_toggle_controls", "visible"))

#if ($liferay_toggle_controls == "visible")
#set ($css_class = $css_class + " controls-visible")
#else
#set ($css_class = $css_class + " controls-visible")
#end

and then save the file. rebuild the theme. Then deploy the new theme and restart the server. hope this will solve the error...
Rui Horta
RE: LR6: after an eclipse restart occurs runtime error - init.vm is not val
27 febbraio 2013 8.49
Risposta

Rui Horta

Punteggio: New Member

Messaggi: 9

Data di Iscrizione: 13 settembre 2010

Messaggi recenti

Hi guys,

We have the same problem and the workaround that we use was:

1.Create a public hidden page with the default liferay theme;
/web/guest/blank_page for example

2.When this problem happens, we acess that page directly
http://localhost:8080/web/guest/blank_page

3.You can use again the portal until the next time that the problem happears;

Inicially we restart the server but one day we check that acessing a page with default liferay theme resolve the problem, so until have a solution for this we use always this workaround.

Regards,