Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Adding 3rd party jar to Bundle.

I spoke too soon. I just noticed that you are using the XMLParserActivator. This class uses Class.forName to try and find the parser implementation. Since that class is in the org.eclipse.osgi.util package there is no way it is going to find the class from your bundle. The org.eclipse.osgi.util bundle could use DynamicImport-Package: * but that is a very bad practice. I opened a bug against the OSGi Alliance to fix this. I think the XMLParserActivator should be using Bundle.loadClass not Class.forName.

I would recommend you not to use XMLParserActivator until this is fixed. You can easily register the parser services yourself.

Tom



Inactive hide details for Thomas Watson---02/25/2008 08:12:27 AM---A couple of things to check:Thomas Watson---02/25/2008 08:12:27 AM---A couple of things to check:


From:

Thomas Watson/Austin/IBM@IBMUS

To:

Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

Date:

02/25/2008 08:12 AM

Subject:

Re: [equinox-dev] Adding 3rd party jar to Bundle.




A couple of things to check:

1) Does your bundle work when run from your workspace?
2) When you build the bundle can you confirm the lib/TestParser.jar is actually included in your bundle content?
3) Does your bundle manifest file end in an empty line after the Bundle-ClassPath header?

If yes to the above questions then I recommend you create a testcase and open a bug for us to investigate. Thanks.

Tom



Inactive hide details for "Srijith Kochunni" ---02/25/2008 06:08:53 AM---Hi All,"Srijith Kochunni" ---02/25/2008 06:08:53 AM---Hi All,

From:

"Srijith Kochunni" <ksrijith@xxxxxxxxxx>

To:

<equinox-dev@xxxxxxxxxxx>

Date:

02/25/2008 06:08 AM

Subject:

[equinox-dev] Adding 3rd party jar to Bundle.





Hi All,

        I am trying to add a 3rd party jar to my bundle. I put it in a lib/ folder and update the manifest file and build properties file as follows.

---> MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Xparse Plug-in
Bundle-SymbolicName: xparse
Bundle-Version: 1.0.0
Import-Package: org.osgi.framework;version="1.4.0",
org.osgi.util.xml;version="1.0.0"
Bundle-Activator: org.osgi.util.xml.XMLParserActivator
Bundle-ClassPath: ., lib/TestParser.jar


my build.properties file is as follows

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
             .,\
             lib/
           

When I start my bundle I keep getting a java.lang.ClassNotFoundException when I refer the class within the jar. However if I were to specify the absolute path of the jar file in Bundle-Classpath I get no error, and the bundle starts properly.

I`ve searched for any articles regarding this. I found this bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=108781 It contains example code and can`t spot any difference..

Is there something i am missing. ? Or has there been any change regarding this..? Any help would be greatly appreciated.?

P.S: Please find attached the entire stack trace.

Thanks,
Srijith.

(See attached file: StackTrace.txt)
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/equinox-dev
(See attached file: StackTrace.txt)_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

GIF image

GIF image

GIF image

GIF image

Attachment: StackTrace.txt
Description: Binary data


Back to the top