Re: Help Required In Writing a New SDBC Driver For LDAP

Rohit Kulkarni <[email protected]> Mon, 28 Mar 2011 21:13:06 +0530
Newsgroups gmane.comp.openoffice.dba.devel
Message-ID <[email protected]>
--0016e6d624f8c89018049f8ccc01
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

>
> Hello,
> 1) I built whole openoffice and installed it.(normal build i.e build --al=
l)
> 2) I built only dbaccess and connectivity modules with debug=3Dtrue
> dbglevel=3D2
> 3) Copied .so files from ../connectivity/unxlngi6.pro/lib/* and
> ../dbaccess/unxlngi6.pr/lib/*  to ../../openoffice3/basis-link/program/
> 4) Now I set breakpoint to " b connectivity::flat::ODriver::acceptsURL "
> 5) Run base through gdb.
> 6) Execution stopped at breakpoint, whatever I select flat or skeleton
> driver or any other from available driver list.
> 7) When I set breakpoint at " b
> connectivity::skeleton::SkeletonDriver::acceptsURL ", it wont stop at
> breakpoint.
> 8) That means execution of program never goes to SDriver.cxx (skeleton
> driver file) file which has acceptsURL function.
>
> The things I have noticed after some more debugging in gdb are --
>
> 1) I saw the function named OSDBCDriverManager::bootstrapDrivers()
> 2) I think this is the function where it populates the list of all drivers
> using
> " createContentEnumeration " function.
> 3) And this function is not returning my driver.
> 4) I saw this after watching the value of " aDriverDescriptor " variable
> which is used for pushback in vector " m_aDriverBS " , I saw various stri=
ngs
> for example , for flat it is "com.sun.star.comp.sdbc.flat.ODriver" but not
> my driver name.
>

What do I need to do so that createContentEnumeration will return my driver
object in the list ?

Regards,
Rohit


On Mon, Mar 28, 2011 at 1:16 PM, Ocke Janssen <[email protected]>wrot=
e:

> Hi,
>
>
> On 26.03.2011 06:47, Rohit Kulkarni wrote:
>
>> Hello,
>> I have successfully built skeleton driver and I can see it in available
>> list.
>> Now , I tried to debug it using gdb. For this I followed instructions on
>> http://wiki.services.openoffice.org/wiki/Debugging
>> Build using debug=3Dtrue and copied .so files to installation set.
>>
>> I added a breakpoint at
>> connectivity::skeleton::SkeletonDriver::acceptsURL then,
>> run base -> select Skeleton Driver -> Datasource url window appears
>> (typed any string in it) -> saved ->finish
>> In this process debugger wont stop at breakpoint.
>>
>> Another thing is that I added breakpoint at
>> connectivity::flat::ODriver::acceptsURL then, all same steps above.
>> Debugger stopped at breakpoint where I can see flat file EDriver.cxx
>> code with acceptsURL function.
>>
>> So, do you have any idea why it wouldn't call
>> connectivity::skeleton::SkeletonDriver::acceptsURL function?
>>
> May be you copied the wrong files or you built them not with debug=3Dt ? =
When
> you can set a break point for flat it should also work for your driver. No
> guess so far. Or may be set the break point when the library was loaded. =
I'm
> not the gdb expert.
>
> - oj
>
>
>> Regards,
>> Rohit
>> On Tue, Mar 15, 2011 at 11:53 AM, Ocke Janssen <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>>    On 14.03.2011 18:45, Rohit Kulkarni wrote:
>>
>>        I could successfully built the skeleton driver and now I can see
>>        it in
>>        the list of available drivers as well!
>>        Thanks a lot for your help. I really appreciate it.
>>
>>    :-)
>>
>>
>>        I have a quick question.
>>
>>
>>
>>        Any idea on how to solve this?
>>
>>    No, sorry. I think that's a question for the normal
>>    [email protected] <mailto:[email protected]> list. May be a build
>>
>>    problem or a bug.
>>
>>
>>        Also, Now, if I make any changes to the skeleton driver, do I
>>        have to
>>        build and install open office every time?
>>
>>    No, just replace your copy of the .so file in your office installatio=
n.
>>
>>    - oj
>>
>>
>>    --
>>
>>
>>    Ocke Janssen | Software Developer
>>    Phone: +40 23646500
>>    Oracle Office
>>
>>    ORACLE Deutschland B.V. & Co. KG | Nagelsweg 55 | 20097 Hamburg
>>
>>    ORACLE Deutschland B.V. & Co. KG
>>    Hauptverwaltung: Riesstr. 25, D-80992 M=FCnchen
>>    Registergericht: Amtsgericht M=FCnchen, HRA 95603
>>
>>    Komplement=E4rin: ORACLE Deutschland Verwaltung B.V.
>>    Rijnzathe 6, 3454PV De Meern, Niederlande
>>    Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
>>    Gesch=E4ftsf=FChrer: J=FCrgen Kunz, Marcel van de Molen, Alexander va=
n der
>> Ven
>>
>>
>>
>>    Oracle is committed to developing practices and products that help
>>    protect the environment
>>
>>    --
>>    -----------------------------------------------------------------
>>    To unsubscribe send email to [email protected]
>>    <mailto:[email protected]>
>>
>>    For additional commands send email to [email protected]
>>    <mailto:[email protected]>
>>    with Subject: help
>>
>>
>>
> --
> -----------------------------------------------------------------
> To unsubscribe send email to [email protected]
> For additional commands send email to [email protected]
> with Subject: help
>
--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

--0016e6d624f8c89018049f8ccc01
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<blockquote class=3D"gmail_quote" style=3D"padding-left: 1ex; margin: 0px 0=
px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);"><div class=3D"im"=
>Hello,<br>1) I built whole openoffice and installed=20
it.(normal build i.e build --all)<br>2) I built only dbaccess and=20
connectivity modules with debug=3Dtrue dbglevel=3D2<br>
3) Copied .so files from ../connectivity/<a href=3D"http://unxlngi6.pro/lib=
/*" target=3D"_blank">unxlngi6.pro/lib/*</a>
 and ../dbaccess/<a href=3D"http://unxlngi6.pr/lib/*" target=3D"_blank">unx=
lngi6.pr/lib/*</a>=A0
 to ../../openoffice3/basis-link/program/ <br>
4) Now I set breakpoint to &quot; b connectivity::flat::ODriver::acceptsURL
 &quot; <br>5) Run base through gdb.<br>6) Execution stopped at breakpoint,=
=20
whatever I select flat or skeleton driver or any other from available=20
driver list.<br>
7) When I set breakpoint at &quot; b connectivity::skeleton::SkeletonDriver=
::acceptsURL
 &quot;, it wont stop at breakpoint.<br>8) That means execution of program=
=20
never goes to SDriver.cxx (skeleton driver file) file which has=20
acceptsURL function.<br>
<br></div>The things I have noticed after=A0<font style=3D"color: rgb(0, 0,=
 0);" color=3D"#ff0000">some=20
more debugging</font>=A0in gdb are --<div class=3D"im"><br>1) I saw the=20
function named OSDBCDriverManager::bootstrapDrivers() <br>2) I=20
think this is the function where it populates the list of all drivers=20
using <br>
&quot; createContentEnumeration &quot; function.<br>3) And this function is=
 not=20
returning my driver.<br>4) I saw this after watching the value of &quot;=20
aDriverDescriptor &quot; variable which is used for pushback in vector &quo=
t;=20
m_aDriverBS &quot; , I saw various strings for example , for flat it is=20
&quot;com.sun.star.comp.sdbc.flat.ODriver&quot; but not my driver name.<br>=
</div></blockquote><div>=A0</div>
<div style=3D"color: rgb(0, 0, 0);">What do I need to do so that=20
createContentEnumeration will return my driver object in the list ?<br><br>=
Regards,<br>Rohit<br></div><br><br><div class=3D"gmail_quote">On Mon, Mar 2=
8, 2011 at 1:16 PM, Ocke Janssen <span dir=3D"ltr">&lt;<a href=3D"mailto:Oc=
[email protected]">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<div class=3D"=
im"><br>
<br>
On 26.03.2011 06:47, Rohit Kulkarni wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
I have successfully built skeleton driver and I can see it in available<br>
list.<br>
Now , I tried to debug it using gdb. For this I followed instructions on<br>
<a href=3D"http://wiki.services.openoffice.org/wiki/Debugging" target=3D"_b=
lank">http://wiki.services.openoffice.org/wiki/Debugging</a><br>
Build using debug=3Dtrue and copied .so files to installation set.<br>
<br>
I added a breakpoint at<br>
connectivity::skeleton::SkeletonDriver::acceptsURL then,<br>
run base -&gt; select Skeleton Driver -&gt; Datasource url window appears<b=
r>
(typed any string in it) -&gt; saved -&gt;finish<br>
In this process debugger wont stop at breakpoint.<br>
<br>
Another thing is that I added breakpoint at<br>
connectivity::flat::ODriver::acceptsURL then, all same steps above.<br>
Debugger stopped at breakpoint where I can see flat file EDriver.cxx<br>
code with acceptsURL function.<br>
<br>
So, do you have any idea why it wouldn&#39;t call<br>
connectivity::skeleton::SkeletonDriver::acceptsURL function?<br>
</blockquote></div>
May be you copied the wrong files or you built them not with debug=3Dt ? Wh=
en you can set a break point for flat it should also work for your driver. =
No guess so far. Or may be set the break point when the library was loaded.=
 I&#39;m not the gdb expert.<br>

<br>
- oj<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class=3D"im">
<br>
Regards,<br>
Rohit<br>
On Tue, Mar 15, 2011 at 11:53 AM, Ocke Janssen &lt;<a href=3D"mailto:Ocke.J=
[email protected]" target=3D"_blank">[email protected]</a><br></div><=
div class=3D"im">
&lt;mailto:<a href=3D"mailto:[email protected]" target=3D"_blank">Ock=
[email protected]</a>&gt;&gt; wrote:<br>
<br>
 =A0 =A0On 14.03.2011 18:45, Rohit Kulkarni wrote:<br>
<br>
 =A0 =A0 =A0 =A0I could successfully built the skeleton driver and now I ca=
n see<br>
 =A0 =A0 =A0 =A0it in<br>
 =A0 =A0 =A0 =A0the list of available drivers as well!<br>
 =A0 =A0 =A0 =A0Thanks a lot for your help. I really appreciate it.<br>
<br>
 =A0 =A0:-)<br>
<br>
<br>
 =A0 =A0 =A0 =A0I have a quick question.<br>
<br>
<br>
<br>
 =A0 =A0 =A0 =A0Any idea on how to solve this?<br>
<br>
 =A0 =A0No, sorry. I think that&#39;s a question for the normal<br></div>
 =A0 =A0<a href=3D"mailto:[email protected]" target=3D"_blank">dev@openoff=
ice.org</a> &lt;mailto:<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt; list. May be a build<div class=3D"im"><br>
 =A0 =A0problem or a bug.<br>
<br>
<br>
 =A0 =A0 =A0 =A0Also, Now, if I make any changes to the skeleton driver, do=
 I<br>
 =A0 =A0 =A0 =A0have to<br>
 =A0 =A0 =A0 =A0build and install open office every time?<br>
<br>
 =A0 =A0No, just replace your copy of the .so file in your office installat=
ion.<br>
<br>
 =A0 =A0- oj<br>
<br>
<br>
 =A0 =A0--<br>
<br>
<br>
 =A0 =A0Ocke Janssen | Software Developer<br>
 =A0 =A0Phone: +40 23646500<br>
 =A0 =A0Oracle Office<br>
<br>
 =A0 =A0ORACLE Deutschland B.V. &amp; Co. KG | Nagelsweg 55 | 20097 Hamburg=
<br>
<br>
 =A0 =A0ORACLE Deutschland B.V. &amp; Co. KG<br>
 =A0 =A0Hauptverwaltung: Riesstr. 25, D-80992 M=FCnchen<br>
 =A0 =A0Registergericht: Amtsgericht M=FCnchen, HRA 95603<br>
<br>
 =A0 =A0Komplement=E4rin: ORACLE Deutschland Verwaltung B.V.<br>
 =A0 =A0Rijnzathe 6, 3454PV De Meern, Niederlande<br>
 =A0 =A0Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697<=
br>
 =A0 =A0Gesch=E4ftsf=FChrer: J=FCrgen Kunz, Marcel van de Molen, Alexander =
van der Ven<br>
<br>
<br>
<br>
 =A0 =A0Oracle is committed to developing practices and products that help<=
br>
 =A0 =A0protect the environment<br>
<br>
 =A0 =A0--<br>
 =A0 =A0-----------------------------------------------------------------<b=
r>
 =A0 =A0To unsubscribe send email to <a href=3D"mailto:dev-unsubscribe@dba.=
openoffice.org" target=3D"_blank">[email protected]</a><br=
></div>
 =A0 =A0&lt;mailto:<a href=3D"mailto:[email protected]" ta=
rget=3D"_blank">[email protected]</a>&gt;<div class=3D"im"=
><br>
 =A0 =A0For additional commands send email to <a href=3D"mailto:[email protected]=
penoffice.org" target=3D"_blank">[email protected]</a><br></div>
 =A0 =A0&lt;mailto:<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>&gt;<br>
 =A0 =A0with Subject: help<br>
<br>
<br>
</blockquote><div><div></div><div class=3D"h5">
<br>
--<br>
-----------------------------------------------------------------<br>
To unsubscribe send email to <a href=3D"mailto:[email protected]=
ce.org" target=3D"_blank">[email protected]</a><br>
For additional commands send email to <a href=3D"mailto:[email protected]=
e.org" target=3D"_blank">[email protected]</a><br>
with Subject: help<br>
</div></div></blockquote></div><br>

--0016e6d624f8c89018049f8ccc01--