Re: [dba-dev] DisposedException - EOF reached

2009-07-02 Thread René van Oevelen

Hello Frank,

Last night I've sent the code to your direct 
e-mail address. I curiously look forward to your comments.


Kind regards,
René


-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] DisposedException - EOF reached

2009-07-01 Thread Frank Schönheit - Sun Microsystems Germany
Hi René,

> Yes, I already found out what IIRC meant. :-) I'm not of the sms
> generation!

I definitely do not belong into this generation either :)

> I indeed played with the code and during my 
> attempts removed registerObject. I believed it 
> was not so important where this was done

Correct.

> When I restore them BEFORE the 
> props.setPropertyValue (the original position), 
> then I get the errormessage: 
> IllegalArgumentException; the datasource was not 
> stored. Use the interface XStorable to store the 
> data source.

Ah, that's something I indeed wondered about, registering should not
succeed without the document being stored. So, the error you describe
here is completely correct.

> When I move the same lines AFTER the 
> props.setPropertyValue, then I get the earlier 
> DisposedException - closeConnection message.

Quite confusing.

Do you have a JAR or your modified sources you could send me (to the
sender address of this mail), so I cann have a look at this? Please no
fancy 3-pagers of how to set this up, something which runs out of the
box and hits the problem would be really nice :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] DisposedException - EOF reached

2009-07-01 Thread René van Oevelen

Hi Frank,

Yes, I already found out what IIRC meant. :-) I'm not of the sms generation!

I indeed played with the code and during my 
attempts removed registerObject. I believed it 
was not so important where this was done, because 
Juergen Schmidt moved these lines after all the 
property settings in his presentation at JAZOON07.


When I restore them BEFORE the 
props.setPropertyValue (the original position), 
then I get the errormessage: 
IllegalArgumentException; the datasource was not 
stored. Use the interface XStorable to store the 
data source. Please note that I replaced the 
mDataSourceName variable with "D36", just for standalone testing.


When I move the same lines AFTER the 
props.setPropertyValue, then I get the earlier 
DisposedException - closeConnection message.


Kind regards,
René

At 09:03 1-7-2009, you wrote:

Hi René,

> jurt.jar, ridl.jar and juh.jar are all stored in
> the directory ...OpenOffice.org 3\URE\java,
> nowhere else. unoil.jar is stored in
> ...OpenOffice.org 3\Basis\program\classes
> directory and nowhere else. I could not find
> something that starts with IIRC (no idea what it is as well!).

Uhm, sorry, IIRC is an abbreviation for "If I remember correctly" :)

> All my code steps check for exception conditions,
> but all the previous steps seem to succeed and to
> return correct values. If the jars are ok, what
> next can I check? It would be nice if I could use
> a kind of trace to check what is going on behind
> the scenes, but I believe that is not possible?

Sorry, I do not know at all whether tracing the Java UNO bridge is
possible (and I indeed think it's that bridge which causes problems here).

Sadly, I do not really have new ideas what could cause this, really the
only possible reason I know about is the incompatible jar files, but you
convincingly denied this.

Not sure if the code you're using is still the code you pointed to, or
if you already adjusted it. If the former, then please try moving the
"xServ.registerObject(..." line *after* the setPropertyValue. Would be
interesting to know whether the problem then still happens, and in which
line. I somehow suspect the DisposedException might be moved to the
*second* setPropertyValue then. In other words, I suspect that something
about the registerObject is killing your connection.

Ciao
Frank

--
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] DisposedException - EOF reached

2009-07-01 Thread Frank Schönheit - Sun Microsystems Germany
Hi René,

> jurt.jar, ridl.jar and juh.jar are all stored in 
> the directory ...OpenOffice.org 3\URE\java, 
> nowhere else. unoil.jar is stored in 
> ...OpenOffice.org 3\Basis\program\classes 
> directory and nowhere else. I could not find 
> something that starts with IIRC (no idea what it is as well!).

Uhm, sorry, IIRC is an abbreviation for "If I remember correctly" :)

> All my code steps check for exception conditions, 
> but all the previous steps seem to succeed and to 
> return correct values. If the jars are ok, what 
> next can I check? It would be nice if I could use 
> a kind of trace to check what is going on behind 
> the scenes, but I believe that is not possible?

Sorry, I do not know at all whether tracing the Java UNO bridge is
possible (and I indeed think it's that bridge which causes problems here).

Sadly, I do not really have new ideas what could cause this, really the
only possible reason I know about is the incompatible jar files, but you
convincingly denied this.

Not sure if the code you're using is still the code you pointed to, or
if you already adjusted it. If the former, then please try moving the
"xServ.registerObject(..." line *after* the setPropertyValue. Would be
interesting to know whether the problem then still happens, and in which
line. I somehow suspect the DisposedException might be moved to the
*second* setPropertyValue then. In other words, I suspect that something
about the registerObject is killing your connection.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



[dba-dev] DisposedException - EOF reached

2009-06-30 Thread René van Oevelen

Dear All,

After Frank's suggestion I removed everything I 
had of OpenOffice from my Vista development 
machine. The last links and directories I removed 
manually. Then I reïnstalled OpenOffice 2.4.1, 
adjusted the classpath, recompiled and rerun. I 
still get the same message, though it changed 
slightly (first ran with 3.1!): 
"com.sun.star.lang.DisposedException: 
java.io.IOException: closeConnection message 
received". I still get it on exactly the same 
instruction: props.setPropertyValue("URL", "sdbc:flat:file:///C:/Modulas/998");


So I guess it has nothing to do with any incompatibility of (.jar) versions.

René

---
i-Modulas Software BV
Nikkelstraat 6, 2984 AM  Ridderkerk / NL
Tel. (+31) (0)88 0900 902 / Pers.fax (+31) (0)13 505 6132
Email r.van.oeve...@i-modulas.nl
Website www.i-modulas.nl
--- 



-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] DisposedException - EOF reached

2009-06-29 Thread René van Oevelen

Hello Frank,

Your response is very much appreciated. I did not 
think of that, so finally a new idea to check. I immediately did this.


jurt.jar, ridl.jar and juh.jar are all stored in 
the directory ...OpenOffice.org 3\URE\java, 
nowhere else. unoil.jar is stored in 
...OpenOffice.org 3\Basis\program\classes 
directory and nowhere else. I could not find 
something that starts with IIRC (no idea what it is as well!).
Previous I had an installation of OpenOffice 2.4, 
so after your suggestion I was afraid that some 
old files would be hanging around on my harddisk, 
but with these search results that does not seem to be true.


I indeed use a socketconnection and with server I 
meant the running OpenOffice instance on my 
development pc. For me the client is my Java 
program and I'm used to call everything I talk to 
a server. Sorry for being unclear!


So my program and OpenOffice are running on my 
Windows Vista development machine and they must 
share the same jar files. My Windows Vista search 
(including hidden, system and non-indexed files!) 
only shows single instances of the jar files you mentioned.


All my code steps check for exception conditions, 
but all the previous steps seem to succeed and to 
return correct values. If the jars are ok, what 
next can I check? It would be nice if I could use 
a kind of trace to check what is going on behind 
the scenes, but I believe that is not possible?


Kind regards,
René


 Originele bericht 
Onderwerp: Re: [dba-dev] DisposedException - EOF reached
Datum: Mon, 29 Jun 2009 16:01:46 +0200
Van: Frank Schönheit - Sun Microsystems Germany 
Antwoord-naar: dev@dba.openoffice.org
Aan: dev@dba.openoffice.org
Referenties: <200906250748.n5p7me2g085...@smtp-vbr3.xs4all.nl>

Hi René,

I'm trying to recode the sample known as 
'mailmerge code snippet' and found at 
http://api.openoffice.org/source/browse/api/www/Examples/Snippets/Writer/Writer.MailMerge.snip?rev=1.1&view=markup.
I'm testing my code on a Windows Vista system 
with OpenOffice 3.1 Dutch version. As soon as 
I'm executing the method setPropertyValue with 
the sdbc:flat , I get the exception 
com.sun.star.lang.DisposedException . EOF reached ..


If that "EOF reached" is a citation of your error message, then I'd say
that some previous API call killed the connection to your OOo instance:
"EOF reached", according to Grok
(http://svn.services.openoffice.org/opengrok/search?q=%22EOF+reached%22&defs=&refs=&path=&hist=&project=%2FOOO310_13),
comes from SocketConnection.java, which sounds as if you connected to a
running OOo via a socket (as opposed to a pipe), and this connection
somehow died.


I understand I loose the connection with the server.


With "server", do you mean the OOo instance you connected to?


But this server does not go down and keeps on running


If this refers to OOo ... this means (I assume) that on client side,
some UNO API call could not be translated properly. I do not know too
much about our UNO bridges which bridge API calls, but my assumption
would be that you're using incompatible .jar files, describing the UNO
API, on your client and server.

For instance, assume you have an interface XSomething, which has a
method doSomething, introduced in OOo 3.1. Now when you have an OOo 3.1
running, the UNO environment in this OOo process will know about this
interface and method.

Now assume that on your client, you use UNO jar files from OOo 3.0,
where this method does not yet exist (or has another signature, or
something like this). In this case, your client code will compile fine,
but at runtime, the UNO environment of your client will detect that a
call is made to a method which does not exist on "the other side of the
UNO bridge". The only reasonable reaction in such a situation would be
terminating the bridge, since a recovery is not possible at all (not
without potentially leaving your client in an undetermined state).

So, what I would check is whether the UNO jar files on your client and
server are the same. Those are, IIRC, unoil.jar, juh,jar, jurt,jar,
ridl.jar (might be more or less than those, not sure).

Ciao
Frank

--
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



Re: [dba-dev] DisposedException - EOF reached

2009-06-29 Thread Frank Schönheit - Sun Microsystems Germany
Hi René,

> I'm trying to recode the sample known as 
> 'mailmerge code snippet' and found at 
> http://api.openoffice.org/source/browse/api/www/Examples/Snippets/Writer/Writer.MailMerge.snip?rev=1.1&view=markup.
> 
> I'm testing my code on a Windows Vista system 
> with OpenOffice 3.1 Dutch version. As soon as I'm 
> executing the method setPropertyValue with the 
> sdbc:flat , I get the exception 
> com.sun.star.lang.DisposedException . EOF 
> reached ..

If that "EOF reached" is a citation of your error message, then I'd say
that some previous API call killed the connection to your OOo instance:
"EOF reached", according to Grok
(http://svn.services.openoffice.org/opengrok/search?q=%22EOF+reached%22&defs=&refs=&path=&hist=&project=%2FOOO310_13),
comes from SocketConnection.java, which sounds as if you connected to a
running OOo via a socket (as opposed to a pipe), and this connection
somehow died.

> I understand I loose the connection with the server.

With "server", do you mean the OOo instance you connected to?

> But this server does not go down and keeps on running

If this refers to OOo ... this means (I assume) that on client side,
some UNO API call could not be translated properly. I do not know too
much about our UNO bridges which bridge API calls, but my assumption
would be that you're using incompatible .jar files, describing the UNO
API, on your client and server.

For instance, assume you have an interface XSomething, which has a
method doSomething, introduced in OOo 3.1. Now when you have an OOo 3.1
running, the UNO environment in this OOo process will know about this
interface and method.

Now assume that on your client, you use UNO jar files from OOo 3.0,
where this method does not yet exist (or has another signature, or
something like this). In this case, your client code will compile fine,
but at runtime, the UNO environment of your client will detect that a
call is made to a method which does not exist on "the other side of the
UNO bridge". The only reasonable reaction in such a situation would be
terminating the bridge, since a recovery is not possible at all (not
without potentially leaving your client in an undetermined state).

So, what I would check is whether the UNO jar files on your client and
server are the same. Those are, IIRC, unoil.jar, juh,jar, jurt,jar,
ridl.jar (might be more or less than those, not sure).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org



[dba-dev] DisposedException - EOF reached

2009-06-26 Thread René van Oevelen

Dear Developers,

I'm trying to recode the sample known as 
'mailmerge code snippet' and found at 
http://api.openoffice.org/source/browse/api/www/Examples/Snippets/Writer/Writer.MailMerge.snip?rev=1.1&view=markup.


I'm testing my code on a Windows Vista system 
with OpenOffice 3.1 Dutch version. As soon as I'm 
executing the method setPropertyValue with the 
sdbc:flat , I get the exception 
com.sun.star.lang.DisposedException . EOF 
reached .. I understand I loose the 
connection with the server. But this server does 
not go down and keeps on running. In fact, when I 
restart the program, it reconnects to the server 
without a problem, until it comes to the 
setPropertyValue again. I have no idea why this 
is, but I'm unexperienced with OpenOffice, so I 
guess I make a beginners mistake.


I hope this message is directed to the right 
address? Let me know and I'm happy to provide more info.


Kind regards,

René van Oevelen


-
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org