Filed under Linux, documentation, hack on July 27 | 0 comments
Found this great article on how to hack your way to do a SVN dump from a remote repo. I had never use the svnsync command but this allows you to make the remote repo a local one and you can easily use it to create your dump file. Very useful when you have lost admin access to the original server and you need to migrate to a new SVN server.
Quick command list:
- svnadmin create temprepo
- echo ‘#!/bin/sh’ > temprepo/hooks/pre-revprop-change
- chmod +x temprepo/hooks/pre-revprop-change
- svnsync init file://temprepo https://server/svn/origrepo
- svnsync sync temprepo
- svnadmin dump temprepo > dumpfile
Copy the dump file over to the new SVN server and on it:
- svnadmin load reponame < dumpfile
A quick word of warning because the UUID will change with this process so doing “svn sw” on existing working copy might prove to be challenging.
Filed under code, java on July 23 | 0 comments
I spent a little bit of time to figure out how to find the jdk version used to compile a java class. On the site stackoverflow they have a great example of java code that can get this information. Unfortunately that did not resolve my problem so I will have to hunt down a bit more on why I get this:
Exception in thread “main” java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Filed under network on July 21 | 0 comments
I am troubleshooting this mysterious networking issue and I was looking for way that you can overwrite tcp packets information to send it to the wrong place. I found this link for a tool that can do some of that. It cannot be used on live traffic as we are experiencing it but it is very interesting so I did not want to lose the information about this tcprewrite tool.