Set a new property "org.bonitasoft.i18n.folder"? - portal

I am trying to change the default language of Bonita Portal. I have been following the bonita guide ( for 7.3 version) but no use and I can't understand some things.
First of all, when it says: set a new property "org.bonitasoft.i18n.folder" in Windows file setEnv.bat, how can I define this property? It is the same with the Subscription version?
So the property must be
CATALINA_OPTS=-Dorg.bonitasoft.i18n.folder=${CATALINA_HOME}/my_custom_i18n
etc... or there is something else?
No matter how I google it. My research has no results. That's why i am asking for your help.
I am waiting for your answers

If you are running the zip distribution of Tomcat (for example if you are using the Bonita BPM + Tomcat bundle) on Windows you should have:
set CATALINA_OPTS=%CATALINA_OPTS% %PLATFORM_SETUP% %H2_DATABASE_DIR% %DB_OPTS% %BDM_DB_OPTS% %BTM_OPTS% %INCIDENT_LOG_DIR% -Dfile.encoding=UTF-8 -Xshare:auto -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Dorg.bonitasoft.i18n.folder=%CATALINA_HOME%\my_custom_i18n
It's the same for the Subscription version.
If you are running the Tomcat embedded in Bonita BPM Studio the way to define org.bonitasoft.i18n.folder JVM system property is a little bit different. You need to:
Edit the appropriate ini file (e.g. BonitaBPMCommunity64.ini if you are running BonitaBPMCommunity64.exe)
At the end of the file add -Dtomcat.extra.params="-Dorg.bonitasoft.i18n.folder=<full_path_to_i18n_folder>" (replace <full_path_to_i18n_folder> with the appropriate path).
Restart Bonita BPM Studio
Note that their is some work in progress about translation to make sure that it's possible to fully translate the latest version of Bonita BPM Portal (Crowdin project should be updated soon).

Related

Unable to change runtime environment on server in Liferay Developer Studio

In Liferay Developer Studio, I am try to set the Runtime Environment for my local server. After selecting a runtime environment from the drop down, I then try to save the change and get the following message:
The server cannot be saved for the following reasons: [Overview] Changing runtime base directories is not supported.
Is this a change I need to do manually in a configuration file, or should I going elsewhere to change the runtime environment?
It seems to be a known issue in Liferay IDE, check the issue.
You may have a clean version of the Liferay-Tomcat bundle given along with the Liferay IDE. What I recommand you is to create a new server that refers to this runtime environnement.
If you don't have a clean version of the Liferay-Tomcat bundle you can download new one from Liferay official site.
I found a way to get the existing runtime evironment changed.
I first had to go to the server properties and select "Switch Location". This moved the server properties from "[workspace metadata] to my workspace/servers/ directory.
Inside the .server file, I just had to change the runtime-id property to one of my predefined runtimes, in my case...
runtime-id="Liferay v6.2 EE (Tomcat 7)"
My Liferay server is now working as expected.

Name and location of profile management tool in Websphere Application Server 7?

IIRC whenever I use to install WAS on my Windows PC it used to create short cuts to desktop of profile management tool. This time it wasn't created, please tell me the name and location of that batch file (in WAS) from where I can create the similar short cut again by myself.
The Profile Management Tool (pmt) is available here:
C:\PATH_to_WebSphere_AppServer\bin\ProfileManagement\pmt.bat
be aware that in WebSphere v7, there is no pmt tool in 64-bit WebSphere version. So, if you installed 64-bit WebSphere you will not have that short cut.
For 64-bit you will need to use manageprofiles.bat command line tool.
Not sure about the UI part but in case you want to create it from commands you can do this -
manageprofiles.bat -create -profileName AnyAppSrv -profilePath %WAS_HOME%\profiles\AnyAppSrv -templatePath %WAS_HOME%\profileTemplates\default -serverName server1 -cellName AnyAppSrvNode1Cell -nodeName AnyAppSrvNode1 -hostName localhost -enableAdminSecurity false
Note: Path may differ which you have to set on your own.

Tomcat not deploying new version of files at all - linux / eclipse

I am having issue with the way tomcat deploys my files to the server.
I have installed Tomcat 7 to /opt/tomcat7.
In my eclipse i have specified this path as my tomcat server.
my workspace directory is /home/maciej/workspace/<projects here>
now if I edit a class file and i add simply log statement
log.info("blabla"); and then deploy 'NEW' version of the file via - run on server, i do not see this 'blabla' in my output. It seems like although i have modified the class file, it was not properly deployed into tomcat. Tomcat is reading god knows what but certainly not the file it should read.
EDIT: I have recofnigured my tomcat in eclipse and now:
Server Path = /opt/tomcat7
Deploy Path = /opt/tomcat7/webapps <- used to be .metadata/blablabla default
eclipse tomcat location
When I open 'Open Lunch Configuration' under arguments/working directory the default option is ticket with greyed out path /home/maciej/Desktop
Should this also be changed?
Isn't tomcat working directory /opt/tomcat7/work ?
Any suggestions / ideas? As this issue is slightly getting on my nerves as i can not develop the app.
The Server Path is the same as the Tomcat installation directory in the modal you see in Window > Preferences > Server > Runtime Environments after hitting Edit. That should be set to /opt/tomcat7 or wherever the root of your Tomcat installation lives.
The Deploy Path is relative to the Server Path. It should be webapps, unless you already have stuff there and you want a separate directory. You will not be able to edit this until you shut down Tomcat and remove all webapps underneath it through the Servers view.
Try unchecking Modules auto reload by default if you trust the JDK hot-swapping, which you should if you're using JDK 1.7 or 1.8 and just want to see a log statement inserted.
The working directory you mentioned is just the root directory that Tomcat uses to spit out thread dumps on crashes and the like. It has nothing to do with the Tomcat "work" directory.
Open server view: Window->Show view->Other->Servers. The select correct server, right click, select "Clean" and then restart tomcat. It should help.
If you change something in the project then Eclipse will build automatically and "deploy" the files to the location you have specified. By default, Eclipe's work stops there and the rest is up to tomcat.
Tomcat, like any Java web server, detects changes in JSPs and recompiles them. Nevertheless, changes in classes have no effect because of the way Java class loading works. For the new version of a class to be used by tomcat you need to:
Not have loaded the class before. For example, you start tomcat but then see an error before doing any request. If you change the class then that change will be used because the class was not yet loaded.
Reload the application. This means that all classes are discarded and everything starts fresh.
The easiest way to reload an application, by default, is to make a change to web.xml. If you look into tomcat's configuration conf/context.xml you can see that WEB-INF/web.xml is monitored. Any change will trigger a reload of the context. So you can either make an artificial change in the file or add a resource like WEB-INF/version.properties and generate a different version.properties with any build.
In any case, reloading a complex application takes time. That is why there are plugins like JRebel. But before you go down that path (which adds another moving piece to your setup) you can also try to use Eclipe's support for hot code replacement. You start tomcat in debug, connect to it with Eclipse, and then change some class. Eclipse will try to recompile the class and upload the new definition to tomcat. If it fails it will tell you. As a general rule it will fail when you change the structure of the program and succeed when you just change method's implementations.

How to set up ImageMagick with Liferay?

Following is my addition to portal-ext.properties for setting up ImageMagick with Liferay
I have installed ImageMagick in D drive as mention below :
imagemagick.global.search.path=D:\\ImageMagick-6.8.3-Q16
imagemagick.enabled=true
preview functionality:
dl.file.entry.preview.enabled=true
dl.file.entry.thumbnail.enabled=true
Set this to true to enable conversion and previewing of videos in the Document Library portlet:
xuggler.enabled=true
In Server Administration--->External servics tab, I have configured it correctly and also downloaded/install jar related to Xuggler.
However, above settings are not working for me to generate preview functionality.
I am not even getting message dispalyed like "Generating preview require few more time, please refresh the page after some time....blah blah blah...."
Any help is appreciated.
Thanks.
Have you configured Xuggler properly? Do you get an UnsatisfiedLinkError exception?
See Xuggler's FAQ for the steps to configure your path properly
If it shows that message "Generating preview...", seems that Liferay doesn't detect this file as a video file (the Mime Type isn't any of the values in the property: dl.file.entry.preview.video.mime.types).
I also saw this problem when uploading videos using some browsers. Try uploading using another one.
For me, the solution was to symlink /usr/bin/convert to /usr/local/bin/convert
Whatever I did, nothing seemed to work. All configuration was pointing to /usr/bin (both control panel and portal-ext.properties). As a last resort, not really believing that it will work, I just did the symlink, as that was the default location for liferay.
And it works! All my configuration still points to /usr/bin. So... it looks like liferay just ignores all that config and only looks to default folder.
I'm using Ubuntu 12.04, imagemagick from package manager. Liferay 6.1.2 GA3.
I hope it helps someone.

Liferay Portlet Issue

Im new with liferay have a problem with portlet deployment using the plugins sdk,
Platform:
liferay-portal-tomcat-5.5-5.1.2,
liferay-plugins-sdk-5.2.2,
windows vista.
Problem:
I have successfully created a sample portlet with ant and deployed it into the hot-deploy folder. It is automatically picked up by the server but the console messages say that the portlet has been copied successfully and never registers it.. and i cant find it in the add application drop-down menu.. pls your help will be very appreciated.
I don't know if anything important changed in these versions, but you say you're using Liferay 5.1.2 with the plugin environment 5.2.2 - try with matching versions - at least on the second digit.
also, make sure that all required files are available - among them are WEB-INF/web.xml, WEB-INF/portlet.xml.
Create a new sample portlet with "create.bat" in the plugin SDK's portlet folder and deploy this - it should succeed. Then make sure that all config files from the new one are present in your current one.
How did you create your current portlet? What did you do/change?

Resources