I know that I know nothing

To see the number of process for a user run this

clock November 25, 2014 21:46 by author Administrator

To see the number of process for a user run this (replacing [user] with the username):


ps -eLF -u[user] | wc -l

install maven in mac os

clock November 14, 2014 20:55 by author Administrator

brew install maven


clock November 14, 2014 20:26 by author Administrator


YAML is a superset of JSON, and as such is a very convenient format for specifying hierarchical configuration data



@Platform and @Qualifier

clock November 11, 2014 22:23 by author Administrator

private MarketPlace marketPlaces;

@Qualifier( "ios") // the use is unique to Spring. It's darned convenient, too!
 private MarketPlace marketPlaces;

and now jsr 330

package spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static spring.Spring.Platform;

public class Spring {

    public static void main(String[] args) {
        new AnnotationConfigApplicationContext(Spring.class);

    private MarketPlace android;

    private MarketPlace ios;

    public void qualifyTheTweets() {
        System.out.println("ios:" + this.ios);
        System.out.println("android:" +;

    // the type has to be public!
    public static @interface Platform {

        OperatingSystems value();

        public static enum OperatingSystems {

interface MarketPlace {

class AppleMarketPlace implements MarketPlace {

    public String toString() {
        return "apple";

class GoogleMarketPlace implements MarketPlace {

    public String toString() {
        return "android";

Hibernate: Version-Based Optimistic Concurrency Control

clock November 11, 2014 22:17 by author Administrator

Optimistic locking discards all incoming changes that are relative to an older entity version. But everything has a cost and optimistic locking makes no difference.

The optimistic concurrency control mechanism takes an all-or-nothing approach even for non-overlapping changes. If two concurrent transactions are changing distinct entity property subsets then there’s no risk of losing updates.

Two concurrent updates, starting from the same entity version are always going to collide. It’s only the first update that’s going to succeed, the second one failing with an optimistic locking exception. This strict policy acts as if all changes are overlapping. For highly concurrent write scenarios, this single-version check strategy can lead to a large number of roll-backed updates.


https problem (Error code: ssl_error_no_cypher_overlap) in firefox

clock November 11, 2014 20:19 by author Administrator

go to about:config


You can check the ssl and tls prefs on the about:config page.




Open multiple Eclipse workspaces on the Mac

clock November 9, 2014 21:29 by author Administrator

OS X Eclipse Launcher 2.0.0 plugin


Unsupported major.minor version 51.0

clock November 9, 2014 10:40 by author Administrator

The version number shown describes the version of the JRE the class file is compatible with.


J2SE 8=52,
J2SE 7=51,
J2SE 6.0=50,
J2SE 5.0=49,
JDK 1.4=48,
JDK 1.3=47,
JDK 1.2=46,
JDK 1.1=45

javac -target

apache ode start problem java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory

clock November 9, 2014 09:58 by author Administrator

If you are using Tomcat v.6 or v.7, you probably get the error


Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
  at org.apache.catalina.startup.Bootstrap.<clinit>(
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
  at Method)
  at java.lang.ClassLoader.loadClass(
  at sun.misc.Launcher$AppClassLoader.loadClass(
  at java.lang.ClassLoader.loadClass(
  at java.lang.ClassLoader.loadClassInternal(
  ... 1 more
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.

Click on Open launch configuration → Classpath tab → Add External JARs → [your TOMCAT_DIR]\bin\tomcat-juli.jar. Then Ok.

About the author

 Welcome to this web site . This page has two purposes: Sharing information about my professional life such as articles, presentations, etc.
This website is also a place where I would like to share content I enjoy with the rest of the world. Feel free to take a look around, read my blog

Java,J2EE,Spring Framework,JQuery,

Hibernate,NoSql,Cloud,SOA,Rest WebService and Web Stack tech...


Month List

Sign In