osgi

Amdatu: How to make ExceptionMapper (@Provider) to work?

♀尐吖头ヾ 提交于 2019-12-11 06:24:45
问题 I'm trying to manage all my exceptions with an ExceptionMapper, as i saw in multiple documentation and examples. However, it doesn't seem to work, at least in my conditions. I'm in a OSGI environment, using the Felix Witheboard pattern, with Amdatu Wink, so i don't have a web.xml and everything is supposed to be managed by itself. I tried to register my ExceptionMapper as a service as i did with my web services, with no results. @Component(immediate=true, provide={Object.class}) @Provider

OpenSAML3 resource not found 'default-config.xml' in OSGi container

心不动则不痛 提交于 2019-12-11 06:18:57
问题 I'm trying to upgrade to OpenSAML 3 in an OSGi bundle running on Apache Karaf (4.0.5) using opensaml servicemix bundle ( org.apache.servicemix.bundles:org.apache.servicemix.bundles.opensaml:jar:3.2.0_1 ). A test that parses the SAML is working so I think I'm on the right track. However, if I install the bundle on Karaf I get a "resource not found" error when it's trying to load default-config.xml . 2016-06-21 16:29:10,477 | INFO | ool-120-thread-1 | InitializationService | 388 - org.apache

How can we create a build.gradle equivalent file for pom.xml to build and deploy AEM code?

。_饼干妹妹 提交于 2019-12-11 06:17:08
问题 I'm trying to create a build.gradle file like the complete pom.xml for AEM Maven Archetype or Lazybones Template to build and deploy the code to AEM. I tried to use TWCCable's CQ Plugin but wasn't sure how to use it. Also tried to run gradle init on the main pom.xml but obviously it was incomplete (below) and i think i'll have to add all dependencies manually. allprojects { apply plugin: 'maven' group = 'com.project2' version = '1.0-SNAPSHOT' } subprojects { apply plugin: 'java'

Package uses conflict: Import-Package: de.foo.bar; version=“0.0.0”

ⅰ亾dé卋堺 提交于 2019-12-11 06:05:32
问题 I try to install a bundle in an OSGi environment (FUSE ESB) but do not manage to get it resolved. The error message is: The bundle could not be resolved. Reason: Package uses conflict: Import-Package: de.foo.bar; version="0.0.0" My bundle imports the package de.foo.bar . The bundle which exports the package de.foo.bar does this with a 'uses' directive. Export-Package = de.foo.bar;uses:="{other packages}";version="2.4.0" As I understood I have to ensure that my bundle must import all other

PostgreSQL connector on OSGi

☆樱花仙子☆ 提交于 2019-12-11 06:03:23
问题 I'm working on an OSGi application using Karaf. This application connects to a postgresql database using Hibernate 4.3. My application works when I use the hibernate default connection pool but JBoss advices not to use it on a prod system. So I'm trying to use a c3p0 connection pool. I use the following bundles: <bundle wrap="yes">hibernate-jpa-2.1-api-1.0.0.Final</bundle> <bundle wrap="no">hibernate-core-4.3.7.Final</bundle> <bundle wrap="no">hibernate-entitymanager-4.3.7.Final</bundle>

Can singleton be implemented in OSGi environment

邮差的信 提交于 2019-12-11 05:54:22
问题 As far as I understand every bundle in osgi has its own classloader. Let's suppose we have three bundles:1,2,3. There is singleton class in bundle 1. Bundle 2 loads singleton and makes some changes in it. And as far as I understand, if bundle 3 loads singleton too its version of singleton is different. So Singleton in bundle 2 != singleton in bundle 3. Are my statements right? If they are right, so it is not singleton, is it? 回答1: It is true that each bundle has its own classloader, but the

Backporting OSGI DS component to OSGI R4

不羁的心 提交于 2019-12-11 05:48:31
问题 I have a component which was developed for Apache Karaf 4.0.5. However, it turns out it needs to be deployed on glassfish 4, which is based on an older version of Felix. I get this message when trying to deploy it: missing requirement [319.0] osgi.extender; (&(osgi.extender=osgi.component)(version>=1.3.0)(!(version>=2.0.0))) However, my pom file does not show any explicit dependency on osgi.component. I think I must have used some OSGI R5 (or R6?) specific feature, but I don't know which

Is it possible to convert a simple grails application to OSGi bundle that can run in Adobe CQ? [closed]

随声附和 提交于 2019-12-11 05:30:54
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a simple Grails 2.2.4 application that simply lists a bunch of items on a page. So I only have one controller and I'm not even using the database. Now, I want to convert this application into an OSGi sling bundle so that I can run it under Adobe CQ. when I prepare the Grails app it creates a WAR file..

How to use a third-party component in a modular way in Liferay?

妖精的绣舞 提交于 2019-12-11 05:13:05
问题 I wrote a Liferay 7 module that uses org.apache.http.client.methods.HttpPost. So I downloaded the httpclient-osgi JAR and put it in deploy/ , but when I try to start it I get: org.osgi.framework.BundleException: Could not resolve module: org.apache.httpcomponents.httpclient [1088] Unresolved requirement: Import-Package: org.apache.http; version="[4.4.0,4.5.0)" So I searched mvnrepository.com for org.apache.http . PROBLEM: No such component seems to exist. Do I have no other option than

CQ - Writing Server-side JUnit tests

我的梦境 提交于 2019-12-11 04:59:01
问题 I've been trying to write a JUnit test case for one of my Java class which creates a page with some given properties in CQ. For it, it need to get reference of SlingRepository and ResourceResolverFactory. I was using this to get an idea on how to achieve this. In the document it says that a POST to "http://$HOST:$PORT/system/sling/junit/" path is used to execute tests on server side. But in CQ I get a 404 error for this path. Is there any alternative URL in CQ for this? Or will really