Skip to content

Instantly share code, notes, and snippets.

java.lang.NoClassDefFoundError: org.junit.runner.Runner
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:29)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:40)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:30)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
javascript:(function(){f='http://delicious.com/save?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'&v=5&';a=function(){if(!window.open(f+'noui=1&jump=doclose','deliciousuiv5','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()
javascript:var%20d=document,w=window,enc=encodeURIComponent,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),s2=((s.toString()=='')?s:('%22'+enc(s)+'%22')),f='http://bit.ly/',l=d.location,p='?v=3&u='+enc(l.href)%20+'&s='+enc(d.title)+'%20'+s2,u=f+p;try{if(!/^(.*\.)?tumblrzzz[^.]*$/.test(l.host))throw(0);tstbklt();}catch(z){a%20=function(){if(!w.open(u))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}void(0)
@vshank77
vshank77 / Adding Events to Div in GWT
Created January 19, 2011 09:50
This method shows how to add a event listener to a div element in GWT
private NodeList<Element> pageDIVElements;
public void initDiv() {
MyDIVEventHandler handler = new MyDIVEventHandler();
pageDIVElements = Document.get().getElementsByTagName("div");
for (int i = 0; i < pageDIVElements.getLength(); i++) {
Element elem = pageDIVElements.getItem(i);
elem.addClassName("etvoila");
com.google.gwt.user.client.Element castedElem = (com.google.gwt.user.client.Element) elem;
DOM.setEventListener(castedElem, handler);
}
@vshank77
vshank77 / Java 6 digit unique code generator
Created February 4, 2011 17:47
Generate a 6 digit code in Java (case-insensitive)
private static String getUniquedId(BloomFilter<String> filter) {
String uid = getStringUid();
while(filter.contains(uid)) {
uid = getStringUid();
}
filter.add(uid);
return uid;
}
@vshank77
vshank77 / gist:822652
Created February 11, 2011 16:55
create a google pie chart
http://chart.googleapis.com/chart?cht=p3&chd=t:5,2,7,8,9,11,3&chs=400x200&chdl=failed|successful|not%20worked|rejected|on%20hold|poda|hello&chco=cc6666,669966,666699,669999,cc99cc,cccc00,cc9966
@vshank77
vshank77 / default-spring-pom
Created May 19, 2011 13:36
Default spring POM
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision$ $Author$ $Date$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>in.edmx.mxaas</groupId>
<artifactId>mxadmin</artifactId>
<version>0.0.1-SNAPSHOT</version>
@vshank77
vshank77 / MavenBinaryAssembly
Created June 7, 2011 16:58
Sample binary distribution assembly
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>binary</id>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>${project.artifactId}</baseDirectory>
<formats>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
@vshank77
vshank77 / appstart.sh
Created June 8, 2011 17:47
Simple appstart shell
#!/bin/sh
MAIN_CLASS=
# OS specific support
cygwin=false
os400=false
darwin=false
case "`uname`" in
CYGWIN*) cygwin=true;;
@vshank77
vshank77 / setjava
Created June 8, 2011 17:48
set java shell
#!/bin/sh
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
if $darwin; then
if [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
fi
else
JAVA_PATH=`which java 2>/dev/null`
if [ "x$JAVA_PATH" != "x" ]; then
@vshank77
vshank77 / jaxb maven2 plugin
Created January 24, 2012 18:14
Using Jaxb to generate Java files from Schema
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.7.5</version>
<configuration>
<schemaDirectory>src/main/resources/schema</schemaDirectory>
<generateDirectory>src/main/generated</generateDirectory>
<generatePackage>com.ubs.ontolo.zthes.schema</generatePackage>
<episode>false</episode>