Liferay7 - module (portlet-provider) not refreshing - liferay

Im working with Liferay 7 and module development.
I created a module of type "portlet-provider" for can change the view of personalBar.
When I deploy it first time, it deploys ok, but after that, new deploys are not refreshing jsp files.
Is important to said that when I deploy the module, via blade or via gradle in Intellij, it deploys ok and also change the OSGI related folder, deleting old version and creating a new one with new jsp ok.
Even with that in a clear browser (recent removed all cache and temp) does no not refresh the personalBar view, related to new jsp file.
I saw this thread: https://web.liferay.com/community/forums/-/message_boards/message/88515142 , and tested the following.
1) Changed the tomcat timeZone, put the same timezone that I had in my desktop. (GMT-3 ) , it didn't work .
2) The only thing that seems to work is to clear all osgi state content and $liferay_home/work content and restart server as David said in above post.
But I need a way to can deploy theses modules without having to restart the server
Any help on this?
Thanks in advance

About my problem, I had a problem with the priority of the module so the module been deployed were not the same showed in portal.
At the beginning I set the "service.ranking:Integer="+Integer.MAX_VALUE , but I don't know why it was removed and for that the portlet showed was the portal default personal bar.

Related

SiteMapPath empty after upgrade to MVCSiteMap 4

I just attempted to update the site map provider from 3.3.6.0 to 4.0.14. I followed the instruction on the wiki however my SiteMapPath now renders empty. I made no changes to the mvc.sitemap file other than updating the schema to 4.0. When I debug into the SiteMapPathHelperModel I find that the model has no nodes defined. I am using the internal DI container (I would like to get this working before switching over to the application container).
When I check the sitemap.xml file it is well populated which makes me think that the mvc.sitemap is being read.
I'm out of ideas on this one and would be happy to provide any additional information which may be useful. I'm not even sure where I can hook into debug this problem. Literally the only thing I changed between a working 3.3.6.0 and a not working 4.0.14 was what was prescribed on the wiki.
Ok, since your /sitemap.xml endpoint appears to be working, you are correct the sitemap is being populated and loaded correctly.
There are a couple of things I know of that can cause this to happen:
If you are using Dynamic Node Providers, they must be added to a node that is not otherwise part of the sitemap. See my question here - I am trying to figure out why this is the case as well.
Your routes don't match your nodes - please read Routing Basics and/or post your routes and Mvc.sitemap XML.
If you check the above and everything appears to be correct, please make a small demo project showing a sample of your configuration and open an issue on GitHub, as it is highly likely your specific configuration has something to do with the problem.
BTW - You can debug by cloning the current repo on your system or downloading the solution as a zip, enabling NuGet package restore on your solution (right click the solution > Enable NuGet Package restore), add the MvcSiteMapProvider project to your solution, and then in your project remove the reference to MvcSiteMapProvider and add the reference to the newly added MvcSiteMapProvider project from your MVC project. Then you can add breakpoints and step through the code. I suggest making a backup of your solution (or ensure you can roll back another way) before doing this, and reverting back to your current state when done.
I have documented the whole procedure here: http://www.shiningtreasures.com/post/2013/08/21/debugging-an-mvcsitemapprovider-configuration

Portlet not getting deployed

I have this strange problem at which I have spent stupid amount of time.
To build my portlet, I haven't used sdk and I am using my own ant script do the job. It works all well till this wierd situation.
I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log:
Copying 1 file to C:\liferay-portal\tomcat-6.0.29\webapps\ch1_HelloWorld
Deleting directory C:\liferay-portal\tomcat-6.0.29\temp\20121016060846753
06:08:47,887 INFO [PortletAutoDeployListener:81] Portlets for C:\liferay-portal\tomcat-6.0.29\deploy\ch1_HelloWorld.war copied successfully.
Deployment will start in a few seconds.
16 Oct, 2012 6:08:56 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/ch1_HelloWorld]
That's it! Later it doesnt show (as it does normally) that the portlet is available to use. In browser, under the "add tab", the option is never shown. What can be the issue for this. The portlet is a simple hello world portlet that access role information
I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log:
Did you put portal-service.jar to WEB-INF/lib? If so remove it from there and add it to some other (my_project/lib) directory than add it to build path.
Also make sure that after deployment portal-service.jar is not in your deployed WEB-INF/lib.
Better yet, first undeploy than redeploy.
Is this properly set in your liferay-display.xml ?
<display>
<category name="yourCategoryUnderAddMenu">
<portlet id="yourPortletId"></portlet>
</category>
</display>
Late answer, but maybe it will help someone:
- just shutdown your server;
- delete the portlet from the "webapps" tomcat folder;
- you should delete "temp" and "work" folders content;
- restart your server and deploy your portlet.
Everything should be OK.
I do not know why this happens, but I encounter this problem many times and fix it with the same solution.
Bye!
This is normally the case when the auto.deploy.dest.dir is pointing to the wrong place. Firstly, i came to realise the common mistake is to make this point to liferay_home/deploy which is not correct. This property specifies the destination of exploded files. For tomcat, it would be the webapps directory e.g. /opt/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps
In other words, tomcat, on receiving the exploded files,carries on. In your case, tomcat was never realising any changes.
Delete the old war from the webapps, and put your new war manually in the Deploy folder.
It looks like you might be deploying by copying it to the webapps folder, instead of the deploy?
go to plugins-sdk folder.
open build.userName.properties (In my case name of file is build.asif.properties)
open it..
add the below line
auto.deploy.dir = D:\\nWorkSpace\\liferay-portal-6.2.0-ce-ga1\\deploy
"D:\nWorkSpace\liferay-portal-6.2.0-ce-ga1\deploy" is the path of my deploy direcotory.
where nWorkSpace is my workspace. My problem is resolve.
I tried all of the above solutions but my issue was not resolved on a Liferay 6.2 EE sp2 bundle.
I was finally able to resolve portlet deployment issue by cleaning all the portlet xml files except the ROOT.xml from the Tomcat home/conf/Catalina/localhost folder.
This tip above was provided on the following post - how ever the blog post no longer exits and had to find in the archives below with google search in case someone is interested. It saved me hours of effort.
https://www.liferay.com/community/forums/-/message_boards/message/2124111
http://archive-ro.com/page/754918/2012-11-26/http://blog.ropardo.ro/2010/08/09/liferay-deployment-will-start-in-a-few-seconds-and-how-to-realy-start/

Unable to view deployed Liferay portlet in the add >> more option

I have created a sample Liferay portlet and it has successfully deployed. But, the eclipse console didn't say "1 portlet is ready for use". And, I couldn't find this portlet in the Add >> More.. option on a Liferay page.
As Mark mentioned, it is undeterministic and it sometimes happen. I usually follow the following steps and after this it works normally.
Steps:
remove all the references of the portlet from webapps.
stop the server
deploy the portlet's WAR
restart the server
check the logs if the portlet is deployed.
If possible try to build the WAR again and deploy the new WAR, and follow the previous steps.
Also if this doesn't work try to clear the temp and work directory and again try the previous steps.
Hope this helps.
I have been fighting with this problem for a day. For me it was two things: wrong property of
liferay.home
inside
portal-setup-wizard.properties
Only after correction I was able too see in tomcat logs that my liferay-plugins had higher version than liferay itself. I redownload plugins with correct version and new plugin deployed correctly.
If you've done all the cleaning etc. and it still does not work, there may be another reason for not showing. If you have - for some reson - deactivated the portlet in Liferay, it will remember the setting even though you have undeployed it several times.
So, you must go to Control Panel > App Manager > All Apps > Your portlet name and activate it again!
That is undeterministc but usual error. Try to undeploy the portlet - delete portlet directory under tomcat/webapps and try to deploy again.

SharePoint 2010 GAC deployment doesn't update

The following issue just crept up on me. The steps mentioned below had worked just fine until about 2 days ago.
When I deploy a update to a solution (of web parts) to a SharePoint 2010 server I don't see the update. The solution does get installed, but from what I can tell the installed web parts are over a month old (nothing new is installed).
I do the following steps through PowerShell:
retract the solution from the web app
remove the solution
add the solution
install the solution to the web app
I have tried restarting the Web App, restarting IIS and also restarting the server. Nothing seems to work.
I notice that after I remove the solution it does get removed from the GAC. After I add/install it the solution does reappears in the GAC.
Am I missing something? Am I overlooking a step that I should be doing? Something to try?
I never deactivated/reactivated the Feature.
After following the same steps I mentioned in my question I just deactivated, then reactivated, the Feature and everything started to working fine.
This is an easy thing to I can start to implement with my solution updates. However, why did I never have to do this step before?
In general, you should check your ULS log to see which version of your solution is running. If you see the old one, then you can be sure that your activated site feature is still bound to the old version. In this case you have to Inactivate the site feature indeed to loose that tie and then Activate to bind to the new one (it appears Activate always ties the site feature to the newest version of the solution).
Maybe you had not to do this earlier, because you did not change the version number of your solution, appearing as the same version in GAC on the server. In this case you had your site feature already pointing to the correct version of your solution, therefore didn't have to reset the feature.
You have probably checked, but just in case. Make sure that the powershell script is not adding a month old package.
Is the problem in the web part code or the configuration? The configuration usually unghosts itself sooner or later and refuses to update from the solution - you can update the file in the gallery manually if anything has changed there. For most updates there won't be any changes because existing web parts won't get updates applied anyway - they will use new code but old configuration.
If the problem is the code itself, does the assembly appear to the system to be unchanged? All the hardcoded full name references in SharePoint config files mean that usually you are deploying a new assembly but with the same version numbers. This can mean that the system doesn't bother making the update. I have found it very useful to update AssemblyFileVersion (which does not affect binding) on every build and have a page in _layouts that displays the file versions of all the loaded assemblies so I know exactly what is running.

SharePoint 2010 Web part Deployment Error

When I deploy my web part locally everything is fine. The web part is registered as safe, and is completely usable.
When I deploy the wsp to another server the web part comes back with the following error although everything appears to be deployed correctly (and the SafeControls appear within the web.config). :
Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type XXXXX could not be found or it is not registered as safe.
It is almost the exact same issue as this question. The only difference being that when I look at my web.config on the server I am deploying to I DO see the SafeControls.
Any thoughts on things that I could try to fix the issue? Server settings, how I package or deploy, etc.
I was able to solve my issues by manually removing the solution from the GAC. Then I just tried to add the solution again and everything works well.
I had added the web part in question after the initial upload of the solution (sorry about leaving that part out of the description). Before doing this I was trying to retract and delete from the Central Admin then retry the addition. Apparently this didn't actually delete the solution from the GAC.
The site was using the old version of the solution which did indeed not include a SafeControl for the new web part. Once the old version was removed the addition of the new version went without a hitch and all is well.
Thanks to all for their suggestions.

Resources