Message Boards

Messy theme deployment

thumbnail
Yodahe Zemichael, modified 7 Years ago.

Messy theme deployment

New Member Posts: 3 Join Date: 10/8/14 Recent Posts
Hi guys,
Long time lurker here.
We had LifeRay 6.2 CE for a year in our institution and we are on the process of upgrading to EE.
Let me describe the series of unfortunate events that led to this post.
We have been used to exporting our portlets to "WAR" files and installing them via Control Panel because
1. The RemoteIde portlet that we use to upload new portlets to our server was no longer functional.
2. We cannot install new ones because MarketPlace portlet no longer works.
So anyways that was fine for a while and still is except for theme portlets.
What happened was during the last of many deployments of a theme under continuous modifications, we started getting the "No theme found the specified themeid" error and reverting to the default theme. Our deployed portlet is successfully copied to the Webapps dir but the error remains. At this point, I made the unfortunate decision to delete a row in the table "LayoutSet" in the db to try and manually remove traces of the old/undeployed theme. Now whenever I tried to open a page on that specific site I am slapped with
"...NoSuchLayoutSetException: No LayoutSet exists with the key {groupId=..." exception.
Any advice on how to get out of this predicament?

PS: attached stacktrace

Attachments:

thumbnail
David H Nebinger, modified 7 Years ago.

RE: Messy theme deployment

Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
Welcome.

What application server are you using? Do you have a backup of the database that you can roll back to and re-apply the update? Which EE service pack are you using for your target environ?

So I typically don't use the Liferay UI for deployments. I may be old school, but I prefer copying war file up to the remote server and then moving into the deploy folder to let Liferay pick it up. When you're in a cluster you really should be deploying this way anyway to ensure all nodes receive the update.

Hopefully you have the database backup, but the important takeaway here is never, ever modify the database directly. Although it may seem like an easy way to "fix" things, unless you have a solid understanding of the data model and the impact that changes can have, you can quickly get your environ into an unresponsive state.

For the theme issue, did you try any restarts? Tomcat has a particularly nasty issue in that after some number of hot deploys you can get into an OOM scenario that only a restart can resolve. Personally I always recommend after every deployment, do a restart just to make sure the environ is clean. In your local dev environ, well there I say just let it run until you hit the OOM exceptions and then do the restart. You just don't want to wait for an OOM to creep into your higher environs, so doing a restart helps avoid them.
thumbnail
Yodahe Zemichael, modified 7 Years ago.

RE: Messy theme deployment

New Member Posts: 3 Join Date: 10/8/14 Recent Posts
Thanks for your response. Advises taken.
The application Server is Tomcat 7.0.42
Our backup is a little outdated, so backing up may do more harm than good.
We still have 6.2CE GA2
Yes I have tried many restarts emoticon
Server has 32GB RAM and we rarely run into OOM problems even on our dev environments after we increased the Memory Args on the LifeRay server settings.
Is there someway to remove theme related info from the database? Or atleast the LayoutSet error...?
thumbnail
David H Nebinger, modified 7 Years ago.

RE: Messy theme deployment

Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
If you still have the 6.2 CE instance, then I guess you still have that DB available or are you saying you completely switched over to EE already?

Again, you don't want to touch the database. Not at all. No good will come from it, I've had to roll back too many times because of hosing up data.

You can undeploy the theme by removing it completely from webapps folder. Stop tomcat after undeploy and delete the contents of the temp and work dirs (to make sure it's gone).

Likely Liferay will retain some memory of the old theme even though it's gone. An easy "fix" would be to rename your theme - the new name wouldn't conflict with whatever DB records are giving you problems.

Ideally, though, if you still have the 6.2 CE instance and you haven't yet switched over to EE, well I'd still consider dumping your EE database and redoing the upgrade again from the CE side. If you're worried about content, well you could export those as LARs so you can import them after the upgrade completes.

When your DB gets into an inconsistent or unstable state, problems you see can simply be the tip of the iceberg. I'd worry more about the problems that lie beneath the surface that you haven't run into yet. If you haven't completed the switch, you still have time to change the direction of the ship before you strike the berg.
thumbnail
Yodahe Zemichael, modified 7 Years ago.

Theme causing freemarker error

New Member Posts: 3 Join Date: 10/8/14 Recent Posts
Dear David,
Thanks for the helpful comments.
I was finally able to rollback the db changes and solve the LayoutSet error. I have learned my lesson and never get into production portal tables in the db.
Now, after successfully deploying the theme and applied it to a site/page, whenever I click on the "Add" button for new apps/components, the following error comes up:
ERROR [http-bio-8080-exec-152][runtime:96] Template processing error: "Expression left is undefined on line 88, column 47 in 10155#10195#12064."
Expression left is undefined on line 88, column 47 in 10155#10195#12064.
The problematic instruction:
----------
==> ${left.getData()} [on line 88, column 45 in 10155#10195#12064]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression left is undefined on line 88, column 47 in 10155#10195#12064.

The weird part is my theme template is not even freemarker, it is velocity and even after clearing everything I have on portal_normal.vm except for the dockbar, I still get this error when I click on the add button.
This error, apparently, doesn't stop the left vertical bar from appearing, however, it disables me from dragging or adding any component from it onto the page. The left bar is basically non responsive.
PS: Attached stacktrace

Attachments:

thumbnail
David H Nebinger, modified 7 Years ago.

RE: Messy theme deployment

Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
So the 10155#10195#12064 points to a structure or template (not sure which). Something has been defined as a FM template that's in the process of evaluating when it hits the line(s).

The last exception points to Bkg.getData(), so there's something going on here outside of Liferay, I believe.