I am trying to create a custom WCMCommand in CQ5.5. I have JDK1.7 and am getting the dreaded VerifyError.
ERROR [OsgiInstallerImpl] pack.age.name [pack.age.name] Error during instantiation of the implementation object (java.lang.VerifyError: Expecting a stackmap frame at branch target 13 in method pack.age.name.unbindRepo(Lorg/apache/sling/jcr/api/SlingRepository;)V at offset 5) java.lang.VerifyError: Expecting a stackmap frame at branch target 13 in method pack.age.name.unbindRepo(Lorg/apache/sling/jcr/api/SlingRepository;)V at offset 5
The method unbindRepo as far as I can tell is out of my control so there is nothing I can do on that end. The two fixes I have seen are to downgrade to JDK1.6 (which I would like to avoid) and to add "XX:-UseSplitVerifier to the startup parameter". I have seen various sources say to add it to the JVM startup commands. Only a few of these sources really go into any detail and none of them go into enough detail or reference doing it within the CQ environment directly at all.
So, how do I either add it as a startup parameter directly to the JVM outside of CQ, or how do I add it to the Build Bundle Process within CQ? I am hoping if I can build the bundle with this flag triggered that the bundle will be able to build properly.
As far as I can tell most of the JVM commands are meant to be used from the command line and that just doesn't seem to have an equivalent process when building a bundle in CQ.
Do I NEED to use eclipse in order to add command line args or is it possible to do it from with CRXDE /Lite?
Some Clarification: When I go to build the bundle, it builds perfectly fine. There are no errors in the console, it appears in the bundles list as active and the component appears as active as well. I don't exactly know when in the 'build bundle' lifecycle the error occurs but according to CQ it is perfectly fine but it just can't use it for some reason.
EDIT: I 'technically' fixed the problem. As you can see above the function 'unbindRepo' was throwing the error. So despite not knowing what it is supposed to do but I added
public void unbindRepo(SlingRepository repo)
{
// doNothing();
}
and it stopped throwing the error and everything is allowed to move on now. I do not recommend it as a solution but it let me at least move on for now which was really all I wanted. Since my question was worded in a way that Tomek did answer my actual question it is still appropriate that his is the accepted answer.