author profile image

Matt Reid

Solo Entrepreneur | Lead Software Architect

When using spring”s handy ReflectionTestUtils to set a field on an AOP proxied object, it has trouble setting fields on the proxy object (complaining that “field not found”). In this case you need to unwrap the original object from the proxy. private Object unwrapProxy(Class clazz, Object proxy) { if(AopUtils.isAopProxy(proxy) &&...

Just a quick one for converting cells in epoch format to dates, I am using this for data pullled from mongodb. =ID_OF_CELL/86400000+DATE(1970,1,1)  

To install NTP on an old debian machine, issue the following commands into the command prompt. wget http://mirrors.mit.edu/gnewsense/gnewsense-parkes/gnewsense/pool/main/n/ntp/ntpdate_4.2.4p4+dfsg-8lenny3_amd64.deb dpkg -i ntpdate_4.2.4p4+dfsg-8lenny3_amd64.deb ntpdate -b europe.pool.ntp.org  

A note to anyone getting the following message java.lang.VerifyError: class net.sf.cglib.core.DebuggingClassWriter overrides final method visit  The problem is a mismatch in the versions of asm and cglib in your webapp. cglib 2.2 pulls in asm version 3.1 (there should not be a higher version in your classpath) cglib cglib 2.2 compile...

Just a quick one, here is a simple command for adding a file to an existing jar jar -uvf JARNAME.jar NEWFILENAME