workaround for tightened requirement to include a stackmap for class files version 51.0+:
adjust class file version to 50.0 when adding/replacing a method.
diff --git a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/BaseCallRedirection.java b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/BaseCallRedirection.java
index 4246064..543364d 100644
--- a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/BaseCallRedirection.java
+++ b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/BaseCallRedirection.java
@@ -22,6 +22,7 @@
 
 import java.util.*;
 
+import org.eclipse.objectteams.otre.jplis.JPLISEnhancer;
 import org.eclipse.objectteams.otre.util.*;
 
 /**
@@ -93,6 +94,7 @@
             
     		if (candidateForImplicitActivation(m, cg, cpg)) { // TODO: check the other preconditions, like not abstact etc. 
     			cg.replaceMethod(m, genImplicitActivation(m, class_name, cpg, true));
+    	    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
     		}
     		
     		if (!isCallin(m, cg))
diff --git a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/LiftingParticipantTransformation.java b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/LiftingParticipantTransformation.java
index e43204c..e968d64 100644
--- a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/LiftingParticipantTransformation.java
+++ b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/LiftingParticipantTransformation.java
@@ -41,6 +41,7 @@
 import org.apache.bcel.generic.ObjectType;
 import org.apache.bcel.generic.POP;
 import org.apache.bcel.generic.Type;
+import org.eclipse.objectteams.otre.jplis.JPLISEnhancer;
 
 /**
  * If the property ot.lifting.participant is set transform all lift methods and insert 
@@ -98,6 +99,7 @@
     			continue;
     		
 			cg.replaceMethod(m, m = weaveLiftingParticipant(m, class_name, cpg));
+	    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
     	}
 	}
 
diff --git a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ObjectTeamsTransformation.java b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ObjectTeamsTransformation.java
index 2ca26c5..ecf91cd 100644
--- a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ObjectTeamsTransformation.java
+++ b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ObjectTeamsTransformation.java
@@ -29,6 +29,7 @@
 import java.util.LinkedList;
 import java.util.List;
 
+import org.eclipse.objectteams.otre.jplis.JPLISEnhancer;
 import org.eclipse.objectteams.otre.util.AnnotationHelper;
 import org.eclipse.objectteams.otre.util.AttributeReadingGuard;
 import org.eclipse.objectteams.otre.util.CallinBindingManager;
@@ -742,6 +743,7 @@
     	mainMethod.setMaxLocals();
     	
     	cg.replaceMethod(main, mainMethod.getMethod());
+    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
     }
 
 	/**
@@ -1485,6 +1487,7 @@
 		copyAndAdjustLineNumbers(mg, newConstructor, addedCodeLength, startOfAddedCode);
 		
 		cg.replaceMethod(m, newConstructor.getMethod());
+    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
 	}
 
 	/** 
diff --git a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/TeamInterfaceImplementation.java b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/TeamInterfaceImplementation.java
index 9bbb89f..ae515cd 100644
--- a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/TeamInterfaceImplementation.java
+++ b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/TeamInterfaceImplementation.java
@@ -22,6 +22,7 @@
 
 import java.util.*;
 
+import org.eclipse.objectteams.otre.jplis.JPLISEnhancer;
 import org.eclipse.objectteams.otre.util.*;
 
 /**
@@ -120,6 +121,7 @@
 
 		Method newClinit = mg.getMethod();
 		cg.replaceMethod(clinitMethod, newClinit);
+    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
 
 		il.dispose(); // Reuse instruction handles
 	}
@@ -270,6 +272,7 @@
 
 		Method newMethod = mg.getMethod();
 		cg.replaceMethod(method, newMethod);
+    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
 		il.dispose(); // Reuse instruction handles	
 	}
 
@@ -464,7 +467,8 @@
 			Method m = methods[i];
 			if (candidateForImplicitActivation(m, cg, cpg)) {
                 if(logging) printLogMessage("Adding implicit activation to " + m.getName());
-				cg.replaceMethod(m, genImplicitActivation(m, cg.getClassName(), cpg, false)); 
+				cg.replaceMethod(m, genImplicitActivation(m, cg.getClassName(), cpg, false));
+		    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
 			}
 		}
 	}
diff --git a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ThreadActivation.java b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ThreadActivation.java
index 9839297..4c59ba2 100644
--- a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ThreadActivation.java
+++ b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/ThreadActivation.java
@@ -21,6 +21,7 @@
 import org.apache.bcel.classfile.*;
 import org.apache.bcel.generic.*;
 import org.apache.bcel.*;
+import org.eclipse.objectteams.otre.jplis.JPLISEnhancer;
 
 import static org.eclipse.objectteams.otre.ObjectTeamsTransformation.newMethodGen;
 
@@ -144,6 +145,7 @@
         mg.setMaxLocals();
         Method generatedMethod = mg.getMethod();
         cg.replaceMethod(runMethode, generatedMethod);
+    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
         threadActivation.dispose();
         il.dispose();
 	}
@@ -176,6 +178,7 @@
 		mg.setMaxStack();
 	    mg.setMaxLocals();
 	    cg.replaceMethod(initMethod, mg.getMethod());
+    	JPLISEnhancer.requireClassFileVersionLessThan51(cg);
 	    il.dispose();
 	}
 }
diff --git a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/jplis/JPLISEnhancer.java b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/jplis/JPLISEnhancer.java
index 3e697be..e752986 100644
--- a/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/jplis/JPLISEnhancer.java
+++ b/plugins/org.eclipse.objectteams.runtime/src/org/eclipse/objectteams/otre/jplis/JPLISEnhancer.java
@@ -67,6 +67,7 @@
 							   + " to class " + cg.getClassName())
 						.printStackTrace();
 		cg.addMethod(m);
+		requireClassFileVersionLessThan51(cg);
 	}
 
 	public void addOrReplaceMethod(Method method, ClassGen cg) {
@@ -75,6 +76,15 @@
 			addMethod(method, cg);
 		else
 			cg.replaceMethod(existingMethod, method);
+		requireClassFileVersionLessThan51(cg);
+	}
+
+	public static void requireClassFileVersionLessThan51(ClassGen cg) {
+		// added methods would be invalid without a stackmap attribute,
+		// work around this by setting the class file to 50.0 (Java6),
+		// where the old verifier is still supported as a fallback.
+		if (cg.getMajor() >= 51)
+			cg.setMajor(50);
 	}
 	
 	/* (non-Javadoc)