I'm working on an OSGI application with Felix. Now I want to use some JavaFx8 classes in a bundle but I have the following error :
Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (osgi.wiring.package=javafx.geometry
How can I import JavaFx8 SDK packages in my bundle.
Thanks in advance,
You can add the library to the felix classpath and append the necesary package(s) to the org.osgi.framework.system.packages.extra option.
http://felix.apache.org/site/apache-felix-framework-configuration-properties.html
If you do so, the bundle no. 0 will export the required packages. I can provide more detailed instructions later my pc, right now i am on mobile.
I'm working on an OSGI application with Felix. Now I want to use some
JavaFx8 classes in a bundle
I need to create a complete GUI and I'll need an important number of
imports.
I've released some Early Access versions of Drombler FX, a new Rich Client Platform for JavaFX based on OSGi (Apache Felix) and Maven.
As an application framework it makes sure JavaFX and OSGi will get started properly and it provides the main window.
You can read more about Drombler FX here: http://puces-blog.blogspot.ch/search/label/Drombler
There's a Getting Started page which explains how to create, build and run a Drombler FX sample application with a few simple steps.
After several researches, I finally fixed the problem by adding the packages I need in the pom.xml of the project :
<configuration><provision>
<param>--platform=felix</param>
<param>--noConsole</param>
<param>--systemPackages=javafx.animation,javafx.application,javafx.collections,javafx.embed.swing,javafx.geometry,javafx.scene,javafx.scene.layout,javafx.scene.transform,javax.swing,javax.swing.border,org.osgi.framework</param>
</provision></configuration>
or by adding the following properties to the same file ( pom of the project ):
<properties>
<org.osgi.framework.system.packages.extra>javafx.animation,javafx.application,javafx.collections,javafx.embed.swing,javafx.geometry,javafx.scene,javafx.scene.layout,javafx.scene.transform,javax.swing,javax.swing.border,org.osgi.framework
</org.osgi.framework.system.packages.extra>
<org.osgi.service.http.port>8080</org.osgi.service.http.port>
<org.osgi.service.http.port.secure>8443</org.osgi.service.http.port.secure>
For More information check the link.
Related
I have a bunch of java classes and a bundle activator class that I need to deploy to karaf.
I see that the karat-maven-plugin has kar packaging and karaf-assembly.
Also it generates features.xml
I can generate features.xml directly and it generates lines with wrap: for some of my dependent non-osgi jars.
But when I run karat-assembly, I run into the issue of the assembly goal not realizing that these jars are not osgi and end up with errors.
What it the recommended way to get a custom karaf with my application installed ?
Does the karat-assembly packaging need to have a features.xml generated and provided beforehand ? Or is it supposed to do the feature set generation by itself ? If it is the latter, then how do I get around the problem of the karat-assembly not recognizing non-osgi jars ?
I have spent a LOT of time with google and am stumped.
This is my procedure for creating a custom karaf distribution. It may not be "best practice" but it works for me. Maybe you can customize for your needs.
After developing my Camel routes and testing I generate my feature file based on a feature template found in /src/main/feature/feature.xml. The karaf-maven-plugin will generate the feature will in the feature folder inside /target.
I do a clean deploy to our maven artifactory.
I have a custom Karaf project do a clean install on that project. The project has dependencies to the initial project and I add all the features as boot level feature.
Once build I unzip the distribution and run the Karaf app. If everything looks ok its ready to be shipped.
I'm trying to build an application that uses an embedded OrientDB (currently "memory:") graph database.
I'm using OrientDB 2.2
I am using Eclipse bndtools for my development environment.
I have added orientdb-core and orientdb-graphdb osgi bundles as build dependencies to my bundle, but on its own that isn't enough, I need access to the tinkerpop blueprint classes as well. There doesn't seem to be a tinkerpop blueprints osgi bundle that I can see.
I can include the blueprints-core jar as a build dependency, and that gets rid of the compile errors, but I then get into all sorts of issues trying to resolve the bundles so I can run something. (the primary error there that I don't seem to be able to get rid of is a complain about not being able to resolve "com.carrotsearch.hppc" -- I include that in my bundle, and export it, but still no joy there)
Shouldn't orientdb-graphdb either depend on a suitable bundle, or include and export the classes?
It sounds like you're running into the classic problem of wrapping a third-party, non-OSGi library as an OSGi bundle.
The best tutorial for this is on the EnRoute site. Note that you don't need to be using EnRoute for this tutorial to be relevant.
I am new to JBPM.
I downloaded and started using eclipse. I then installed the JBPM plugin and modeler 2.0 plugin.
When I create a new JBPM project, it asks for JBPM runtime.
I searched a lot on the internet but the runtime is not available as independent package. Please provide me with some direct independent link.
Thanks!
The jBPM Runtime is located inside the jBPM library.
To add it to Eclipse, in the window to add a jBPM Runtime, just travel to the place where you've putted the library and select it (the library folder). Eclipse will automatically identify the jBPM Runtime.
To download the jBPM Library, go here:
https://www.jbpm.org/download/download.html
and download the jBPM 6.5.0.Final-bin.zip file.
Even if I never used the eclipse plugin myself, I think that what you are looking for is the kie-workbench (aka Drools Workbench): http://www.drools.org/download/download.html
You can get more information in jbpm's and drools' documentation:
http://docs.jboss.org/jbpm/v6.2/userguide/jBPMOverview.html#d0e292
http://docs.jboss.org/drools/release/6.3.0.Beta1/drools-docs/html/pt05.html
Hope it helps,
It is a "runtime" folder in the jbpm installer.
First, download a jbpm installer zip...
http://jbpm.org/download/download.html
Unzip the installer, then you can find the "runtime" directory.
Cut and paste the path to be the jbpm runtime in your eclipse.
Hi RCP developers,
I'm facing a problem with my product.
When I launch it, i got this :
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: org/springframework/web/client/RestClientException
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/client/RestClientException
I'm using a REST templates from SPRINGFRAMEWORK to catch the results from a REST API, and i try to display that in a Treeview using JFACE.
All springframewok jar's are correctly added to the project.
Could anyone help please?
Thanks in advance !
Ismail
I think you're missing a core concept in Eclipse RCP, and that is OSGi. OSGi is a module system that requires each module (i.e., JAR) to import the dependencies it uses by package. Such entries are found in the JAR's MANIFEST.MF. While they can be manually edited to import these dependencies, usually a tool (such as bnd) makes this much easier to manage.
Eclipse PDE does much of this work for you (and so does adding the Spring project nature), but you need to add any dependencies as plugins (which are also OSGi modules) so that they're visible to the RCP product runner built within Eclipse. Simply adding them to your build classpath will not translate to them being included on a runtime classpath.
When you attempt to run your product / application within Eclipse, make sure you click on the "Validate plug-ins" button to ensure that they are all visible runtime to the target RCP app you're running.
I am working in Adobe CQ5. I made my project that contains only implementation, and the project title is Web Crawler.
And that project is started by one class that simply adds initial seeds.
I made OSGI bundle of my project and I deploy that also.
Now my question is how can I start my bundle, i.e, how can I add seeds ?
For that I read this link that tells me to make Activator class and put your function in the start method. I done the same. But that does not helps me to run the bundle.
Please help me how can I run the given bundle.
Edit No. 1
Can you tell me how can I make MANIFEST.MF file given in given tutorial ?
Look at the bndtools tutorial which is the easiest way to get you started with OSGi
bndtools is a user friendly tool based on Eclipse. With bndtools, you won't get lost in plugin hell. bndtools will also help you avoid BundleActivators since they were not such a good idea, Declarative Services is what OSGi should have been from day one. It also allows you to test the bundles without having to restart.
to create the manifest, if you are using maven (you should) you can use the maven bundle plugin. It will automatically generate a manifest file for you.
Then, to deploy and start your bundle you can use the maven-sling-plugin, which can deploy your bundles into sling.
If you want to manually activate your bundle, CQ5 provides a web based osgi console. you can activate it there. If it fails, there is probably an error in the start method of the activator class.