Need bundle with javax.persistence on OSGi - jpa

I get this error when I try to install my bundle in Servicemix:
Error executing command: Error starting bundles:
Unable to start bundle 179: Unresolved constraint in bundle de.edigrid.edigrid-servicemix-util [179]: Unable to resolve 179.0: missing requirement [179.0] osgi.wiring.package; (osgi.wiring.package=javax.persistence)
Can anybody tell me if is there a standard jar file, OSGi compliant, that exports javax.persistence package?
Thanks.

Just install the jpa feature. If this feature is not available in your servicemix version then try:
install -s mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1

EclipseLinks has a bundle, it's included in their download: http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/releases/2.5.2/eclipselink-plugins-2.5.2.v20140319-9ad6abd.zip
Alternatively you can also get the same bundle from the Amdatu Dependencies repository: https://bitbucket.org/amdatu/amdatu-repository/src/53bb0dd92bcf005da5a6937c2034d366e9f21365/dependencies/javax.persistence/javax.persistence-2.0.3.jar?at=master#

Related

Liferay unresolve requirement: Import package

I have a module in 7.2 Liferay environment, in the modules folder. I've compiled everything by running the commands:
1 - blade gw jar inside the modules folder
2 - gradlew distBundle
3- gradle deploy
From there I get into the Tomcat directory and get the following error:
org.osgi.framework.BundleException: Could not resolve module: cuatroochenta.rest [1141] _ Unresolved requirement: Import-Package: com.liferay.asset.category.property.model; version = "[2.1.0,3.0.0)" _ [Sanitized]
I have been searching but the information it gives regarding the error is also not very clear and I have not found an explicit solution.
Any ideas ??
Thank you so much
add below lines in bnd.bnd file of your module :
Import-Package: \
!com.liferay.asset.category.*,\
!com.liferay.asset.category.property.*,\
*
Note:- need to add all those packages who show unResolved Requirement.

Upgrading to aem62 issue

Attempting to migrate from aem6.0SP3 to 6.2 throws an error while compiling our project:
missing requirement [ewcs.my-bundle [474](R 474.3)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.commons)(version>=5.7.0)(!(version>=6.0.0)))
Unresolved requirements: [[ewcs.my-bundle [474](R 474.3)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.commons)(version>=5.7.0)(!(version>=6.0.0)))]
We do not see the library referenced in our pom.xml even when we do dependency:tree, any suggestion?
Update: missing twitter4j v.3.0.5 but mvn repo does not have it
Make sure you are using the latest ACE Commons package for 6.2. You can download the relevant version from:
https://repo.adobe.com/nexus/content/repositories/releases/com/adobe/aem/uber-jar/
Note that there is a new version of Uber-Jar for 6.2 SP1 so make sure you are using the correct version.
Twitterfj is not a part of Adobe public repo but if you really want it, you can download it from here:
https://github.com/Adobe-Consulting-Services/com.adobe.acs.bundles.twitter4j/releases/tag/com.adobe.acs.bundles.twitter4j-1.0.0
More information is available at:
http://adobe-consulting-services.github.io/acs-aem-commons/features/twitter.html

Karaf unresolved constraint JDBC

I am trying to get a Scala library using H2 database loading in Karaf 3.0.0-RC1 and I got this error
Unresolved constraint in bundle org.h2 [86]: Unable to resolve 86.0: missing requirement
[86.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.jdbc)(version>=1.0.0)
Does anyone know what I need to add to POM and / or feature.xml to get this working?
Thanks,
Bob
You need that jar that contains the package. To get it:
go to http://search.maven.org
Push Advanced search
To the Classname, type "org.osgi.service.jdbc"
You will get a list of dependencies that contain the package. For example, the first one will be good for you: http://search.maven.org/#artifactdetails|org.ow2.spec.osgi|ow2-jdbc-service-1.0-spec|1.0.13|bundle
Btw.: The package originally comes from the OSGi enterprise spec (or compendium, do not remember). As much as I saw all of the OSGi spec packages are available in ow2 dependencies that separated logically.
In Karaf, there might be other ways to get the dependency you need but I did not use Karaf in the past.

Missing bundles in osgi framework

I'm trying to run the region digraph bundle of Equinox in Eclipse IDE. When I run the relevant bundle using start command in OSGi command prompt, I'm getting an error saying
The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.osgi.framework.hooks.bundle; version="1.0.0". To find out the existing version in the framework, I tried the command p org.osgi.framework.hooks.bundle. The result shows all the bundles in the framework. In that list org.osgi.framework.hooks.bundle is not there. This is the same case for few other bundles such as
org.osgi.framework.hooks.resolver. Any helps about how to fix this issue??
What version of Eclipse are you using?
The org.osgi.framework.hooks.bundle package was added in OSGi Release 4.3, and so you would need a version of Eclipse that supports that, which would be at least Eclipse 3.7 (Indigo).

Start an osgi bundle failed with Require-Bundle: org.eclipse.core.runtime; bundle-version="0.0.0"

I'm trying to install and load an external bundle to a simple equinox application.
The targeted bundle is coming from a set of plugins for eclipse available here:
http://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/2.4/ (rodin-2.4-dev.zip).
When I start equinox:
$ java -jar org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar -console
I can install it
osgi> install file:///path_to/rodin-2.4-dev/org.eventb.core_2.4.0.r14093.jar
Bundle id is 1
But I have an exception when I start it:
osgi> start 1
org.osgi.framework.BundleException: The bundle "org.eventb.core_2.4.0.r14093 [1]"
could not be resolved. Reason: Missing Constraint: Require-Bundle:
org.eclipse.core.runtime; bundle-version="0.0.0"
Does anyone know how to fix this error ?
Maybe it is related to the fact that the bundle does not include a org.eclipse.core.runtime version, as MANIFEST.MF has the following Require-Bundle:
Require-Bundle: org.eclipse.core.runtime,org.rodinp.core;visibility:=r
eexport,org.eventb.core.ast;visibility:=reexport,org.eventb.core.seqp
rover;visibility:=reexport
The bundle has a requirement to the runtime core as you have noticed. The install just installs the bundle, it does not mean it is valid. You can check the state of the bundle through diag command, i.e, osgi> diag 1
It needs to be in state resolved to be runnable. I'd bet it is just in state installed for you. Check Dude, where's my bundle for more info on bundles and their states.