Go into System Preferences, Display, Arrangement and you can setup your monitors there.
OGNL Error for Format Money
Good example on how to fix error through log change. See attachment.
Here is what I've researched about the WARN log messages related to org.apache.struts2.util.TextProviderHelper:
When you reference a message element by its key (in this case format.money or format.moneyDollar), Struts searches for a corresponding message bundle in the following order:
- ActionClass.properties
- Interface.properties
- SuperClass.properties
- model.properties
- package.properties
- struts.properties
- global.properties
So, for example these log lines:
2013-01-25 06:56:16,013 9822751 WARN [org.apache.struts2.util.TextProviderHelper] (ajp-haldevjbs15.hq.halw.com%2F10.194.50.82-8009-3:) The first TextProvider in the ValueStack (com.hal.sf.booking.action.StateroomTypeAction) could not locate the message resource with key 'format.money'
2013-01-25 06:56:16,013 9822751 WARN [org.apache.struts2.util.TextProviderHelper] (ajp-haldevjbs15.hq.halw.com%2F10.194.50.82-8009-3:) The default value expression 'format.money' was evaluated and did not match a property. The literal value 'format.money' will be used.
Are looking for a com.hal.sf.booking.action.StateroomTypeAction.properties file, and in there the property with key: format.money, but this property is defined in a package.properties file.
This is the TextProviderHelper method that is executing:
public static String getText(String key, String defaultMessage, List<Object> args, ValueStack stack, boolean searchStack) {
String msg = null;
TextProvider tp = null;
for (Object o : stack.getRoot()) {
if (o instanceof TextProvider) {
tp = (TextProvider) o;
msg = tp.getText(key, null, args, stack);
break;
}
}
if (msg == null) {
// evaluate the defaultMesage as an OGNL expression
if (searchStack)
msg = stack.findString(defaultMessage);
if (msg == null) {
// use the defaultMessage literal value
msg = defaultMessage;
}
if (LOG.isWarnEnabled()) {
if (tp != null) {
LOG.warn("The first TextProvider in the ValueStack ("+tp.getClass().getName()+") could not locate the message resource with key '"+key+"'");
} else {
LOG.warn("Could not locate the message resource '"+key+"' as there is no TextProvider in the ValueStack.");
}
if (defaultMessage.equals(msg)) {
LOG.warn("The default value expression '"+defaultMessage+"' was evaluated and did not match a property. The literal value '"+defaultMessage+"' will be used.");
} else {
LOG.warn("The default value expression '"+defaultMessage+"' evaluated to '"+msg+"'");
}
}
}
return msg;
}
It iterates over the ValueStack objects and looks for the first one that implements TextProvider. In this case, StateroomTypeAction.java extends ActionSupport and this class implements TextProvider interface, that provides access to the properties files and their text messages. As the msg (tp.getText(key, null, args, stack)) is null, it logs the warn message.
The troubleshoot I found (apparently is a common problem after the Struts 2.0 - 2.1.x migration) is just to turn off the WARN level logging for TextProviderHelper.
I added the following lines in my jboss-log4j.xml file:
<category name="org.apache.struts2.util.TextProviderHelper">
<priority value="error"/>
</category>
and it solved the problem.
Here are some links where I took the info from:
Service Layer Change Examples
Please see attached for patch file of differences.
Deleting Mac Repository
Okay, a GIT repository was created when playing around with xCode and for the longest time, could not figure out how to delete it. Basically, if you open the repository, and look at the lower left hand corner, it has a +/- pair where you can delete with the minus of course.
Grep while ignore subversion folders
grep -ir "/secure" * | grep -v ".svn"
Did not work very well:
grep --exclude=".svn" -ir "SEARCH-STRING" *
Determine RHEL Version
This will do it: cat /etc/redhat-release
Imorting a Maven Project Into Eclipse
Fairly straight forward process
- Position yourself into the new workspace
- File, Import, Existing Maven Projects
- Go to the root directory of your project to import and keep answering prompts to import
Show Spring SQL Code for Debugging
You can show the SQL being generated in the log file by setting the showSql parameter to true in hal-web/src/main/webapp/WEB-INF/config/spring/spring/webapp-jpa.xml, line 31. You’ll need to rebuild the application and restart it after changing this parameter.
Piping multiple search strings to eGrep
Example:
bash prep.sh | egrep -i "(success|failure)"
Log Rotate
You can use a Linux logrotate command for log file maintenance [pdf].
Refer: http://linuxers.org/howto/howto-use-logrotate-manage-log-files
