Trying to get the pooled db connection working [message #119807] |
Mon, 30 January 2006 09:42  |
Eclipse User |
|
|
|
Originally posted by: jarif.despammed.com
This IS really hard? Is it supposed to still work with 2.0 final?
I created the two plugins, the driver plugin with classes for Driver and
Plugin (extending BIRTPlugin)
The DataSource seem to fetch objects from database in designer, but when
trying to define a Data Set an error is shown:
------------------------------------
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.0.0
Error Code:odaconsumer.OdaInitEntryNotFound
Error Message:The driver com.k2datasolutions.birt.report.data.oda.jdbcs
initial entry point cannot be found or cannot be instantiated.
Unable to create the ODA driver's connection factory.
-------------------------------------
com.k2datasolutions.birt.report.data.oda.jdbc is the package name where the
driver and plugin classes are, as well as the id plugin.xml
<plugin
id="com.k2datasolutions.birt.report.data.oda.jdbc"
name="K2 BIRT ODA-JDBC Bridge Driver"
version="1.0.0"
provider-name="k2datasolutions.com"
class=" com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcPlug in ">
<runtime>
<library name="K2OdaJdbcDriver.jar">
<export name="*"/>
</library>
</runtime>
<requires>
<import plugin="org.eclipse.birt.report.data.oda.jdbc"/>
</requires>
<extension-point id="driverinfo" name="JDBC Driver Information
Extension"
schema="schema/driverinfo.exsd"/>
<extension
point="org.eclipse.datatools.connectivity.oda.dataSource">
<dataSource
id="com.k2datasolutions.birt.report.data.oda.jdbc"
odaVersion="3.0"
driverClass=" com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcDriv er
"
defaultDisplayName="JNDI Data Source"
setThreadContextClassLoader="false">
... the rest is intact.
What might be the reason? This is really puzzling.
|
|
|
|
Re: Trying to get the pooled db connection working [message #120073 is a reply to message #119807] |
Mon, 30 January 2006 11:49   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0476_01C6257A.15D905E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Jari,
I can't figure out what could be wrong without seeing your source code. =
But looking at your plugin.xml I guess you are trying to write a plugin =
to provide pooled JDBC connections to BIRT. Such a task can generated by =
achieve by writing a plugin to extend the =
org.eclipse.birt.report.data.oda.jdbc.driverinfo extension point. Here =
is the step-by-step instruction for how to do that:=20
(1) Create an eclipse plugin and seti it to depend on the BIRT plugin =
org.eclipse.birt.report.data.oda.jdbc
(2) In your plugin create a extension for the =
org.eclipse.birt.report.data.oda.jdbc.driverinfo extension point. Add a =
jdbcDriver element in the Eclipse extension editor. Give your driver a =
name, an URL template (that should usually look like =
"jdbc:your_company_name:your_data_source_name"), and also a =
connectionFactory. The connection factory is a class that implements =
interface org.eclipse.birt.report.data.oda.jdbc.IConnectionFactory.=20
(3) Write your connection factory implementation so that it gives out =
pooled jdbc Connections.
Once this is done, you can use BIRT designer to create a regular JDBC =
Data Source. You should then be able to see your own driver name in the =
list of available JDBC data sources.=20
As an example, look at how the BIRT =
org.eclipse.birt.report.data.oda.sampledb plugin implements the =
driverinfo extension.=20
--=20
Gary Xue
Actuate Corporation - Product Development
BIRT Committer
"Jari Fredriksson" <jarif@despammed.com> wrote in message =
news:Xns975BA9F92A00DSH15SGybs1ysmajw54s5@206.191.52.34...
>=20
>=20
> This IS really hard? Is it supposed to still work with 2.0 final?
>=20
> I created the two plugins, the driver plugin with classes for Driver =
and=20
> Plugin (extending BIRTPlugin)
>=20
> The DataSource seem to fetch objects from database in designer, but =
when=20
> trying to define a Data Set an error is shown:
> ------------------------------------
> A BIRT exception occurred.
> Plug-in Provider:Eclipse.org
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:2.0.0
> Error Code:odaconsumer.OdaInitEntryNotFound
> Error Message:The driver =
com.k2datasolutions.birt.report.data.oda.jdbcs=20
> initial entry point cannot be found or cannot be instantiated.
> Unable to create the ODA driver's connection factory.
> -------------------------------------
>=20
> com.k2datasolutions.birt.report.data.oda.jdbc is the package name =
where the=20
> driver and plugin classes are, as well as the id plugin.xml
>=20
> <plugin
> id=3D"com.k2datasolutions.birt.report.data.oda.jdbc"
> name=3D"K2 BIRT ODA-JDBC Bridge Driver"
> version=3D"1.0.0"
> provider-name=3D"k2datasolutions.com"
> =
class=3D" com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcPlug in ">=
> <runtime>
> <library name=3D"K2OdaJdbcDriver.jar">
> <export name=3D"*"/>
> </library>
> </runtime>
> <requires>
> <import plugin=3D"org.eclipse.birt.report.data.oda.jdbc"/>
> </requires>
> =20
> <extension-point id=3D"driverinfo" name=3D"JDBC Driver Information=20
> Extension"=20
> schema=3D"schema/driverinfo.exsd"/>
> =20
> <extension
> point=3D"org.eclipse.datatools.connectivity.oda.dataSource" >
> <dataSource
> id=3D"com.k2datasolutions.birt.report.data.oda.jdbc"
> odaVersion=3D"3.0"
> =20
> =
driverClass=3D"com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcDr=
iver
> "
> defaultDisplayName=3D"JNDI Data Source"
> setThreadContextClassLoader=3D"false">
>=20
> .. the rest is intact.
>=20
> What might be the reason? This is really puzzling.
------=_NextPart_000_0476_01C6257A.15D905E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1528" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Jari,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I can't figure out what could be wrong =
without=20
seeing your source code. But looking at your plugin.xml I guess you are =
trying=20
to write a plugin to provide pooled JDBC connections to BIRT. Such =
a task=20
can generated by achieve by writing a plugin to extend the=20
<EM>org.eclipse.birt.report.data.oda.jdbc.driverinfo</EM> extension =
point.=20
</FONT><FONT face=3DArial size=3D2>Here is the step-by-step instruction =
for how to=20
do that: </DIV>
<DIV>(1) Create an eclipse plugin and seti it to depend on the BIRT =
plugin=20
org.eclipse.birt.report.data.oda.jdbc</DIV>
<DIV>(2) In your plugin create a extension for the=20
<EM>org.eclipse.birt.report.data.oda.jdbc.driverinfo</EM> extension =
point. Add a=20
jdbcDriver element in the Eclipse extension editor. Give your driver a =
name, an=20
URL template (that should usually look like=20
"jdbc:your_company_name:your_data_source_name"), and also a =
connectionFactory.=20
The connection factory is a class that implements interface <FONT=20
size=3D2>org.eclipse.birt.report.data.oda.jdbc.IConnectionFactory. =
</FONT></DIV>
<DIV>(3) Write your connection factory implementation so that it gives =
out=20
pooled jdbc Connections.</DIV>
<DIV> </DIV>
<DIV>Once this is done, you can use BIRT designer to create a regular =
JDBC Data=20
Source. You should then be able to see your own driver name in the list =
of=20
available JDBC data sources. </DIV>
<DIV> </DIV>
<DIV>As an example, look at how the BIRT=20
org.eclipse.birt.report.data.oda.sampledb plugin implements the =
driverinfo=20
extension. </DIV>
<DIV><BR>-- <BR>Gary Xue<BR>Actuate Corporation - Product =
Development<BR>BIRT=20
Committer</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Jari Fredriksson" <</FONT><A=20
href=3D"mailto:jarif@despammed.com"><FONT face=3DArial=20
size=3D2>jarif@despammed.com</FONT></A><FONT face=3DArial size=3D2>> =
wrote in=20
message </FONT><A=20
href=3D"news:Xns975BA9F92A00DSH15SGybs1ysmajw54s5@206.191.52.34"><FONT =
face=3DArial=20
size=3D2>news:Xns975BA9F92A00DSH15SGybs1ysmajw54s5@206.191.52.34</FONT></=
A><FONT=20
face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>> <BR>> </FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>> This IS really hard? Is it =
supposed to=20
still work with 2.0 final?<BR>> <BR>> I created the two plugins, =
the=20
driver plugin with classes for Driver and <BR>> Plugin (extending=20
BIRTPlugin)<BR>> <BR>> The DataSource seem to fetch objects from =
database=20
in designer, but when <BR>> trying to define a Data Set an error is=20
shown:<BR>> ------------------------------------<BR>> A BIRT =
exception=20
occurred.<BR>> Plug-in Provider:Eclipse.org<BR>> =
Plug-in=20
Name:BIRT Data Engine<BR>> Plug-in =
ID:org.eclipse.birt.data<BR>>=20
Version:2.0.0<BR>> Error=20
Code:odaconsumer.OdaInitEntryNotFound<BR>> Error Message:The =
driver=20
com.k2datasolutions.birt.report.data.oda.jdbcs <BR>> initial entry =
point=20
cannot be found or cannot be instantiated.<BR>> Unable to create the =
ODA=20
driver's connection factory.<BR>>=20
-------------------------------------<BR>> <BR>>=20
com.k2datasolutions.birt.report.data.oda.jdbc is the package name where =
the=20
<BR>> driver and plugin classes are, as well as the id =
plugin.xml<BR>>=20
<BR>> <plugin<BR>> =20
id=3D"com.k2datasolutions.birt.report.data.oda.jdbc"<BR>> =
name=3D"K2=20
BIRT ODA-JDBC Bridge Driver"<BR>> =
version=3D"1.0.0"<BR>>=20
provider-name=3D"k2datasolutions.com"<BR>> =20
class=3D" com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcPlug in "&=
gt;<BR>>=20
<runtime><BR>> =
<library=20
name=3D"K2OdaJdbcDriver.jar"><BR>>=20
<export=20
name=3D"*"/><BR>> =
</library><BR>>=20
</runtime><BR>> =
<requires><BR>>=20
<import=20
plugin=3D"org.eclipse.birt.report.data.oda.jdbc"/><BR >> =
=20
</requires><BR>> <BR>> =
<extension-point=20
id=3D"driverinfo" name=3D"JDBC Driver Information <BR>> Extension" =
<BR>>=20
schema=3D"schema/driverinfo.exsd"/><BR>> =
<BR>>=20
<extension<BR>>=20
=20
point=3D"org.eclipse.datatools.connectivity.oda.dataSource"> <BR>>=20
<dataSource<BR>>=20
=20
id=3D"com.k2datasolutions.birt.report.data.oda.jdbc"<BR>>=20
=20
odaVersion=3D"3.0"<BR>>=20
=
<BR>>=20
driverClass=3D"com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcDr=
iver<BR>>=20
"<BR>> =
=20
defaultDisplayName=3D"JNDI Data Source"<BR>>=20
=20
setThreadContextClassLoader=3D"false"><BR>> <BR>> .. the rest =
is=20
intact.<BR>> <BR>> What might be the reason? This is really=20
puzzling.</FONT></DIV></BODY></HTML>
------=_NextPart_000_0476_01C6257A.15D905E0--
|
|
|
|
|
Re: Trying to get the pooled db connection working [message #121714 is a reply to message #120352] |
Tue, 31 January 2006 11:02  |
Eclipse User |
|
|
|
Originally posted by: jarif.despammed.com
"Jason Weathersby" <jweathersby@actuate.com> wrote in
news:drluo0$kd1$1@utils.eclipse.org:
> Jari
>
> Gary's way is probably better, but I uploaded an example of this under
> the rptdesign file changes for connection pool thread.
>
> Jason
It might be better, but your example works like charm. The code is pretty
much same as mine was, but something was wrong... I replaced mine with your
example, works as needed.
Cheers,
jarif
|
|
|
Powered by
FUDForum. Page generated in 0.03150 seconds