You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Rajath Shashidhara <ra...@gmail.com> on 2013/07/01 17:29:33 UTC

Adding my own ucb commands

Hello,
I'm thinking of adding "checkin" and "checkout" as ucp commands.

Is it permitted to add my own ucb commands?


-- 
Rajath S,
M.Sc(Hons.) Physics,
Birla Institute of Technology and Science - Pilani,
Pilani

Re: Adding my own ucb commands

Posted by Rajath Shashidhara <ra...@gmail.com>.
Hello Juergen,

When I upload a .odt file which contains "Hello World" as the only content
and use "open" command,
I get scrambled output. Is it a problem? Also I'm using the my own
implementation of XInputStream rather than
InputStreamToXInputStreamAdapter. Is that a problem? Still no luck with
opening form Open dialog box. But, all the ucb commands form my client
application works. Any direction to proceed in?


On Mon, Jul 1, 2013 at 10:22 PM, Rajath Shashidhara <
rajaths.rajaths@gmail.com> wrote:

> Hello Juergen,
>
> I have changed my implementation for "open" command for document.
> Now I'm using InputStreamToXInputStreamAdapter from the api.
>
> But, now the readBytes() method now gives a null pointer exception.
> Here is the stack trace:
> com.sun.star.uno.RuntimeException: [jni_uno bridge error] UNO calling Java
> method readBytes: non-UNO exception occurred: java.lang.NullPointerException
> java stack trace:
> java.lang.NullPointerException
>     at
> sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:674)
>     at java.io.FilterInputStream.read(FilterInputStream.java:133)
>     at
> sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3052)
>     at
> com.sun.star.lib.uno.adapter.InputStreamToXInputStreamAdapter.readBytes(InputStreamToXInputStreamAdapter.java:88)
>
>     at
> com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:173)
>     at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:139)
>     at
> com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:334)
>     at
> com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
>     at
> com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
>     at
> com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
>     at
> com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
>     at
> com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
>     at sun.proxy.$Proxy9.readBytes(Unknown Source)
>     at
> apache.ooffice.gsoc.cmisucp.test.CMISContentProviderTest.main(CMISContentProviderTest.java:133)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:616)
>     at com.sun.star.lib.loader.Loader.main(Loader.java:134)
>
> Any Pointers?
>
>
> On Mon, Jul 1, 2013 at 9:36 PM, Rajath Shashidhara <
> rajaths.rajaths@gmail.com> wrote:
>
>> Hello Juergen,
>>
>> My I use my own client application I am able to open and save documents.
>> I'd like to know the ucb commands that are executed when open is clicked.
>> Also, How exactly can I debug why my code is not working when using the
>> open dialog?
>>
>>
>> On Mon, Jul 1, 2013 at 9:28 PM, Jürgen Schmidt <jo...@gmail.com>wrote:
>>
>>> On 7/1/13 5:29 PM, Rajath Shashidhara wrote:
>>> > Hello,
>>> > I'm thinking of adding "checkin" and "checkout" as ucp commands.
>>> >
>>> > Is it permitted to add my own ucb commands?
>>> >
>>>
>>> sure and it make sense of course but you focus on a simple open and save
>>> of documents first.
>>>
>>> Sorry I have found the time today to look in the code because of too
>>> many translation updates for the release.
>>>
>>> Your focus for now should be to be able to use the office internal file
>>> open dialog and browse your CMIS store and open and save files from
>>> there. Or to store new files into this CMIS store.
>>>
>>> Juergen
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>
>>>
>>
>>
>> --
>> Rajath S,
>> M.Sc(Hons.) Physics,
>> Birla Institute of Technology and Science - Pilani,
>> Pilani
>>
>
>
>
> --
> Rajath S,
> M.Sc(Hons.) Physics,
> Birla Institute of Technology and Science - Pilani,
> Pilani
>



-- 
Rajath S,
M.Sc(Hons.) Physics,
Birla Institute of Technology and Science - Pilani,
Pilani

Re: Adding my own ucb commands

Posted by Rajath Shashidhara <ra...@gmail.com>.
Hello Juergen,

I have changed my implementation for "open" command for document.
Now I'm using InputStreamToXInputStreamAdapter from the api.

But, now the readBytes() method now gives a null pointer exception.
Here is the stack trace:
com.sun.star.uno.RuntimeException: [jni_uno bridge error] UNO calling Java
method readBytes: non-UNO exception occurred: java.lang.NullPointerException
java stack trace:
java.lang.NullPointerException
    at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:674)
    at java.io.FilterInputStream.read(FilterInputStream.java:133)
    at
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3052)
    at
com.sun.star.lib.uno.adapter.InputStreamToXInputStreamAdapter.readBytes(InputStreamToXInputStreamAdapter.java:88)

    at
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:173)
    at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:139)
    at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:334)
    at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
    at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
    at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
    at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
    at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
    at sun.proxy.$Proxy9.readBytes(Unknown Source)
    at
apache.ooffice.gsoc.cmisucp.test.CMISContentProviderTest.main(CMISContentProviderTest.java:133)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.sun.star.lib.loader.Loader.main(Loader.java:134)

Any Pointers?


On Mon, Jul 1, 2013 at 9:36 PM, Rajath Shashidhara <
rajaths.rajaths@gmail.com> wrote:

> Hello Juergen,
>
> My I use my own client application I am able to open and save documents.
> I'd like to know the ucb commands that are executed when open is clicked.
> Also, How exactly can I debug why my code is not working when using the
> open dialog?
>
>
> On Mon, Jul 1, 2013 at 9:28 PM, Jürgen Schmidt <jo...@gmail.com>wrote:
>
>> On 7/1/13 5:29 PM, Rajath Shashidhara wrote:
>> > Hello,
>> > I'm thinking of adding "checkin" and "checkout" as ucp commands.
>> >
>> > Is it permitted to add my own ucb commands?
>> >
>>
>> sure and it make sense of course but you focus on a simple open and save
>> of documents first.
>>
>> Sorry I have found the time today to look in the code because of too
>> many translation updates for the release.
>>
>> Your focus for now should be to be able to use the office internal file
>> open dialog and browse your CMIS store and open and save files from
>> there. Or to store new files into this CMIS store.
>>
>> Juergen
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>
>>
>
>
> --
> Rajath S,
> M.Sc(Hons.) Physics,
> Birla Institute of Technology and Science - Pilani,
> Pilani
>



-- 
Rajath S,
M.Sc(Hons.) Physics,
Birla Institute of Technology and Science - Pilani,
Pilani

Re: Adding my own ucb commands

Posted by Rajath Shashidhara <ra...@gmail.com>.
Hello Juergen,

My I use my own client application I am able to open and save documents.
I'd like to know the ucb commands that are executed when open is clicked.
Also, How exactly can I debug why my code is not working when using the
open dialog?


On Mon, Jul 1, 2013 at 9:28 PM, Jürgen Schmidt <jo...@gmail.com>wrote:

> On 7/1/13 5:29 PM, Rajath Shashidhara wrote:
> > Hello,
> > I'm thinking of adding "checkin" and "checkout" as ucp commands.
> >
> > Is it permitted to add my own ucb commands?
> >
>
> sure and it make sense of course but you focus on a simple open and save
> of documents first.
>
> Sorry I have found the time today to look in the code because of too
> many translation updates for the release.
>
> Your focus for now should be to be able to use the office internal file
> open dialog and browse your CMIS store and open and save files from
> there. Or to store new files into this CMIS store.
>
> Juergen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>


-- 
Rajath S,
M.Sc(Hons.) Physics,
Birla Institute of Technology and Science - Pilani,
Pilani

Re: Adding my own ucb commands

Posted by Jürgen Schmidt <jo...@gmail.com>.
On 7/1/13 5:29 PM, Rajath Shashidhara wrote:
> Hello,
> I'm thinking of adding "checkin" and "checkout" as ucp commands.
> 
> Is it permitted to add my own ucb commands?
> 

sure and it make sense of course but you focus on a simple open and save
of documents first.

Sorry I have found the time today to look in the code because of too
many translation updates for the release.

Your focus for now should be to be able to use the office internal file
open dialog and browse your CMIS store and open and save files from
there. Or to store new files into this CMIS store.

Juergen


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org