[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Resource not found inside bundle

Yup, sorry, I fudged on the image.


On Mon, Jul 28, 2014 at 1:14 PM, BJ Hargrave <hargrave@xxxxxxxxxx> wrote:
That file does appear to be in the classpath. The picture shows it in WEB-INF/classes which is in the Bundle-ClassPath. What does the code look like that is trying to access the file?
--

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the
OSGi Alliance
hargrave@xxxxxxxxxx





From: Â Â Â ÂRaymond Auge <raymond.auge@xxxxxxxxxxx>
To: Â Â Â ÂEquinox development mailing list <equinox-dev@xxxxxxxxxxx>
Date: Â Â Â Â2014/07/28 16:02
Subject: Â Â Â ÂRe: [equinox-dev] Resource not found inside bundle
Sent by: Â Â Â Âequinox-dev-bounces@xxxxxxxxxxx





That file is not in the classpath of the bundle and so you can't use the "resource" API.

However, you can use the "entry" API (which talks about the bundle rather than about the bundle's classpath).

e.g.


URL url = "">
IF you have a class however, and you need to get to the bundle of the class, you can do

Bundle bundle = FrameworkUtil.getbundle(this.getClass());

URL url = "">
HTH



On Mon, Jul 28, 2014 at 12:57 PM, David Cao <govelogo@xxxxxxxxx> wrote:
Hello there,

I have a bundle jar file basically converted from a .war file, with "Bundle-ClassPath" set as follow,

Bundle-Localization: plugin
Bundle-ClassPath: WEB-INF/classes,
ÂWEB-INF/lib/activation-1.1.jar,
ÂWEB-INF/lib/antlr-2.7.5.jar,
...
Import-Package: javax.servlet,
Âjavax.servlet.http,
Âorg.osgi.framework;version="1.3.0",
Âorg.osgi.service.http;version="1.2.0",
Âorg.osgi.util.tracker;version="1.3.1"


There is an internal class which depends on a "api_mapping.xml" file which is located under "WEB-INF/classes" (shown below). However, the class complains unable to find the .xml file.Â

I wonder if I missed some manifest descriptors for resources? does anyone have an idea why this is happening? Thanks a lot!!



â




_______________________________________________
equinox-dev mailing list

equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/equinox-dev



--
Raymond AugÃÂ(@rotty3000)
Senior Software Architect
Liferay, Inc.Â(@Liferay)
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev



--
Raymond AugÃÂ(@rotty3000)
Senior Software Architect
Liferay, Inc.Â(@Liferay)