- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在代码中查找connectionFactory,该代码作为servicemix(karaf)中osgi bundle 的一部分部署
final Hashtable<String, Object> jndiContext = new Hashtable<String, Object>();
jndiContext.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
jndiContext.put(Context.SECURITY_AUTHENTICATION, "none");
jndiContext.put(Context.PROVIDER_URL, pJndiLDAPserver);
ctx = new InitialContext(jndiContext);
ConnectionFactory lResult = (ConnectionFactory) ctx.lookup(pJndiCFname);
我面临的问题是 -
我的 pom.xml 中有以下依赖项 -
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>com.ibm.mq.osgi</groupId>
<artifactId>java</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.msg.client.osgi.jms</groupId>
<artifactId>prereq</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.msg.client.osgi</groupId>
<artifactId>jms</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.msg.client.osgi.commonservices</groupId>
<artifactId>j2se</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.mq.osgi</groupId>
<artifactId>allclient</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.mq.osgi</groupId>
<artifactId>allclientprereqs</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.msg.client.osgi</groupId>
<artifactId>nls</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.msg.client.osgi.wmq</groupId>
<artifactId>nls</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.msg.client.osgi.wmq</groupId>
<artifactId>prereq</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.msg.client.osgi</groupId>
<artifactId>wmq</artifactId>
<version>9.0.0.0</version>
</dependency>
<dependency>
<groupId>com.csg.npms.pilatus</groupId>
<artifactId>pilatus-common</artifactId>
<version>0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
<version>1.8.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0-m09</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.1.4</version>
<scope>provided</scope>
</dependency>
并且相同的 com.ibm 依赖项已作为 karaf bundle 的一部分安装。
因此,关于第 2 点,如何绕过 Karaf (org.apache.aries.jndi.DelegateContext) 中的默认 jndi aries 查找,以便它为我提供 LdapContextFactory 对象而不是 DelegateContext。我是否缺少任何 jars 作为 karaf 中 mq 的一部分。
最佳答案
这是错误的关键部分:
Unresolved requirements: [[org.apache.qpid.jms.client [464](R 464.8)] osgi.wiring.package; (&(osgi.wiring.package=javax.jms (version>=1.1.0)(!(version>=2.0.0)))
这表示名为 org.apache.qpid.jms.client
的包无法解析,因为它导入了包 javax.jms
但没有其他包可以解析导出包javax.jms
。在 OSGi 中,每个导入都必须与该包的导出相匹配。此外,还有一个版本限制:您需要版本 [1.1.0, 2.0.0)
,即至少 1.1.0 但小于 2.0.0。
我建议使用 Maven Central 中的以下 bundle :https://search.maven.org/#artifactdetails%7Corg.jboss.spec.javax.jms%7Cjboss-jms-api_1.1_spec%7C1.0.1.Final%7Cjar .
关于java - 如何绕过 karaf 中的默认 aries jndi 查找,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49004933/
我想知道是否有任何方法可以逃避 __metatable 元方法。我知道没有,但我正在尝试做这样的事情,但显然 __metatable 阻止了这种情况的发生: -- pretend that t
我想知道如果满足某些条件,是否可以跳过 do while 循环,甚至中途退出方法?这是我的意思的一个例子(一切正常) public void loanBook() { Sc
曾几何时,一位前端开发人员有一些菜单,当有人在页面上的任何位置单击菜单之外时,他想要关闭一些菜单,因此他使用了一些 if 和提到的方法来处理他的工作。当然,后来这又让他痛不欲生,因为在上述菜单中进行的
我开发了一个内核模块,它完成了繁重的工作,当然需要时间。问题是模块使用 CPU 超过 20 秒,并且结果引发了softlockup_threshold的BUG。 我的问题是,有什么办法可以绕过这个吗?
我相信我对避免代码重复这个长期存在的问题提出了一个略有不同的看法。设置相当标准——一堆 if 语句执行类似的操作。下面是一个简短示例。 我正在尝试从代码效率、紧凑性和程序员易用性方面找出解决此类情况的
我的服务器上有 10 秒,这对我想要做的事情来说还不够。它也被网络托管商禁用了。 如果在执行了一定时间后,我执行了一个单独的 PHP 页面,这算在同一时间还是在该页面上重新开始? 还有别的办法吗? 最
我已经下载并编译了 Microsoft 迂回库。在我的项目中,我包含了头文件并添加了 .lib 文件作为依赖项。一切都编译无误。现在我一直在尝试绕过 DrawText,但由于某种原因根本没有调用绕过的
我正在使用 Mockito 编写一个 JUnit 测试用例,我试图绕过我的测试方法中的静态方法调用。运行测试用例时出现 NullPointerException。 是否有任何方法可以在不使用 Powe
我不知道为什么,这很奇怪,但是我的代码在循环。实际上,在第一张表 (ws1) 中,我正在 Worksheet_Change 上执行此操作事件 : Application.EnableEvents =
我正在尝试在 Ubuntu Docker 容器上安装 icinga2-ido-pgsql。 我的数据库在一个单独的容器中。 要安装它,我运行 RUN apt-get install -q -y ici
我在 Dynamics AX 2012 中有一个 AOT 查询,它由 HcmWorker 和 HcmEmployment 表(等等)组成。我的问题是,当我创建报告(不是 SSRS)或以其他方式使用此查
我需要通过cdn将SDK集成到我的next.js项目中所以我需要把 ' />进入我的代码。然后运行 window.sdk = new PrivateSDK()和 window.sdk.someFu
有没有办法可以绕过 Java 中的错误消息? 如果我得到一个错误,但没有可行的方法来改变我的程序怎么办?如果我怀疑我可能会从代码块中得到错误,但我不知道它何时或是否会发生,该怎么办?有很多次我不得不让
我有以下 HTML Facebook 我有一个 onclick 事件处理程序,当单击上面的链接时,会调用 window.open。这在 Chrome 中有效,但在 Safari 中无效。如何让它在 S
我们正在编写一个 ASP.NET MVC 应用程序。默认情况下,如果客户端浏览器具有 Javascript,页面上每个表单的处理程序都会由 Javascript 设置为将提交内容发送到 Ajax“管道
我正在使用 Cloudflare 来加速我的网站,它非常适合。不幸的是,我的一些用户需要将大于 Cloudflare 允许的最大值(即 300MB 大小)的视频上传到我的网站。有什么方法可以告诉 Cl
我正在尝试编写一个自定义中间件,通过检查请求中是否存在 :user key 来检查用户是否经过身份验证。 (defn wrap-authenticated [handler] (fn [{user
你好,祝你有美好的一天。 这里需要一些帮助: 情况: 我有一个不起眼的 DirectX 9 应用程序(名称和应用程序详细信息与问题无关),自某些驱动程序版本以来,它会导致所有 nvidia 卡(GeF
我喜欢制作高效的应用程序,并且经常寻求并发和多线程来提高应用程序响应能力等,但最近我的尝试似乎总是被 WPF 的单线程性所阻碍。无论我的代码多么高效和并行,WPF 似乎都会不断地拖延我的 UI,并使我
我正在使用 Cloudflare 来加速我的网站,它非常适合。不幸的是,我的一些用户需要将大于 Cloudflare 允许的最大值(即 300MB 大小)的视频上传到我的网站。有什么方法可以告诉 Cl
我是一名优秀的程序员,十分优秀!