|
|
Re: Where to put external JDBC driver within RAP [message #483398 is a reply to message #483096] |
Tue, 01 September 2009 13:17 |
Kay Chee Cheung Messages: 8 Registered: July 2009 |
Junior Member |
|
|
Hi Björn ,
Thanks very much for your very valuable answer.
I created Plug-in project using the wizard "Plug-in from Existing JAR
Archives" as suggested.
I found that I need to add the plug-in in two places to make it work.
1. Add it under "Required Plug-in" in MANIFEST.MF or under
"Imported Packages" in MANIFEST.MF, and two
2. Add it as Bundle in the "Run configuration"
If I do only one of the above, then it would not work. I think this is
what you said implicitly in your answer as well.
Thanks very much for your great help! I could not find it anywhere
else.
Regards
Kay Chee
"Björn Fischer" <bjoern@bjoernfischer.de> wrote in message
news:h7frsd$id3$1@build.eclipse.org...
> Hi Kay,
> what you face is not a RAP specific problem but rather an OSGi
> classloading issue. If you use libraries in OSGi that load classes
> dynamically (e.g. via Class#forName()), you have to deploy the library
> as an OSGi bundle. This sounds more complicated than it is.
>
> Simply use the new-wizard "Plug-in from Existing JAR Archives". Use the
> "Add external..." button to point to your JDBC driver jar. On the next
> page give a plug-in name and meta-info for your plug-in. I prefer not to
> unzip the contents, but that is not important.
>
> The wizard generates a plug-in which you can start together with your
> app. When your package-imports are correct or you add the
> library-plug-in to your required bundles, the driver class should be
> found.
>
> Regards,
> Björn
>
> Eclipse Corner schrieb:
>> Hi,
>> I am new to RAP. I tried to use JDBC connection in RAP application.
>> I put the JDBC jar files under Project Java Build Path, which works for
>> normal Eclipse project. But when I run the RAP application, I get a
>> Class Not Found message for my JDBC driver class.
>> My driver must be invisible to the web server being started. Where
>> else should I put the external JDBC jar ? Any help would be much
>> appreciated.
>>
>> Kay Chee Cheung
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04018 seconds