Skip to main content



      Home
Home » Archived » BIRT » Trying to get the pooled db connection working
Trying to get the pooled db connection working [message #119807] Mon, 30 January 2006 09:42 Go to next message
Eclipse UserFriend
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 #119981 is a reply to message #119807] Mon, 30 January 2006 11:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jarif.despammed.com

Jari Fredriksson <jarif@despammed.com> wrote in
news:Xns975BA9F92A00DSH15SGybs1ysmajw54s5@206.191.52.34:

>
> What might be the reason? This is really puzzling.
>

I got this working in ViewerServlet (runtime) now. My custom SubOdaJdbc
driver has it's own

private Connection jdbcConn ;

member, which was of course wrong.

Runtime works, but designer still throws Entry Point errors. But that the
runtime works, is 90% for eternal happiness;)
Re: Trying to get the pooled db connection working [message #120073 is a reply to message #119807] Mon, 30 January 2006 11:49 Go to previous messageGo to next message
Eclipse UserFriend
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&nbsp;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:&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Jari Fredriksson" &lt;</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>&gt; =
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>&gt; <BR>&gt; </FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>&gt; This IS really hard? Is it =
supposed to=20
still work with 2.0 final?<BR>&gt; <BR>&gt; I created the two plugins, =
the=20
driver plugin with classes for Driver and <BR>&gt; Plugin (extending=20
BIRTPlugin)<BR>&gt; <BR>&gt; The DataSource seem to fetch objects from =
database=20
in designer, but when <BR>&gt; trying to define a Data Set an error is=20
shown:<BR>&gt; ------------------------------------<BR>&gt; A BIRT =
exception=20
occurred.<BR>&gt; &nbsp; Plug-in Provider:Eclipse.org<BR>&gt; &nbsp; =
Plug-in=20
Name:BIRT Data Engine<BR>&gt; &nbsp; Plug-in =
ID:org.eclipse.birt.data<BR>&gt;=20
&nbsp; Version:2.0.0<BR>&gt; &nbsp; Error=20
Code:odaconsumer.OdaInitEntryNotFound<BR>&gt; &nbsp; Error Message:The =
driver=20
com.k2datasolutions.birt.report.data.oda.jdbcs <BR>&gt; initial entry =
point=20
cannot be found or cannot be instantiated.<BR>&gt; Unable to create the =
ODA=20
driver's connection factory.<BR>&gt;=20
-------------------------------------<BR>&gt; <BR>&gt;=20
com.k2datasolutions.birt.report.data.oda.jdbc is the package name where =
the=20
<BR>&gt; driver and plugin classes are, as well as the id =
plugin.xml<BR>&gt;=20
<BR>&gt; &lt;plugin<BR>&gt; &nbsp;&nbsp;=20
id=3D"com.k2datasolutions.birt.report.data.oda.jdbc"<BR>&gt; =
&nbsp;&nbsp; name=3D"K2=20
BIRT ODA-JDBC Bridge Driver"<BR>&gt; &nbsp;&nbsp; =
version=3D"1.0.0"<BR>&gt;=20
&nbsp;&nbsp; provider-name=3D"k2datasolutions.com"<BR>&gt; &nbsp;&nbsp;=20
class=3D" com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcPlug in "&=
gt;<BR>&gt;=20
&nbsp;&nbsp; &lt;runtime&gt;<BR>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;library=20
name=3D"K2OdaJdbcDriver.jar"&gt;<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &lt;export=20
name=3D"*"/&gt;<BR>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;/library&gt;<BR>&gt;=20
&nbsp;&nbsp; &lt;/runtime&gt;<BR>&gt; &nbsp;&nbsp; =
&lt;requires&gt;<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;import=20
plugin=3D"org.eclipse.birt.report.data.oda.jdbc"/&gt;<BR >&gt; =
&nbsp;&nbsp;=20
&lt;/requires&gt;<BR>&gt; &nbsp;&nbsp; <BR>&gt; &nbsp;&nbsp; =
&lt;extension-point=20
id=3D"driverinfo" name=3D"JDBC Driver Information <BR>&gt; Extension" =
<BR>&gt;=20
&nbsp;&nbsp; schema=3D"schema/driverinfo.exsd"/&gt;<BR>&gt; &nbsp;&nbsp; =
<BR>&gt;=20
&nbsp;&nbsp; &lt;extension<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=20
point=3D"org.eclipse.datatools.connectivity.oda.dataSource"&gt; <BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dataSource<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
id=3D"com.k2datasolutions.birt.report.data.oda.jdbc"<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
odaVersion=3D"3.0"<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
<BR>&gt;=20
driverClass=3D"com.k2datasolutions.birt.report.data.oda.jdbc.SubOdaJdbcDr=
iver<BR>&gt;=20
"<BR>&gt; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
defaultDisplayName=3D"JNDI Data Source"<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
setThreadContextClassLoader=3D"false"&gt;<BR>&gt; <BR>&gt; .. the rest =
is=20
intact.<BR>&gt; <BR>&gt; 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 #120141 is a reply to message #120073] Mon, 30 January 2006 13:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jarif.despammed.com

"Gary Xue" <gxue@actuate.com> wrote in
news:drlg08$muu$1@utils.eclipse.org:

> 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

Thanks, Gary! I look what you suggest, and learn some more. Fast response!

Regards,
jarif
Re: Trying to get the pooled db connection working [message #120352 is a reply to message #120141] Mon, 30 January 2006 12:59 Go to previous messageGo to next message
Eclipse UserFriend
Jari

Gary's way is probably better, but I uploaded an example of this under
the rptdesign file changes for connection pool thread.

Jason

"Jari Fredriksson" <jarif@despammed.com> wrote in message
news:Xns975BCFFB1918BSH15SGybs1ysmajw54s5@206.191.52.34...
> "Gary Xue" <gxue@actuate.com> wrote in
> news:drlg08$muu$1@utils.eclipse.org:
>
>> 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
>
> Thanks, Gary! I look what you suggest, and learn some more. Fast response!
>
> Regards,
> jarif
Re: Trying to get the pooled db connection working [message #121714 is a reply to message #120352] Tue, 31 January 2006 11:02 Go to previous message
Eclipse UserFriend
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
Previous Topic:Displaying SQL data in a horizontal format
Next Topic:2.0 M3 to 2.0.0 issues
Goto Forum:
  


Current Time: Sun May 11 04:37:01 EDT 2025

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

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

Back to the top