Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

Wednesday, January 2, 2013

Solving Can't find resource for bundle com.liferay.portlet.PortletResourceBundle, key javax.portlet.title

I have seeing many of you dealing with this error.
 I spent hours reading and trying to figure out what was the problem. These are my findings ...

 Example code. (ERROR)

Using Eclipse (I didn't test with another IDE) the Ctrl+Shift+F command will indent your code, but for some reason this breaks the xml
We are interested in this specific line
And should be

  That's it! Hope it helps you.

Monday, December 10, 2012

JDK Installation - Ubuntu Distribution

1) Download the bin file from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html (JDK 5.0 Update 13, Linux self-extracting file) to /usr/local/ or another directory.

Change permisions using chmod.
chmod +x jdk-1_5_0_12-linux-i586.bin

2 ) Then we need to configure JAVA

We have 2 options here, use the console or a GUI.

A) Console approach.

sudo update-alternatives --install /usr/bin/java java /home/psabbate/dev/java/jdk1.7.0_XX/bin 70

Command: update-alternatives 
Installation Param: --install
Link Path: /usr/bin/java
Link Name: java
JDK Path: /home/psabbate/dev/java/jdk1.7.0_XX/bin
Priority: 70 (The higher, the best)
Then execute
sudo update-alternatives --config java

B) GUI approach

Use galternatives

sudo aptitude install galternatives
sudo galternatives

Search “java” and go to the JDK directory.

3 ) Enviroment Variables:

Please Edit
sudo vi /etc/bash.bashrc:

Add at the bottom of the file
export JAVA_HOME=(JDK Path)
export PATH=$JAVA_HOME/bin:$PATH

Friday, August 10, 2012

How to inject Spring properties using annotations?


I started to change a couple of projects from xml configuration to annotations and it wasn't trivial.
One of these items was the injection of properties using annotations.

First of all, we need a property configurer


The configuration file is a common property file.

application.title = My Application Title

In my case, I want to define a configuration bean, so I put in one place all the configurations. But you can use the same approach injecting the properties in your specific beans.

Hope it help you ...