equinox

Equinox java.lang.NoClassDefFoundError

不想你离开。 提交于 2019-12-08 19:59:17
I am running a very simple osgi bundle whose activator looks like this public void start(BundleContext bundleContext) throws Exception { JAXBContext con = JAXBContext.newInstance(Activator.class); } This always throws exception org.osgi.framework.BundleException: Exception in com.test.bundle.Activator.start() of bundle com.test.bundle. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683) at org.eclipse.osgi.framework.internal.core.BundleHost

Eclipse RAP 2.0 application won't start with WebSphere 8.5.5.0

℡╲_俬逩灬. 提交于 2019-12-08 08:56:49
问题 I have an Eclipse RAP application. The web.xml is the following: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" id="WebApp"> <session-config> <cookie-config> <http-only>true</http-only> </cookie-config> <tracking-mode>COOKIE</tracking-mode> </session-config> <servlet id="bridge">

Equinox java.lang.NoClassDefFoundError

故事扮演 提交于 2019-12-08 06:29:43
问题 I am running a very simple osgi bundle whose activator looks like this public void start(BundleContext bundleContext) throws Exception { JAXBContext con = JAXBContext.newInstance(Activator.class); } This always throws exception org.osgi.framework.BundleException: Exception in com.test.bundle.Activator.start() of bundle com.test.bundle. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734) at org.eclipse.osgi.framework.internal.core

Configure Equinox to modify the management of the “local bundle cache”

只谈情不闲聊 提交于 2019-12-07 12:20:34
问题 Relating to a previous question, how let OSGi to reuse your configuration via Config Admin, I am still trying to solve this problem in the Equinox Framework. Pavol Juhos wrote: Equinox Config Admin (org.eclipse.equinox.cm) stores the configuration data in the persistent storage area provided by the Framework. And that happens to be the "local bundle cache" directory by default for Equinox. So i read up on this topic and found that there are several runtime options for Equinox (among other

nullPointerException when trying to programmatically install a bundle in Equinox

旧城冷巷雨未停 提交于 2019-12-07 09:44:30
问题 I'm trying to do a simple demo where I start the Equinox Framework and then load a tutorial bundle that was created (via the tutorial). I keep getting NullPointerExceptions here is the stack trace... Exception in thread "main" java.lang.NullPointerException at org.eclipse.osgi.internal.baseadaptor.BaseStorageHook.mapLocationToURLConnection(BaseStorageHook.java:372) at org.eclipse.osgi.baseadaptor.BaseAdaptor.mapLocationToURLConnection(BaseAdaptor.java:185) at org.eclipse.osgi.framework

How I can get list of all classes from given bundle

老子叫甜甜 提交于 2019-12-06 11:54:16
问题 I have an Eclipse bundle and want to get a list of all classes from this bundle. How can I do it? 回答1: The name of the classes from the bundle will be in classNameOfCurrentBundle list in the end: BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); // Getting all the class files (also from imported packages) Collection<String> resources = bundleWiring.listResources("/", "*.class", BundleWiring.LISTRESOURCES_RECURSE); List<String> classNamesOfCurrentBundle = new ArrayList<String>();

EclipseLink : No Persistence provider for EntityManager named

房东的猫 提交于 2019-12-05 07:30:53
I'd like to create one Bundle that is able to use Java Persistence. To achieve this, I've created a plugin project within Eclipse. In my project, I've created a persistence.xml file into META-INF. I've aslo added in my MANIFEST.mf (into the depencies) those 3 packages : javax.persistence.jar org.eclipse.persistence.jar org.eclipse.persistence.jar Then, in my Activator I use this lines to create an EntityManager : factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME); EntityManager em = factory.createEntityManager(); To execute my bundle, I've made a product configuration.

Eclipse p2 : Difference between category.xml and site.xml

孤者浪人 提交于 2019-12-05 02:19:26
p2 repository creation ant tasks like eclipse.publish.featuresAndBundles seem to take a site.xml or category.xml file which specifies the category information. I see that the contents of site.xml and category.xml that eclipse generates are exactly the same right down to the tags. So what is the difference between the two? Edit - To be clear : What additions/subtractions are present in category.xml that differentiate it from a site.xml apart from the filenames? The main difference between the to that the site.xml provides information where the update site and other repo information can be

How I can get list of all classes from given bundle

匆匆过客 提交于 2019-12-04 16:48:36
I have an Eclipse bundle and want to get a list of all classes from this bundle. How can I do it? The name of the classes from the bundle will be in classNameOfCurrentBundle list in the end: BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); // Getting all the class files (also from imported packages) Collection<String> resources = bundleWiring.listResources("/", "*.class", BundleWiring.LISTRESOURCES_RECURSE); List<String> classNamesOfCurrentBundle = new ArrayList<String>(); for (String resource : resources) { URL localResource = bundle.getEntry(resource); // Bundle.getEntry()

Scala in OSGI container?

纵饮孤独 提交于 2019-12-04 07:31:43
问题 How can I code my bundle in Scala and then deploy it into OSGI container? Do I compile it into "java" first or can i deploy scala straight into OSGI and use some kind of bundles to recognize it? Any pointers would be great. Currently I am using Apache Felix as my osgi-container, but just a simple explanation of generic concepts would suffice to get me started. 回答1: Thanks to everyone for the answers, you led me to the solution! I will describe it here in a little simpler terms for a wider