Jul 12, 2012

CDH4 Hadoop Ubuntu precise server

I got this error "JAVA_HOME "
When trying to install CDH4 of Cloudera Hadoop standalone version.
Although i did all the needed configuration + echo $JAVA_HOME is fine.
+ writing "java" works + writing "java -version" works ok .
Nothing really helped except
1. go to /etc/hadoop/conf
2. edit hadoop-env.sh
add export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_32
then try again, i was trying to format the namenode.

Hoped it helped.
Dor

Jul 9, 2012

YARN vs MRV2


YARN is the up coming version 2.0.0 which is now in alpha and MRV2 as for map reduce version 2.0
They used to call mrv2 for the previous 0.23 version.

More about it can be found in cloudera site.

Spring Hibernate Envers java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V

Issue occurred to my college at work. It means that spring uses already the envers as a dependency inside it and you are trying to add it also with a different version. As result -> Conflict.
For me it happened with
spring 3.0.5
hibernate 3.6.0.FINAL
* We added hibernate-envers 3.6.0.FINAL.

Solution
Replacing hibernate-envers with the latest, current latest is 4.1.4 but you should look in maven repository.



Jun 7, 2012

Spring Transaction Listener

Very easy way doing that is by registering the listener with the transaction.

TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
       @Override
       public void afterCommit() {
        // here you will do something
       }
   }
);

This is Spring based.


Have a good day,
Dor

May 21, 2012

PermGen Maven

Had this while building company's project.
Solution is very easy, add "MAVEN_OPTS" to your system parameters
+
Add "-Xms2048 -Xmx4096"
Of course the minimum size and the maximum size depends on your local machine.


Apr 18, 2012

junit NoClassDefFoundError: org/codehaus/jackson/map/ObjectMapper

Got this error while trying to run one of my junits.
This junit annotated with spring annotations and works with spring-web3.0.5-RELEASE.

After a lot of digging, it seems that the issue is simple.
You need to add this to your pom :

   <dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.4.2</version>
</dependency>

Jackson 1.4.2 suite to spring-web3.0.5

Problem caused since the jackson dependency in spring-web is an optional=true.

Jan 11, 2012

.svn directory missing after upgrade to 1.7

Hi,

After upgrading my TortoiseSVN to the latest version from 1.6.12 and as well as my SilkSubversion.

I Checkout my project from svn again (not relate to the upgrade) and noticed that only the root directory contains the ".svn" folder.

Child folders doesn't contain the ".svn" folder any more.

After a lot of digging it came out that from version 1.7.X of tortoise and silk there won't be any child ".svn" folders (hidden) anymore. Only one folder in the root.

+
If you work in eclipse, you need to uninstall (unless till you read this they will upgrade it) the old subversion/svnkit/javahl plugins from it and install it again using this updated site
"http://subclipse.tigris.org/update_1.8.x"




Hoped it helps,
Dor