如何将命令XX:-UseSplitVerifier添加到CRXDE Lite(CQ5.5)内置的OSGi软件包中? [英] How do I add the command XX:-UseSplitVerifier to an OSGi bundle built in CRXDE Lite (CQ5.5)?

查看:129
本文介绍了如何将命令XX:-UseSplitVerifier添加到CRXDE Lite(CQ5.5)内置的OSGi软件包中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在CQ5.5中创建自定义WCMCommand.我有JDK1.7,正在收到可怕的VerifyError.

I am trying to create a custom WCMCommand in CQ5.5. I have JDK1.7 and am getting the dreaded VerifyError.

错误 [OsgiInstallerImpl] pack.age.name [pack.age.name]实例化实现对象期间发生错误(java.lang.VerifyError:在方法中的分支目标13处期望有一个堆栈映射框架pack.age.name.unbindRepo(Lorg/apache/sling/jcr/api/SlingRepository;)V在偏移量5处)java.lang.VerifyError:在方法pack.age.name.unbindRepo( Lorg/apache/sling/jcr/api/SlingRepository;)V在偏移量5

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

据我所知,unbindRepo方法超出了我的控制范围,因此我无能为力.我看到的两个修复程序是降级到JDK1.6(我想避免)并在启动参数中添加"XX:-UseSplitVerifier".我已经看到各种资料说可以将其添加到JVM启动命令中.这些资源中只有很少一部分真正涉及到任何细节,而没有一个涉及到足够的细节或直接在CQ环境中进行引用.

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.

那么,如何将其作为启动参数直接添加到CQ之外的JVM,或者如何将其添加到CQ中的构建捆绑程序中?我希望是否可以通过触发此标志来构建捆绑软件,使捆绑软件能够正确构建.

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.

据我所知,大多数JVM命令都是从命令行使用的,并且在CQ中构建捆绑包时似乎没有等效的过程.

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.

我是否需要使用eclipse来添加命令行args,或者可以使用CRXDE/Lite来做到这一点?

Do I NEED to use eclipse in order to add command line args or is it possible to do it from with CRXDE /Lite?

一些澄清:当我去建造捆绑包时,它的建造就完美了.控制台中没有错误,它在捆绑软件列表中显示为活动,组件也显示为活动.我不完全知道何时在构建捆绑包"生命周期中发生错误,但是根据CQ的说法,这是完全可以的,但由于某些原因它无法使用.

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.

我从技术上解决了这个问题.如您所见,函数'unbindRepo'引发了错误.因此,尽管不知道该怎么做,但我还是添加了

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();
}

,它不再引发错误,并且现在一切都可以继续进行.我不建议将其作为解决方案,但它至少让我现在继续前进,这确实是我想要的.由于我的问题的措词是Tomek确实回答了我的实际问题,因此仍然可以接受他的回答.

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.

推荐答案

UseSplitVerifier是JVM参数,因此必须添加到CQ启动命令行中.它比OSGi捆绑包,CRX DE等位于较低的级别.您可以在CQ启动脚本中对其进行设置.

UseSplitVerifier is a JVM parameter and as such have to be added to the CQ startup command line. It is on the lower level than OSGi bundles, CRX DE, etc. You can set it in the CQ startup script.

在Linux机器上,文件为crx-quickstart/bin/start,而在Windows上,文件为start.bat在同一目录中.查找定义CQ_JVM_OPTS变量的行,并在末尾添加以下参数:

On Linux machines the file is crx-quickstart/bin/start and on Windows it's start.bat in the same directory. Look for the line defining CQ_JVM_OPTS variable and add following parameter at the end:

-XX:-UseSplitVerifier

这篇关于如何将命令XX:-UseSplitVerifier添加到CRXDE Lite(CQ5.5)内置的OSGi软件包中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆