Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Installing a JDBC driver
Installing a JDBC driver [message #7800] Fri, 11 February 2005 14:39 Go to next message
thierry lach is currently offline thierry lachFriend
Messages: 26
Registered: July 2009
Junior Member
How can different JDBC drivers be added to the existing driver?
Re: Installing a JDBC driver [message #7902 is a reply to message #7800] Wed, 16 February 2005 18:29 Go to previous messageGo to next message
thierry lach is currently offline thierry lachFriend
Messages: 26
Registered: July 2009
Junior Member
I've been able to add a driver jar to the
org.eclipse.birt.report.data.oda.jdbc project, and by adding the jar name to
odaconfig.xml, I've been able to access another jdbc driver.

It seems to me that this mechanism is not flexible enough as it requires
some knowledge of eclipse and birt internals. I'd prefer to see a mechanism
by which the ODA-JDBC driver could be handed a jar file reference by another
plugin.

Here's an example plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="org.eclipse.birt.report.data.oda.jdbc.mysql"
name="MySQL JDBC Driver Plug-in"
version="1.0.0"
provider-name="">

<runtime>
<library name="mysql-connector-java-3.1.6-bin.jar">
<export name="*"/>
</library>
</runtime>
<requires>
<import plugin="org.eclipse.birt.report.data.oda.jdbc"/>
<import plugin="org.eclipse.birt.report.data.oda.jdbc.ui"/>
</requires>
<extension point="org.eclipse.birt.report.data.oda.jdbc.driver">
<driver jar="mysql-connector-java-3.1.6-bin.jar"/>
</extension>

</plugin>

I'm working on getting this example running.


"Thierry Lach" <thierry.lach@bbdodetroit.com> wrote in message
news:cuig3o$7qe$1@www.eclipse.org...
> How can different JDBC drivers be added to the existing driver?
>
>
Re: Installing a JDBC driver [message #8897 is a reply to message #7902] Thu, 17 February 2005 15:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sschafer.innoventsolutions.com

Thierry,

Could you please post the odaconfig.xml file for the benefit of those of
us who are not up on ODA? Also I found 4 instances of odaconfig.xml:
one in plugins\org.eclipse.birt.report.data.oda.jdbc_0.0.1, and the rest
in the viewer/WEB-INF area. Do they all need to be modified?

Thierry Lach wrote:
> I've been able to add a driver jar to the
> org.eclipse.birt.report.data.oda.jdbc project, and by adding the jar name to
> odaconfig.xml, I've been able to access another jdbc driver.
>
> It seems to me that this mechanism is not flexible enough as it requires
> some knowledge of eclipse and birt internals. I'd prefer to see a mechanism
> by which the ODA-JDBC driver could be handed a jar file reference by another
> plugin.
>
> Here's an example plugin.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.0"?>
> <plugin
> id="org.eclipse.birt.report.data.oda.jdbc.mysql"
> name="MySQL JDBC Driver Plug-in"
> version="1.0.0"
> provider-name="">
>
> <runtime>
> <library name="mysql-connector-java-3.1.6-bin.jar">
> <export name="*"/>
> </library>
> </runtime>
> <requires>
> <import plugin="org.eclipse.birt.report.data.oda.jdbc"/>
> <import plugin="org.eclipse.birt.report.data.oda.jdbc.ui"/>
> </requires>
> <extension point="org.eclipse.birt.report.data.oda.jdbc.driver">
> <driver jar="mysql-connector-java-3.1.6-bin.jar"/>
> </extension>
>
> </plugin>
>
> I'm working on getting this example running.
>
>
> "Thierry Lach" <thierry.lach@bbdodetroit.com> wrote in message
> news:cuig3o$7qe$1@www.eclipse.org...
>
>>How can different JDBC drivers be added to the existing driver?
>>
>>
>
>
>
Re: Installing a JDBC driver [message #8918 is a reply to message #8897] Thu, 17 February 2005 17:02 Go to previous messageGo to next message
thierry lach is currently offline thierry lachFriend
Messages: 26
Registered: July 2009
Junior Member
It's in the plugin org.eclipse.birt.report.data.oda.jdbc and named
odaconfig.xml . Open it up and you will find the following starting at
line 26:

<DriverLibraries>
<LibrariesForOS>
<OSType>All</OSType>
<LibraryName>oda-jdbc.jar</LibraryName>
<LibraryName>jtds-0.9.jar</LibraryName>
</LibrariesForOS>

Just copy your jdbc driver jar into
org.eclipse.birt.report.data.oda.jdbc, and add another
<LibraryName>jarname.jar</LibraryName> there. That seems to work for
me.

"Steve Schafer" <sschafer@innoventsolutions.com> wrote in message
news:4214B99E.7070308@innoventsolutions.com...
> Thierry,
>
> Could you please post the odaconfig.xml file for the benefit of those of
> us who are not up on ODA? Also I found 4 instances of odaconfig.xml:
> one in plugins\org.eclipse.birt.report.data.oda.jdbc_0.0.1, and the rest
> in the viewer/WEB-INF area. Do they all need to be modified?
>
> Thierry Lach wrote:
> > I've been able to add a driver jar to the
> > org.eclipse.birt.report.data.oda.jdbc project, and by adding the jar
name to
> > odaconfig.xml, I've been able to access another jdbc driver.
> >
> > It seems to me that this mechanism is not flexible enough as it requires
> > some knowledge of eclipse and birt internals. I'd prefer to see a
mechanism
> > by which the ODA-JDBC driver could be handed a jar file reference by
another
> > plugin.
> >
> > Here's an example plugin.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <?eclipse version="3.0"?>
> > <plugin
> > id="org.eclipse.birt.report.data.oda.jdbc.mysql"
> > name="MySQL JDBC Driver Plug-in"
> > version="1.0.0"
> > provider-name="">
> >
> > <runtime>
> > <library name="mysql-connector-java-3.1.6-bin.jar">
> > <export name="*"/>
> > </library>
> > </runtime>
> > <requires>
> > <import plugin="org.eclipse.birt.report.data.oda.jdbc"/>
> > <import plugin="org.eclipse.birt.report.data.oda.jdbc.ui"/>
> > </requires>
> > <extension point="org.eclipse.birt.report.data.oda.jdbc.driver">
> > <driver jar="mysql-connector-java-3.1.6-bin.jar"/>
> > </extension>
> >
> > </plugin>
> >
> > I'm working on getting this example running.
> >
> >
> > "Thierry Lach" <thierry.lach@bbdodetroit.com> wrote in message
> > news:cuig3o$7qe$1@www.eclipse.org...
> >
> >>How can different JDBC drivers be added to the existing driver?
> >>
> >>
> >
> >
> >
Re: Installing a JDBC driver [message #12057 is a reply to message #7800] Wed, 02 March 2005 00:58 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Thierry Lach wrote:

> How can different JDBC drivers be added to the existing driver?

Hi Thierry,

As you had found, to specify a different JDBC driver, simply include its
jar file(s) in the JDBC ODA driver's configuration file (odaconfig.xml).
Below are some more details on various configurable options.
An ODA driver's odaconfig.xml file is by default in the same installation
directory as the ODA driver's plugin.xml, e.g. in the
"org.eclipse.birt.report.data.oda.jdbc" for the JDBC ODA driver. The BIRT
ODA plugin schema has an extension point element for a driver's
"configFileDir". It is optional for specifying the directory of its
odaconfig.xml .

In the JDBC ODA configuration file's
<RunTimeInterface>.<DriverLibraries>.<LibrariesForOS>.<LibraryName >
element, simply replace the sample value of "jtds-0.9.jar" with the name
of your JDBC jar file. Add another <LibraryName> element for each
additional jar file that might be needed.
A copy of the ODA configuration's XML schema definition (ODAConfig.xsd)
can be found in BIRT's Eclipse CVS, under the
source/org.eclipse.birt.data/schema folder. A driver's library files are
by default expected in the same directory as the odaconfig.xml. You can
optionally add a <Location> element to specify the path of all the library
files.

BTW, an ODA driver is intended to also run outside of the Eclipse desk top
environment, such as a J2EE Appl server.
One can use any XML editor to edit the odaconfig.xml directly.
We are looking into providing an UI editor tool that would make it easier
for one to configure any type of ODA driver. The JDBC one is simply an
example of one type of ODA drivers.

Linda
BIRT Data Engine team lead
Previous Topic:BIRT Source Reorganization
Next Topic:Having trouble installing BIRT
Goto Forum:
  


Current Time: Sat Jul 27 19:20:32 GMT 2024

Powered by FUDForum. Page generated in 0.03277 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top